/*
Theme Name: Astra Child - ASPCV Premium
Template: astra
Description: ASPCV brand-matched theme (navy + orange)
Version: 2.0
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== BRAND TOKENS ===== */
:root {
  --navy:        #1a2a5e;
  --navy-dark:   #111b3e;
  --navy-deep:   #0d1530;
  --orange:      #e8650a;
  --orange-lt:   #f07c2a;
  --blue:        #2b4ba0;
  --blue-lt:     #3d5fc0;
  --bg:          #f5f7ff;
  --bg-warm:     #eef0f8;
  --surface:     #ffffff;
  --border:      #dde2f0;
  --text:        #1a1a2e;
  --muted:       #5a6080;
  --gold:        #e8650a;

  --font-h: 'Playfair Display', Georgia, serif;
  --font-b: 'Inter', system-ui, sans-serif;
  --r-sm: 6px; --r-md: 12px; --r-lg: 20px; --r-xl: 28px;
  --sh-sm: 0 2px 8px rgba(26,42,94,0.07);
  --sh-md: 0 8px 32px rgba(26,42,94,0.12);
  --sh-lg: 0 20px 60px rgba(26,42,94,0.18);
  --tx: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ===== RESET / BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5,h6 { font-family: var(--font-h); color: var(--text); line-height: 1.2; font-weight: 700; }
a { color: var(--blue); transition: var(--tx); }
a:hover { color: var(--orange); }
img { max-width: 100%; }

/* ===== PAGE TITLE BAR ===== */
.aspcv-page-title {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 100%);
  padding: 80px 0 56px;
  position: relative; overflow: hidden;
}
.aspcv-page-title::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(232,101,10,0.15) 0%, transparent 60%);
}
.aspcv-page-title h1 {
  font-family: var(--font-h);
  color: #fff;
  font-size: clamp(2rem,4vw,3.2rem);
  margin: 0; position: relative; z-index: 1;
}
.aspcv-breadcrumb { color: rgba(255,255,255,0.5); font-size: 0.85rem; margin-top: 8px; position: relative; z-index: 1; }
.aspcv-breadcrumb a { color: var(--orange); text-decoration: none; }

/* ===== LAYOUT FULL-WIDTH FIXES ===== */
body.page-template-page-home-premium .site-content,
body.page-template-page-home-premium #content,
body.page-template-page-home-premium #content .ast-container,
body.page-template-page-home-premium .entry-content,
body.page-template-page-home-premium #primary {
  max-width: 100% !important; padding: 0 !important; margin: 0 !important; width: 100% !important;
}
body.page-template-page-home-premium .site-content > .ast-container { display: block !important; }
body.page-template-page-home-premium #secondary { display: none !important; }

.page-template-page-about #content .ast-container,
.page-template-page-technologies #content .ast-container,
.page-template-page-service #content .ast-container,
.page-template-page-contact #content .ast-container {
  display: block !important; max-width: 100% !important; padding: 0 !important; margin: 0 !important; width: 100% !important;
}
#secondary, .widget-area, .ast-sidebar-wrap { display: none !important; }
#primary, .site-main { width: 100% !important; max-width: 100% !important; padding: 0 !important; margin: 0 !important; float: none !important; }
.page-template-page-about .entry-content,
.page-template-page-technologies .entry-content,
.page-template-page-service .entry-content,
.page-template-page-contact .entry-content,
.page-template-page-about article,
.page-template-page-technologies article,
.page-template-page-service article,
.page-template-page-contact article {
  padding: 0 !important; margin: 0 !important; max-width: 100% !important;
}
.ast-flex.ast-justify-content-space-bet,
#content > .ast-container > .ast-row { display: block !important; }

/* Hero padding for sticky nav */
body.page-template-page-home-premium section:first-of-type { padding-top: 0 !important; }

