/*
Theme Name: Australis Fabrications
Theme URI: https://australisfabrications.com.au
Description: Custom child theme for Australis Fabrications - Sunshine Coast Metal Fabrication
Author: Increase Construction
Template: hello-elementor
Version: 1.0.0
Text Domain: australis-child
*/

/* ============================================
   AUSTRALIS FABRICATIONS - BRAND SYSTEM
   Primary: #2ea3f2 (Australis Blue)
   Accent: #dcab51 (Gold)
   Dark: #0f1923 (Deep Navy)
   Gray: #6d777e
   ============================================ */

:root {
  --af-blue: #2ea3f2;
  --af-blue-dark: #1a8ad4;
  --af-blue-light: #e8f4fd;
  --af-gold: #dcab51;
  --af-gold-dark: #c49a3f;
  --af-gold-light: #f5ecd8;
  --af-dark: #0f1923;
  --af-dark-2: #162230;
  --af-dark-3: #1c2d3f;
  --af-gray: #6d777e;
  --af-gray-light: #f4f6f8;
  --af-white: #ffffff;
  --af-text: #2c3e50;
  --af-text-light: #8899a6;
  --af-radius: 12px;
  --af-radius-lg: 20px;
  --af-shadow: 0 4px 24px rgba(15, 25, 35, 0.08);
  --af-shadow-lg: 0 12px 48px rgba(15, 25, 35, 0.12);
  --af-shadow-hover: 0 16px 56px rgba(15, 25, 35, 0.16);
  --af-transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--af-text);
  line-height: 1.7;
  overflow-x: hidden;
  background: var(--af-white);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--af-dark);
}

::selection { background: var(--af-blue); color: var(--af-white); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--af-dark); }
::-webkit-scrollbar-thumb { background: var(--af-blue); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--af-gold); }

/* Gradient text utility */
.af-gradient-text {
  background: linear-gradient(135deg, var(--af-blue) 0%, var(--af-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Gold accent line */
.af-gold-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--af-gold), var(--af-blue));
  border-radius: 2px;
}

/* Scroll animations */
.af-animate { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.af-animate.af-visible { opacity: 1; transform: translateY(0); }
.af-delay-1 { transition-delay: 0.1s; }
.af-delay-2 { transition-delay: 0.2s; }
.af-delay-3 { transition-delay: 0.3s; }
.af-delay-4 { transition-delay: 0.4s; }

/* Elementor overrides */
:root {
  --wp--style--global--content-size: 1200px !important;
  --wp--style--global--wide-size: 1400px !important;
}
.elementor-section.elementor-section-boxed > .elementor-container { max-width: 1200px !important; }
.elementor .elementor-container { max-width: 1200px !important; }
.elementor-button { border-radius: var(--af-radius) !important; font-weight: 600 !important; transition: var(--af-transition) !important; }
.elementor-button:hover { transform: translateY(-2px); }
.elementor-widget-image img { border-radius: var(--af-radius); }

@media (max-width: 767px) {
  .elementor-section > .elementor-container { padding-left: 20px; padding-right: 20px; }
}

/* ============================================
   HELLO ELEMENTOR HEADER OVERRIDE
   ============================================ */

.site-header {
  background: var(--af-dark) !important;
  border-bottom: 1px solid rgba(46, 163, 242, 0.1) !important;
  padding: 12px 0 !important;
  position: sticky;
  top: 0;
  z-index: 999;
}

/* Header custom logo */
.site-header .site-branding .custom-logo-link img,
.site-header .custom-logo {
  height: 52px !important;
  width: auto !important;
  max-width: 220px !important;
  filter: brightness(0) invert(1);
  border-radius: 0 !important;
  transition: opacity 0.3s ease;
}

.site-header .custom-logo-link:hover img {
  opacity: 0.85;
}

/* Hide text title when logo is present */
.site-header .site-branding .site-title {
  display: none !important;
}

.site-header .site-navigation .menu li a,
.site-header nav a {
  color: rgba(255, 255, 255, 0.75) !important;
  font-weight: 500 !important;
  font-size: 0.9rem !important;
  text-decoration: none !important;
  transition: color 0.3s ease !important;
  padding: 8px 16px !important;
}

.site-header .site-navigation .menu li a:hover,
.site-header nav a:hover {
  color: var(--af-blue) !important;
}

.site-header .site-navigation .current-menu-item a {
  color: var(--af-blue) !important;
}

.site-header .site-navigation-toggle {
  color: white !important;
}

/* Hide default WP footer - we have our own */
.site-footer { display: none !important; }

/* Full-width page content */
.site-main .page-content,
.site-main article {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Hide default page title */
.page .entry-header,
.page .page-header {
  display: none !important;
}

/* Service card hover effects */
.elementor-widget-text-editor div[style*="border-radius:20px"][style*="box-shadow"] {
  transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}
.elementor-widget-text-editor div[style*="border-radius:20px"][style*="box-shadow"]:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 16px 56px rgba(15, 25, 35, 0.16) !important;
}

/* Button hover effects */
a[style*="background:linear-gradient(135deg,#2ea3f2"] {
  transition: all 0.4s ease !important;
}
a[style*="background:linear-gradient(135deg,#2ea3f2"]:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 32px rgba(46, 163, 242, 0.45) !important;
}
a[style*="background:#dcab51"] {
  transition: all 0.4s ease !important;
}
a[style*="background:#dcab51"]:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 32px rgba(220, 171, 81, 0.45) !important;
}

