/*
Theme Name: Affordable Shutters & Blinds
Theme URI: https://www.affordableshutters.com.au
Description: GeneratePress child theme for Affordable Shutters & Blinds. Navy + leaf green, Comfortaa + Caveat, white sticky header with click-to-call and green pill CTA, navy 4-column footer, mobile call bar. Elementor → GP + GB rebuild.
Author: ùrlar
Template: generatepress
Version: 1.0.0
*/

/* Brand tokens alias the theme.json presets — edit colours in theme.json, not here.
   Hex fallbacks keep the header/footer styled even if global styles fail to load. */
:root{
  --as-navy:var(--wp--preset--color--navy,#132a4b);
  --as-navy-deep:var(--wp--preset--color--navy-deep,#0c1d35);
  --as-leaf:var(--wp--preset--color--leaf,#92b03d);
  --as-leaf-hover:var(--wp--preset--color--leaf-hover,#a2c14c);
  --as-leaf-deep:var(--wp--preset--color--leaf-deep,#5c7526);
  --as-leaf-tint:var(--wp--preset--color--leaf-tint,#f3f8e7);
  --as-steel:var(--wp--preset--color--steel,#d0d4db);
  --as-white:var(--wp--preset--color--white,#ffffff);
  --as-amber:var(--wp--preset--color--amber,#e8a33d);
  --as-muted:var(--wp--preset--color--muted,#3e5068);
  --as-on-dark:#dce3ec;
  --as-on-dark-mut:#c7d0dc;
  --as-hand:'Caveat',cursive;
  --as-pill:999px;
  --as-radius:14px;
}

/* ── Base brand overrides ── */
body{font-family:'Comfortaa',sans-serif;background:var(--as-white);color:var(--as-navy);line-height:1.7;overflow-x:clip}
h1,h2,h3,h4,h5,h6{font-family:'Comfortaa',sans-serif;color:var(--as-navy);line-height:1.25;text-wrap:balance}
a:focus-visible,button:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--as-leaf);outline-offset:2px}

/* Pages are full-bleed section canvases; sections manage their own width */
.page .grid-container{max-width:none;padding:0}
.page .site-main{margin:0}
.page .inside-article{padding:0}

/* ── Shared components (referenced from GB markup via class) ── */
.as-btn{font-family:'Comfortaa',sans-serif;font-weight:700;font-size:1rem;border-radius:var(--as-pill);padding:.9rem 1.9rem;border:2px solid transparent;cursor:pointer;display:inline-block;text-decoration:none;text-align:center;transition:background .18s ease,color .18s ease}
.as-btn-primary{background:var(--as-leaf);color:var(--as-navy)}
.as-btn-primary:hover{background:var(--as-leaf-hover);color:var(--as-navy)}
.as-btn-outline{background:transparent;color:var(--as-navy);border-color:var(--as-navy)}
.as-btn-outline:hover{background:var(--as-navy);color:var(--as-white)}
.as-btn-ghost{background:transparent;color:var(--as-white);border-color:var(--as-white)}
.as-btn-ghost:hover{background:var(--as-white);color:var(--as-navy)}
.as-hand{font-family:var(--as-hand);font-weight:600;line-height:1.3}
.as-kicker{font-family:var(--as-hand);font-weight:600;font-size:clamp(1.4rem,2.5vw,1.7rem);color:var(--as-leaf-deep);display:block;margin-bottom:.25rem}
.as-kicker-dark{color:var(--as-leaf)}
.as-stars{color:var(--as-amber);letter-spacing:.1em}

/* ── Header ── */
.as-header{position:sticky;top:0;z-index:100;background:var(--as-white);border-bottom:1px solid var(--as-steel);transition:box-shadow .25s ease}
.as-header.is-stuck{box-shadow:0 2px 16px rgba(19,42,75,.12)}
.as-header-in{display:flex;align-items:center;gap:clamp(1rem,2.5vw,1.6rem);padding:.7rem clamp(1.25rem,4vw,2.5rem);max-width:1280px;margin:0 auto}
.as-logo{flex-shrink:0;display:flex;align-items:center;text-decoration:none}
.as-logo img{max-height:46px;width:auto;display:block}
.as-logo .word{font-weight:700;font-size:1.15rem;color:var(--as-navy)}

.as-nav{margin-left:auto}
.as-nav ul{display:flex;gap:clamp(1rem,2vw,1.5rem);list-style:none;margin:0;padding:0}
.as-nav a{font-weight:600;font-size:.92rem;color:var(--as-navy);text-decoration:none;padding:.45rem 0;display:inline-block;transition:color .18s ease}
.as-nav li:hover>a{color:var(--as-leaf-deep)}
.as-nav .current-menu-item>a,.as-nav .current_page_item>a{color:var(--as-leaf-deep)}
.as-nav li{position:relative}
.as-nav li.menu-item-has-children>a::after{content:"▾";margin-left:.35rem;font-size:.75em;color:var(--as-leaf-deep)}
.as-nav .sub-menu{display:none;position:absolute;top:100%;left:-1rem;z-index:120;flex-direction:column;gap:0;min-width:230px;background:var(--as-white);border:1px solid var(--as-steel);border-radius:8px;padding:.35rem 0;box-shadow:0 18px 40px -18px rgba(19,42,75,.35)}
.as-nav li:hover>.sub-menu,.as-nav li:focus-within>.sub-menu{display:flex}
.as-nav .sub-menu li{position:static}
.as-nav .sub-menu a{display:block;padding:.45rem 1.1rem;font-size:.88rem;line-height:1.45;white-space:nowrap}

.as-phone{white-space:nowrap;color:var(--as-navy);text-decoration:none;display:flex;flex-direction:column;align-items:flex-end;line-height:1.2}
.as-phone small{font-size:.7rem;font-weight:600;color:var(--as-muted);letter-spacing:.02em}
.as-phone .num{display:flex;align-items:center;gap:.4rem;font-weight:800;font-size:1.12rem;color:var(--as-leaf-deep);font-variant-numeric:tabular-nums}
.as-phone:hover .num{color:var(--as-navy)}
.as-phone svg{flex:none}
.as-header .as-btn{padding:.7rem 1.4rem;font-size:.92rem;white-space:nowrap}

/* Mobile takeover menu */
.as-menu-toggle{display:none}
.as-menu-toggle>summary{list-style:none;cursor:pointer;font-weight:700;padding:.5rem .75rem;border:2px solid var(--as-navy);border-radius:8px;font-size:.9rem}
.as-menu-toggle>summary::-webkit-details-marker{display:none}
.as-menu-toggle>summary .close-label{display:none}
.as-menu-toggle[open]>summary .open-label{display:none}
.as-menu-toggle[open]>summary .close-label{display:inline}
.as-mobile-nav{position:fixed;inset:var(--as-header-h,63px) 0 0 0;background:var(--as-white);z-index:110;padding:1.5rem clamp(1.25rem,5vw,2rem) 2.5rem;overflow-y:auto;display:flex;flex-direction:column;gap:1.25rem}
.as-mobile-nav ul{list-style:none;margin:0;padding:0;display:grid;gap:.25rem}
.as-mobile-nav ul a{display:block;padding:.8rem .25rem;font-size:1.15rem;font-weight:700;color:var(--as-navy);text-decoration:none;border-bottom:1px solid var(--as-steel)}
.as-m-cta{margin-top:.5rem}
.as-m-trust{font-size:.85rem;color:var(--as-muted);display:grid;gap:.3rem}

/* Paged sub-menus: parent row opens a full panel with a Back button */
.as-m-sub summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;padding:.8rem .25rem;font-size:1.15rem;font-weight:700;color:var(--as-navy);border-bottom:1px solid var(--as-steel)}
.as-m-sub summary::-webkit-details-marker{display:none}
.as-m-sub .chev{color:var(--as-leaf-deep);font-size:1.3rem;line-height:1}
.as-m-panel{position:fixed;inset:var(--as-header-h,63px) 0 0 0;background:var(--as-white);z-index:130;padding:1rem clamp(1.25rem,5vw,2rem) 2.5rem;overflow-y:auto;display:flex;flex-direction:column}
.as-m-back{background:none;border:none;font-family:'Comfortaa',sans-serif;font-size:1rem;font-weight:700;color:var(--as-leaf-deep);text-align:left;padding:.6rem 0;cursor:pointer}
.as-m-back:hover,.as-m-back:focus,.as-m-back:active{background:none;color:var(--as-navy)}
.as-m-panel-title{font-size:1.35rem;font-weight:700;margin:.25rem 0 .75rem}
.as-m-panel ul{display:grid;gap:.25rem}
.as-m-all{color:var(--as-leaf-deep)}

@media (max-width:900px){
  .as-nav{display:none}
  .as-menu-toggle{display:block;margin-left:auto}
  .as-phone small{display:none}
}
@media (max-width:600px){
  .as-header .as-header-cta{display:none}
}

/* ── Footer ── */
.as-footer{background:var(--as-navy-deep);color:var(--as-on-dark-mut);font-size:.9rem}
.as-footer-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:2rem;padding:3rem clamp(1.25rem,4vw,2.5rem) 2rem;max-width:1280px;margin:0 auto}
.as-footer h3{color:var(--as-white);font-size:.95rem;margin:0 0 .8rem}
.as-footer ul{list-style:none;margin:0;padding:0;display:grid;gap:.45rem}
.as-footer a{color:var(--as-on-dark-mut);text-decoration:none}
.as-footer a:hover{color:var(--as-white);text-decoration:underline}
.as-foot-logo{background:var(--as-white);border-radius:10px;padding:.5rem .8rem;display:inline-block;margin-bottom:1rem}
.as-foot-logo img{height:40px;width:auto;display:block}
.as-social{display:flex;gap:.7rem;margin-top:1rem}
.as-social a{display:grid;place-content:center;width:38px;height:38px;border:1px solid #24354d;border-radius:50%;color:var(--as-on-dark-mut)}
.as-social a:hover{color:var(--as-navy-deep);background:var(--as-leaf);border-color:var(--as-leaf);text-decoration:none}
.as-footer .legal{border-top:1px solid #24354d;padding:1.25rem clamp(1.25rem,4vw,2.5rem) 5.5rem;font-size:.78rem;display:flex;flex-wrap:wrap;gap:.5rem 2rem;justify-content:space-between;max-width:1280px;margin:0 auto}
@media (min-width:761px){.as-footer .legal{padding-bottom:1.25rem}}

/* ── FAQ (raw HTML details blocks inside GB pages) ── */
.as-faq{max-width:46rem}
.as-faq details{border-bottom:1px solid var(--as-steel);padding:.35rem 0}
.as-faq summary{cursor:pointer;font-weight:700;padding:.8rem 0;list-style:none;display:flex;justify-content:space-between;align-items:center;gap:1rem}
.as-faq summary::-webkit-details-marker{display:none}
.as-faq summary::after{content:"+";font-size:1.3rem;color:var(--as-leaf-deep);flex:none}
.as-faq details[open] summary::after{content:"–"}
.as-faq details p{color:var(--as-muted);max-width:65ch;padding-bottom:1rem;margin:0}

/* ── Booking form (raw HTML inside GB pages; wire to a form plugin) ── */
.as-form{background:var(--as-white);color:var(--as-navy);border-radius:var(--as-radius);padding:1.75rem;display:grid;gap:1rem}
.as-form .field{display:grid;gap:.3rem}
.as-form label{font-size:.88rem;font-weight:700}
.as-form input,.as-form select{font-family:'Comfortaa',sans-serif;font-size:1rem;color:var(--as-navy);padding:.85rem 1.1rem;border:2px solid var(--as-steel);border-radius:10px;width:100%;background:var(--as-white)}
.as-form input:focus,.as-form select:focus,.as-form textarea:focus{outline:none;border-color:var(--as-leaf)}
.as-form textarea{font-family:'Comfortaa',sans-serif;font-size:1rem;color:var(--as-navy);padding:.85rem 1.1rem;border:2px solid var(--as-steel);border-radius:10px;width:100%;background:var(--as-white);min-height:96px;resize:vertical}
.as-form .row{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
@media (max-width:560px){.as-form .row{grid-template-columns:1fr}}
.as-form input[type=file]{padding:.6rem;border-style:dashed;font-size:.85rem}
.as-form .as-btn{width:100%;margin-top:.25rem}
.as-form .fine{font-size:.78rem;color:var(--as-muted);text-align:center;margin:0}

/* ── Blog: hero strip, archive card grid, single post ── */
.as-blog-hero{background:var(--as-navy-deep);color:var(--as-white)}
.as-blog-hero-in{max-width:72rem;margin:0 auto;padding:clamp(2.5rem,6vw,4rem) clamp(1.25rem,4vw,2.5rem);display:grid;gap:.5rem}
.as-blog-hero .as-hand{font-size:clamp(1.4rem,2.5vw,1.7rem);color:var(--as-leaf);margin:0}
.as-blog-hero h1{color:var(--as-white);font-size:clamp(1.9rem,4.5vw,2.9rem);margin:0}
.as-blog-hero .sub{color:var(--as-on-dark);max-width:38rem;margin:0}

/* Archive: GP articles become brand cards in a responsive grid */
.blog .site-main>.as-blog-hero,.archive .site-main>.as-blog-hero{grid-column:1/-1;margin:calc(-1*clamp(2.5rem,5vw,4rem)) calc(50% - 50vw) 1rem;}
.entry-meta .byline,.entry-meta .posted-on{display:none}
.blog article.post footer.entry-meta,.archive article.post footer.entry-meta,.single-post footer.entry-meta{display:none}
.blog .site-main,.archive .site-main{max-width:72rem;margin:0 auto;padding:clamp(2.5rem,5vw,4rem) clamp(1.25rem,4vw,2.5rem);display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:1.25rem;align-items:stretch}
.blog .site-main>.paging-navigation,.archive .site-main>.paging-navigation{grid-column:1/-1}
.blog article.post,.archive article.post{border:1px solid var(--as-steel);border-radius:var(--as-radius);overflow:hidden;display:flex;flex-direction:column;background:var(--as-white);margin:0}
.blog article.post .post-image,.archive article.post .post-image{order:-1;margin:-1.25rem -1.4rem .5rem}
.blog article.post .post-image img,.archive article.post .post-image img{width:100%;height:200px;object-fit:cover;display:block}
.blog article.post .inside-article,.archive article.post .inside-article{padding:1.25rem 1.4rem 1.5rem;display:flex;flex-direction:column;gap:.5rem;flex:1}
.blog article.post .entry-header h2,.archive article.post .entry-header h2{font-size:1.15rem;margin:0}
.blog article.post .entry-header h2 a,.archive article.post .entry-header h2 a{color:var(--as-navy);text-decoration:none}
.blog article.post .entry-header h2 a:hover,.archive article.post .entry-header h2 a:hover{color:var(--as-leaf-deep)}
.blog article.post .entry-meta,.archive article.post .entry-meta{font-size:.78rem;color:var(--as-muted)}
.blog article.post .entry-summary,.archive article.post .entry-summary{font-size:.9rem;color:var(--as-muted);flex:1}
.blog article.post .read-more,.archive article.post .read-more{font-weight:700;font-size:.92rem;color:var(--as-leaf-deep);text-decoration:none}

/* Featured card: first post on page one spans the grid as a split card */
.blog:not(.paged) article.post:first-of-type{grid-column:1/-1}
.blog:not(.paged) article.post:first-of-type .inside-article{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);grid-template-areas:"img head" "img sum";padding:0;gap:0;background:var(--as-leaf-tint)}
.blog:not(.paged) article.post:first-of-type .post-image{grid-area:img;margin:0}
.blog:not(.paged) article.post:first-of-type .post-image a,
.blog:not(.paged) article.post:first-of-type .post-image img{height:100%;min-height:300px;display:block}
.blog:not(.paged) article.post:first-of-type .post-image img{width:100%;object-fit:cover}
.blog:not(.paged) article.post:first-of-type .entry-header{grid-area:head;background:var(--as-leaf-tint);padding:clamp(1.5rem,3vw,2.5rem) clamp(1.5rem,3vw,2.5rem) 0;align-self:end}
.blog:not(.paged) article.post:first-of-type .entry-header::before{content:"Latest";display:inline-block;background:var(--as-white);color:var(--as-leaf-deep);border-radius:var(--as-pill);padding:.3rem .9rem;font-size:.75rem;font-weight:700;margin-bottom:.8rem}
.blog:not(.paged) article.post:first-of-type .entry-header h2{font-size:clamp(1.3rem,2.6vw,1.8rem)}
.blog:not(.paged) article.post:first-of-type .entry-summary{grid-area:sum;background:var(--as-leaf-tint);padding:.8rem clamp(1.5rem,3vw,2.5rem) clamp(1.5rem,3vw,2.5rem);align-self:start}
@media (max-width:760px){
  .blog:not(.paged) article.post:first-of-type .inside-article{grid-template-columns:1fr;grid-template-areas:"img" "head" "sum"}
  .blog:not(.paged) article.post:first-of-type .post-image a,
  .blog:not(.paged) article.post:first-of-type .post-image img{min-height:220px}
}

/* Pagination pills */
.blog .paging-navigation,.archive .paging-navigation{display:flex;justify-content:center;padding:1.5rem 0 0;border:none}
.blog .paging-navigation .nav-previous,.archive .paging-navigation .nav-previous{display:none}
.blog .nav-links,.archive .nav-links{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem}
.blog .page-numbers,.archive .page-numbers{display:inline-grid;place-content:center;min-width:42px;height:42px;padding:0 .6rem;border-radius:var(--as-pill);border:1px solid var(--as-steel);text-decoration:none;color:var(--as-navy);font-weight:700;font-size:.92rem;background:var(--as-white)}
.blog .page-numbers.current,.archive .page-numbers.current{background:var(--as-navy);color:var(--as-white);border-color:var(--as-navy)}
.blog a.page-numbers:hover,.archive a.page-numbers:hover{border-color:var(--as-navy)}

/* Related posts under single articles */
.as-related{padding:clamp(2.5rem,5vw,4rem) 0;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw)}
.as-related-in{max-width:72rem;margin:0 auto;padding:0 clamp(1.25rem,4vw,2.5rem)}
.as-related .as-kicker{margin-bottom:0}
.as-related h2{font-size:clamp(1.5rem,3vw,2rem);margin:0 0 1.5rem}
.as-related-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:1.25rem}
.as-related-card{border:1px solid var(--as-steel);border-radius:var(--as-radius);overflow:hidden;display:flex;flex-direction:column;text-decoration:none;color:var(--as-navy)}
.as-related-card img{width:100%;height:180px;object-fit:cover;display:block}
.as-related-card .body{padding:1.1rem 1.25rem 1.35rem;display:grid;gap:.45rem}
.as-related-card h3{font-size:1.02rem;margin:0;transition:color .18s ease}
.as-related-card:hover h3{color:var(--as-leaf-deep)}
.as-related-card .meta{font-size:.78rem;color:var(--as-muted)}

/* Single post: readable column, brand type */
.single-post .grid-container{max-width:none;padding:0}
.single-post .site-main{margin:0;padding:clamp(1.5rem,3vw,2.5rem) 0 clamp(2.5rem,5vw,4rem)}
.single-post .inside-article{padding:0}
.single-post .entry-header,.single-post .entry-content,.single-post .entry-meta{max-width:46rem;margin-left:auto;margin-right:auto;padding-left:1.25rem;padding-right:1.25rem}
.single-post .entry-header .entry-title{font-size:clamp(1.7rem,4vw,2.4rem)}
.single-post .entry-meta{font-size:.82rem;color:var(--as-muted)}
.single-post .featured-image{max-width:72rem;margin:1rem auto 2rem;padding:0 1.25rem}
.single-post .featured-image img{width:100%;height:clamp(240px,42vw,460px);object-fit:cover;border-radius:var(--as-radius)}
.single-post .entry-content a{color:var(--as-leaf-deep)}
.single-post .entry-content h2{font-size:1.5rem;margin-top:2.25rem}
.single-post .entry-content h3{font-size:1.2rem;margin-top:1.75rem}

/* Post-footer booking CTA band */
.as-post-cta{background:var(--as-navy-deep);color:var(--as-white);margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw)}
.as-post-cta-in{max-width:72rem;margin:0 auto;padding:clamp(2.5rem,6vw,4rem) clamp(1.25rem,4vw,2.5rem);display:grid;gap:.6rem;justify-items:start}
.as-post-cta .as-hand{font-size:clamp(1.4rem,2.5vw,1.7rem);color:var(--as-leaf);margin:0}
.as-post-cta h2{color:var(--as-white);font-size:clamp(1.6rem,3.5vw,2.3rem);margin:0}
.as-post-cta p{color:var(--as-on-dark-mut);max-width:46ch;margin:0}
.as-post-cta .btns{display:flex;flex-wrap:wrap;gap:.8rem;margin-top:.75rem}
.as-post-cta .as-btn-outline{color:var(--as-white);border-color:var(--as-white)}
.as-post-cta .as-btn-outline:hover{background:var(--as-white);color:var(--as-navy)}

/* ── Sticky mobile call bar ── */
.as-callbar{position:fixed;bottom:0;left:0;right:0;z-index:90;display:none;background:var(--as-white);border-top:1px solid var(--as-steel);padding:.6rem .8rem calc(.6rem + env(safe-area-inset-bottom));gap:.6rem}
.as-callbar .as-btn{flex:1;padding:.8rem 1rem;font-size:.95rem}
@media (max-width:760px){.as-callbar{display:flex}}

@media (prefers-reduced-motion:reduce){
  .as-header{transition:none}
  .as-btn{transition:none}
}