/* ===== FOOTER ===== */
.site-footer, .ast-small-footer {
  background: #ffffff !important;
  color: rgba(255,255,255,0.5) !important;
  border-top: 2px solid var(--orange) !important;
  font-size: 0.85rem !important;
}
.site-footer a { color: var(--orange) !important; }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(30px); }
  to   { opacity:1; transform:translateY(0); }
}
.aspcv-animate { opacity: 0; }
.aspcv-animate.visible { animation: fadeUp 0.7s cubic-bezier(0.4,0,0.2,1) forwards; }

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
  /* Inner page sections — force single column */
  section > div[style*="display:grid"],
  section > div > div[style*="display:grid"],
  section > div[style*="grid-template-columns"],
  section > div > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Tech page alternating layout */
  div[style*="grid-template-columns:1.2fr 1fr"],
  div[style*="grid-template-columns:1fr 1.2fr"],
  div[style*="grid-template-columns: 1.2fr 1fr"],
  div[style*="grid-template-columns: 1fr 1.2fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Services 4-col → 1-col */
  div[style*="grid-template-columns:repeat(4,1fr)"],
  div[style*="grid-template-columns: repeat(4,1fr)"],
  div[style*="repeat(4,1fr)"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* How we work 4-col → 2-col */
  div[style*="repeat(4,1fr)"] { grid-template-columns: 1fr 1fr !important; }

  /* ESCO 2-col → 1-col */
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* Page title */
  .aspcv-page-title { padding: 60px 0 40px !important; }
  .aspcv-page-title h1 { font-size: 1.8rem !important; }

  /* Section padding */
  section[style*="padding:100px"],
  section[style*="padding: 100px"] { padding: 60px 0 !important; }
  section[style*="padding:80px"],
  section[style*="padding: 80px"] { padding: 50px 0 !important; }

  /* Container padding */
  div[style*="max-width:1200px"],
  div[style*="max-width: 1200px"],
  div[style*="max-width:1100px"],
  div[style*="max-width: 1100px"] { padding-left: 16px !important; padding-right: 16px !important; }

  /* Font sizes */
  h2[style*="clamp"] { font-size: 1.7rem !important; }

  /* Contact 2-col */
  div[style*="grid-template-columns:1fr 1.4fr"],
  div[style*="grid-template-columns: 1fr 1.4fr"] { grid-template-columns: 1fr !important; }

  /* About leadership grid */
  div[style*="grid-template-columns:repeat(3,1fr)"],
  div[style*="grid-template-columns: repeat(3,1fr)"] { grid-template-columns: 1fr 1fr !important; }
  div[style*="grid-template-columns:repeat(2,1fr)"],
  div[style*="grid-template-columns: repeat(2,1fr)"] { grid-template-columns: 1fr 1fr !important; }

  /* Timeline */
  div[style*="grid-template-columns:repeat(6,1fr)"],
  div[style*="repeat(6,1fr)"] { grid-template-columns: repeat(2,1fr) !important; }

  /* Hero home mobile - handled inline */
  .aspcv-hero-text { padding: 20px !important; }
}

@media (max-width: 480px) {
  div[style*="repeat(4,1fr)"],
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }

  div[style*="grid-template-columns:repeat(3,1fr)"],
  div[style*="repeat(3,1fr)"] { grid-template-columns: 1fr !important; }

  div[style*="grid-template-columns:repeat(2,1fr)"],
  div[style*="repeat(2,1fr)"] { grid-template-columns: 1fr !important; }
}


@media(max-width:600px){
  /* Stats grid 2-col */
  .hp-stats-grid { grid-template-columns: repeat(2,1fr) !important; gap: 16px !important; }
  .hp-stats-grid > div:last-child { grid-column: 1/-1; }

  /* Container padding */
  div[style*='padding:0 24px'] { padding: 0 16px !important; }
  div[style*='padding: 0 24px'] { padding: 0 16px !important; }
}

/* ===== TECH DETAIL FULL WIDTH ===== */
.page-template-page-tech-detail #content .ast-container,
.page-template-page-tech-detail #primary,
.page-template-page-tech-detail .site-main,
.page-template-page-tech-detail .entry-content,
.page-template-page-tech-detail article {
  display: block !important;
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}
.page-template-page-tech-detail #secondary { display: none !important; }

/* ===== ESCO FULL WIDTH ===== */
.page-template-page-esco #content .ast-container,
.page-template-page-esco #primary,
.page-template-page-esco .entry-content,
.page-template-page-esco article {
  display: block !important; max-width: 100% !important; width: 100% !important; padding: 0 !important; margin: 0 !important; float: none !important;
}
.page-template-page-esco #secondary { display: none !important; }

/* ===== ESCO AST-CONTAINER FIX ===== */
.page-template-page-esco #content .ast-container {
  display: block !important;
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ===== AST-PAGE-BUILDER FULL WIDTH FIX (all custom templates) ===== */
.ast-page-builder-template #content .ast-container,
body.page-template-page-esco-php #content .ast-container,
body.page-template-page-about-php #content .ast-container,
body.page-template-page-technologies-php #content .ast-container,
body.page-template-page-service-php #content .ast-container,
body.page-template-page-contact-php #content .ast-container,
body.page-template-page-tech-detail-php #content .ast-container {
  display: block !important;
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  flex-direction: unset !important;
}