/* Footer logo: white + left-aligned */
.af-footer .elementor-widget-image img {
  filter: brightness(0) invert(1);
  border-radius: 0 !important;
}

.af-footer .elementor-widget-image {
  text-align: left !important;
}

/* Float animation for scroll indicator */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ============================================
   UI/UX POLISH PASS
   ============================================ */

/* --- 1. ACCESSIBILITY: Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .af-animate { opacity: 1; transform: none; }
}

/* --- 2. ACCESSIBILITY: Focus rings --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--af-blue) !important;
  outline-offset: 3px !important;
  border-radius: 4px;
}

/* --- 3. HEADER: Taller touch targets, active underline --- */
.site-header {
  padding: 8px 0 !important;
}

.site-header .site-navigation .menu {
  gap: 0 !important;
  align-items: center;
}

.site-header .site-navigation .menu li a,
.site-header nav a {
  font-size: 0.95rem !important;
  padding: 12px 20px !important;       /* min 44px touch target */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  position: relative;
}

/* Active underline on nav links */
.site-header .site-navigation .menu li a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--af-gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease-out;
}

.site-header .site-navigation .menu li a:hover::after,
.site-header .site-navigation .current-menu-item a::after {
  transform: scaleX(1) !important;
}

/* --- 4. TEXT: Max line-length for readability --- */
.elementor-widget-text-editor p {
  max-width: 72ch;
}

.elementor-widget-text-editor p[style*="text-align:center"] {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* --- 5. SERVICE CARDS: cursor + image zoom --- */
.elementor-widget-text-editor div[style*="border-radius:20px"][style*="background:#fff"],
.elementor-widget-text-editor div[style*="border-radius:20px"][style*="box-shadow"] {
  cursor: pointer;
}

.elementor-widget-text-editor div[style*="overflow:hidden"] img[style*="object-fit:cover"] {
  transition: transform 0.5s ease-out !important;
}

.elementor-widget-text-editor div[style*="border-radius:20px"]:hover img[style*="object-fit:cover"] {
  transform: scale(1.06) !important;
}

/* "Learn More" arrow nudge on card hover */
.elementor-widget-text-editor div[style*="border-radius:20px"]:hover a[style*="color:#2ea3f2"] {
  color: var(--af-gold) !important;
  letter-spacing: 0.5px;
}

/* --- 6. GALLERY PROJECT OVERLAYS: always-visible labels on desktop --- */
div[style*="aspect-ratio:4/3"] {
  cursor: pointer;
}

/* Show label + category by default, dim on non-hover */
div[style*="aspect-ratio:4/3"] > div:last-child {
  opacity: 0.85 !important;
  transition: opacity 0.3s ease;
}

div[style*="aspect-ratio:4/3"]:hover > div:last-child {
  opacity: 1 !important;
}

div[style*="aspect-ratio:4/3"]:hover img {
  transform: scale(1.06) !important;
  transition: transform 0.5s ease-out !important;
}

/* --- 7. FORM INPUTS: focus glow + transition --- */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  border-color: var(--af-blue) !important;
  box-shadow: 0 0 0 4px rgba(46, 163, 242, 0.12) !important;
  outline: none !important;
}

/* Submit button disabled state hint */
button[style*="background:linear-gradient"] {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

button[style*="background:linear-gradient"]::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}

button[style*="background:linear-gradient"]:hover::after {
  left: 100%;
}

button[style*="background:linear-gradient"]:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 32px rgba(46, 163, 242, 0.4) !important;
}

/* --- 8. TESTIMONIAL CARDS: subtle border glow on hover --- */
div[style*="background:rgba(255,255,255,0.04)"] {
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

div[style*="background:rgba(255,255,255,0.04)"]:hover {
  border-color: rgba(46, 163, 242, 0.25) !important;
  box-shadow: 0 0 24px rgba(46, 163, 242, 0.08) !important;
}

/* --- 9. STATS BAR: subtle separator between columns --- */
.elementor-section[data-settings*='"structure":"40"'] .elementor-column:not(:last-child) {
  border-right: 1px solid #e8ecf0;
}

/* --- 10. CTA SECTIONS: glass outline button hover --- */
a[style*="border:2px solid rgba(255,255,255"] {
  transition: all 0.3s ease !important;
}

a[style*="border:2px solid rgba(255,255,255"]:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}

/* --- 11. IMAGES: subtle entrance on load --- */
.elementor-widget-image img,
.elementor-widget-text-editor img {
  opacity: 1;
  transition: opacity 0.4s ease;
}

/* --- 12. HERO BADGES: pill cursor & hover lift --- */
span[style*="border-radius:100px"] {
  cursor: default;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* --- 13. FOOTER LINKS: hover color + underline --- */
.elementor-section[style*="background-color:#0a1219"] a,
div[style*="background:#0a1219"] a {
  transition: color 0.2s ease !important;
}

.elementor-section[style*="background-color:#0a1219"] a:hover,
div[style*="background:#0a1219"] a:hover {
  color: var(--af-blue) !important;
}

/* --- 14. MOBILE NAV FIXES --- */
@media (max-width: 1024px) {
  .site-header .site-navigation .menu li a::after {
    display: none; /* hide underline on mobile - takes up space */
  }

  /* Stack contact info + form vertically */
  .elementor-section[data-settings*='"structure":"20"'] .elementor-column {
    width: 100% !important;
    margin-bottom: 40px;
  }

  /* Reduce section padding on tablet */
  .elementor-section {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

@media (max-width: 767px) {
  /* Stats bar: 2x2 grid on mobile */
  .elementor-section[data-settings*='"structure":"40"'] .elementor-column {
    width: 50% !important;
    border-right: none !important;
  }

  .elementor-section[data-settings*='"structure":"40"'] .elementor-column:nth-child(1),
  .elementor-section[data-settings*='"structure":"40"'] .elementor-column:nth-child(2) {
    border-bottom: 1px solid #e8ecf0;
    padding-bottom: 16px;
    margin-bottom: 16px;
  }

  /* Service cards: full width */
  .elementor-section[data-settings*='"structure":"30"'] .elementor-column {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Gallery grid: 1 column */
  div[style*="grid-template-columns:repeat(auto-fill,minmax(350px"] {
    grid-template-columns: 1fr !important;
  }
}
