/* ==========================================================================
   AAL Construction Scotland Ltd — Master Stylesheet
   ========================================================================== */

/* --------------------  FONTS  -------------------- */
@font-face{
  font-family:"Pill Gothic 300mg";
  src:
    local("Pill Gothic 300mg"),
    local("PILL GOTHIC 300MG REGULAR"),
    url("../fonts/PillGothic300mg-Regular.ttf") format("truetype");
  font-weight:400;
  font-style:normal;
  font-display:swap;
}

/* --------------------  DESIGN TOKENS  -------------------- */
:root{
  --brand:#bb401e;
  --brand-dark:#a1391a;
  --ink:#222;
  --muted:#666;
  --container:1170px;
  --shadow:0 10px 20px rgba(0,0,0,.08);
}

/* --------------------  RESET / BASE  -------------------- */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;color:var(--ink);background:#fff;
  font-family:"Pill Gothic 300mg","PULL GOTHIC 300MG REGULAR.TTG",Arial,Helvetica,sans-serif;
  font-size:18px;line-height:1.4;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
.container{max-width:var(--container);margin:0 auto;padding:0 20px}

/* --------------------  HEADER (150px)  -------------------- */
header.site-header{height:150px;background:#fff;border-bottom:1px solid #eee}
.header-inner{
  height:100%;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:24px;
}
.brand img.logo{
  max-height:70px;
  width:auto;
  image-rendering:auto;
}
.quick-contacts{
  display:flex; align-items:center; gap:28px;
  color:#b94321; font-size:25px; line-height:1; flex-wrap:wrap;
}
.quick-contacts a{ color:#b94321; }
.quick-contacts .item{ display:flex; align-items:center; gap:10px; }
.quick-contacts .item img{ height:45px; width:auto; display:block; }

/* --------------------  NAV (46px)  -------------------- */
nav.site-nav{
  height:46px;background:var(--brand);color:#fff;
  position:relative; z-index:20;
}
.nav-inner{height:46px;display:flex;align-items:center;justify-content:space-between}
.nav-links{display:flex;align-items:center;gap:30px;height:46px}
.nav-links a{
  display:flex;align-items:center;height:46px;padding:0 8px;
  text-transform:uppercase;font-size:18px;letter-spacing:.02em;color:#fff;
}
.nav-links a:hover,.nav-links a:focus{background:var(--brand-dark)}
.nav-toggle{
  display:none;width:40px;height:34px;border:0;border-radius:8px;background:#fff;color:var(--brand);
  align-items:center;justify-content:center;cursor:pointer
}

/* --------------------  PAGE HERO (subpage banner)  -------------------- */
.page-hero{
  background:#2b2b2b center/cover no-repeat;
  min-height:200px;
  display:flex; align-items:center;
}
.page-hero .title{
  color:#fff; font-size:40px; font-weight:800; letter-spacing:.02em;
  text-transform:uppercase; text-align:left;
}

/* --------------------  CTA BAR (shared)  -------------------- */
.cta{background:var(--brand);color:#fff}
.cta .container{
  height:auto; min-height:60px;
  padding:14px 20px;
  display:flex; align-items:center; justify-content:center; gap:6px;
  flex-wrap:wrap; text-align:center; line-height:1.25;
  font-size:clamp(16px, 2.6vw, 27px);
  font-weight:700; letter-spacing:.02em;
}
.cta a{color:#fff;text-decoration:underline}

/* --------------------  SECTION TITLE  -------------------- */
.section-title{text-align:center;margin:26px 0 18px;font-size:20px;font-weight:800;color:#333}

/* --------------------  FORM ELEMENTS (shared)  -------------------- */
.input,.textarea,.button{border:1px solid #d9d9d9;border-radius:6px;background:#fff;font:inherit;padding:10px 12px}
.textarea{min-height:110px;grid-column:1 / -1;resize:vertical}
.button{background:var(--brand);color:#fff;border:0;font-weight:700;cursor:pointer;grid-column:1 / -1;padding:12px;transition:filter .15s ease}
.button:hover{filter:brightness(.95)}

/* --------------------  FOOTER  -------------------- */
footer.site-footer{background:#2c2c2c;color:#e6e6e6;padding:26px 0 46px;text-align:center}
.footer-logo{height:46px;margin:0 auto 12px}
.footer-small{color:#bfbfbf;font-size:18px;line-height:1.4}

/* ==========================================================================
   HOME PAGE (index.php)
   ========================================================================== */

/* Hero full-bleed slideshow */
.hero{padding:0;margin:0;position:relative}
.hero .container{max-width:none;padding:0}
.hero .frame{
  position:relative;border-radius:0;overflow:hidden;box-shadow:none;
}
.hero .slides{
  width:100%;
  aspect-ratio:16/6;
  position:relative;
}
.hero .slides .slide{
  position:absolute; inset:0;
  background:center/cover no-repeat;
  opacity:0; transition:opacity 800ms ease;
  z-index:1;
}
.hero .slides .slide.is-active{opacity:1}
.hero .banner{ display:none; }

/* Services grid (homepage) */
.services{background:#303030;color:#eee;padding:28px 0;border-top:4px solid #1e1e1e;border-bottom:4px solid #1e1e1e}
.services-tagline{
  color:#fff;
  font-size:33px;
  font-weight:700;
  text-align:center;
  letter-spacing:.02em;
  margin:0 0 18px;
}
.services-grid{display:grid;gap:22px;grid-template-columns:repeat(3,1fr)}
.service{
  display:grid;grid-template-columns:84px 1fr;gap:16px;align-items:center;
}
.service .icon img{width:84px;height:auto;object-fit:contain}
.service h4{margin:0 0 6px;color:#bc4421;font-size:24px}
.service p{margin:0;color:#eaeaea;font-size:18px;line-height:1.4}

/* Homepage CTA override (fixed 80px) */
.cta--home .container{
  height:80px;min-height:80px;
  font-size:27px;
}

/* Intro */
.intro{padding:28px 0 10px;text-align:center;color:#555;font-size:18px}

/* Latest Projects (homepage) */
.projects{padding-bottom:30px}
.project-grid--home{display:grid;gap:22px;grid-template-columns:repeat(3,1fr)}
.card{border:1px solid #e9e9e9;border-radius:8px;overflow:hidden;background:#fff;box-shadow:var(--shadow)}
.card .thumb{aspect-ratio:4/3;background:#ddd center/cover no-repeat}
.card .body{padding:12px 14px}
.card .body p{margin:0;color:#666;font-size:16px}

/* Testimonials (homepage) */
.testimonials{background:var(--brand);color:#fff;padding:28px 0 18px;text-align:center}
.testimonial-slides{position:relative;max-width:900px;margin:0 auto 12px}
.testimonial-slide{
  display:none;
  opacity:0;
  transition:opacity 600ms ease;
}
.testimonial-slide.is-active{
  display:block;
  opacity:1;
}
.testimonial-quote{max-width:900px;margin:0 auto 8px;opacity:.95;font-size:18px}
.testimonial-author{font-weight:700;font-size:16px;margin:4px 0 0;opacity:.85}
.stars{font-size:20px;letter-spacing:4px}
.stars span{filter:drop-shadow(0 1px 1px rgba(0,0,0,.25))}
.testimonials-link{
  display:inline-block;margin-top:12px;
  color:#fff;text-decoration:underline;font-size:16px;opacity:.85;
}
.testimonials-link:hover{opacity:1}

/* Contact (homepage) */
.contact{padding:26px 0 40px;background:#faf6f5}
.contact .form{
  max-width:760px;
  margin:0 auto;
  display:grid;
  gap:10px;
  grid-template-columns:1fr;
}
.contact .form .input,
.contact .form .textarea,
.contact .form .button{
  width:100%;
}

/* ==========================================================================
   SERVICES PAGE (services.php)
   ========================================================================== */
.services-intro{
  padding:28px 0 8px; color:#555; text-align:center;
}
.services-index{
  display:flex; flex-wrap:wrap; gap:10px; justify-content:center;
  margin:10px 0 26px;
}
.services-index a{
  padding:8px 12px; border:1px solid #ddd; border-radius:6px; font-weight:700;
}
.services-index a:hover{ background:#fafafa }

.service-detail{
  display:grid; grid-template-columns:1fr; gap:14px;
  padding:26px 0;
  border-top:1px solid #eee;
}
.service-detail:first-of-type{ border-top:0; }
.service-detail h2{
  margin:0 0 6px; font-size:28px; color:#bc4421;
}
.service-detail .lede{
  margin:0; color:#333;
}
.service-detail .cols{
  display:grid; grid-template-columns:1.2fr .8fr; gap:24px; align-items:start;
}
.service-detail .cols .copy p{ margin:0 0 10px; color:#333; }
.service-detail .cols .copy ul{
  margin:4px 0 12px 18px;
  color:#333;
}
.service-detail .cols .copy ul + p{ margin-top:8px; }
.service-detail .cols .aside{
  background:#faf8f7; border:1px solid #eee; border-radius:8px; padding:14px;
}
.service-detail .cols .aside h4{
  margin:0 0 8px; color:#333; font-size:18px;
}

.service-hero{
  width:100%;
  height:clamp(300px, 52vw, 560px);
  background:#ddd center/cover no-repeat;
  border-radius:8px;
}

/* Services page contact section override */
.services-contact{ padding:26px 0 70px; }

/* ==========================================================================
   GALLERY PAGE (gallery.php)
   ========================================================================== */
.gallery-intro{
  padding:26px 0 6px; color:#555; text-align:center;
}
.gallery-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:16px;
  padding:10px 0 32px;
}
.gallery-tile{
  position:relative;
  border-radius:8px;
  overflow:hidden;
  box-shadow:var(--shadow);
  background:#e9e9e9;
}
.gallery-tile::before{
  content:"";
  display:block;
  padding-top:66.666%;
}
.gallery-tile img{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  transition:transform .25s ease;
}
.gallery-tile:hover img,
.gallery-tile:focus-within img{
  transform:scale(1.03);
}

/* ==========================================================================
   CONTACT PAGE (contact.php)
   ========================================================================== */
.contact-intro{
  padding:26px 0 10px; color:#555; text-align:center;
}
.contact-grid{
  display:flex;
  justify-content:center;
  padding:0 0 10px;
}
.info-card{
  background:#faf8f7; border:1px solid #eee; border-radius:8px; padding:18px;
  width:100%;
  max-width:720px;
  box-shadow:var(--shadow);
  text-align:center;
}
.info-card h3{ margin:0 0 10px; color:#bc4421; font-size:24px; }
.info-card p{ margin:0 0 10px; color:#333; }
.info-list{ list-style:none; padding:0; margin:10px 0 0; }
.info-list li{ margin:8px 0; color:#333; }
.info-list a{ color:#b94321; text-decoration:underline; }

/* Contact page CTA spacing */
.contact-cta{ margin-top:28px; }

/* Contact page form (stacked) */
.contact-page .form{
  max-width:760px;
  margin:0 auto;
  display:grid;
  gap:10px;
  grid-template-columns:1fr;
}

/* ==========================================================================
   PROJECTS PAGE (projects.php)
   ========================================================================== */
.projects-intro{
  padding:26px 0 6px; color:#555; text-align:center;
}
.project-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:22px;
  padding:16px 0 34px;
}
.project-card{
  background:#fff;
  border:1px solid #e9e9e9;
  border-radius:10px;
  overflow:hidden;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
}
.project-hero{
  position:relative;
  background:#ddd center/cover no-repeat;
  aspect-ratio:16/10;
  min-height:210px;
}
.project-body{
  padding:14px 16px 16px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.project-title{
  margin:0; font-size:22px; color:#bc4421;
}
.project-desc{
  margin:0; color:#333;
}
.project-meta{
  margin:2px 0 0; color:#777; font-size:14px;
}
.project-actions{
  margin-top:auto;
  padding-top:8px;
  display:flex;
  gap:10px;
}
.button.secondary{
  background:#f2f2f2; color:#333; font-weight:700;
}
.button--project{
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:8px; padding:10px 14px;
  text-decoration:none;
}

/* ==========================================================================
   VIEW PROJECT PAGE (viewproject.php)
   ========================================================================== */
.breadcrumb{
  font-size:16px; color:#777;
  padding:12px 0 0;
}
.breadcrumb a{ color:#777; text-decoration:underline; }

.project-header{ padding:10px 0 6px; }
.project-header h1{ margin:6px 0 8px; font-size:32px; color:#bc4421; }

.vp-project-hero{
  width:100%;
  max-width:100%;
  margin:18px 0 20px;
  aspect-ratio:16/9;
  background:#ddd center/cover no-repeat;
  border-radius:10px;
  box-shadow:var(--shadow);
  min-height:320px;
}

.project-details{
  display:grid; grid-template-columns:1.35fr .65fr; gap:24px;
  align-items:start;
  padding:6px 0 10px;
}
.project-details .copy p{ margin:0 0 12px; color:#333; }
.project-details .copy ul{ margin:4px 0 14px 18px; color:#333; }
.project-details .copy ul + p{ margin-top:8px; }

.project-aside{
  background:#faf8f7; border:1px solid #eee; border-radius:10px; padding:14px;
}
.project-aside h3{ margin:0 0 10px; font-size:20px; color:#333; }
.info-rows{
  display:grid;
  grid-template-columns:160px 1fr;
  row-gap:10px;
  column-gap:10px;
  align-items:start;
}
.info-label{ color:#777; font-size:16px; }
.info-value{ color:#333; }

/* ==========================================================================
   TESTIMONIALS PAGE (testimonials.php)
   ========================================================================== */
.testimonials-page-intro{
  padding:28px 0 10px; color:#555; text-align:center;
}
.testimonial-card{
  background:#faf8f7;
  border:1px solid #eee;
  border-radius:10px;
  padding:24px 28px;
  margin:0 auto 22px;
  max-width:860px;
  box-shadow:var(--shadow);
}
.testimonial-card blockquote{
  margin:0 0 12px;
  color:#333;
  font-size:18px;
  line-height:1.55;
}
.testimonial-card .testimonial-card-author{
  font-weight:700;
  color:#bc4421;
  font-size:18px;
}
.testimonial-card .testimonial-card-stars{
  font-size:18px;
  letter-spacing:3px;
  color:#e8a415;
  margin-top:4px;
}

/* ==========================================================================
   RESPONSIVE — SHARED
   ========================================================================== */

/* Side padding band between 1185 and 901 */
@media (max-width:1185px) and (min-width:901px){
  .container{
    padding-left:24px !important;
    padding-right:24px !important;
  }
}

@media (max-width:1170px){
  .project-grid--home{grid-template-columns:repeat(2,1fr)}
  .services-grid{grid-template-columns:repeat(2,1fr)}
  .project-grid{grid-template-columns:repeat(2, 1fr)}
  .gallery-grid{grid-template-columns:repeat(3, 1fr)}
  .service-detail .cols{grid-template-columns:1fr}
}

/* Mobile: header centering + nav dropdown */
@media (max-width:900px){
  .header-inner{
    grid-template-columns:1fr;
    justify-items:center;
    gap:12px;
    text-align:center;
  }
  .header-inner > div:nth-child(2){ display:none; }
  .brand img.logo{ margin:0 auto; }
  .quick-contacts{ justify-content:center; }
  .quick-contacts .item{ justify-content:center; }

  .nav-inner{
    height:46px;
    display:flex; align-items:center; justify-content:center;
    position:static;
  }
  .nav-toggle{ display:flex; margin:0 auto; }

  .nav-links{
    position:absolute;
    top:46px;
    left:0; right:0;
    width:100%;
    background:var(--brand);
    display:none;
    flex-direction:column;
    gap:0;
    padding:8px 0;
    z-index:9999;
    box-shadow:0 10px 20px rgba(0,0,0,.25);
  }
  nav.site-nav.is-open .nav-links{ display:flex; }

  .nav-links a{
    display:block;
    width:100%;
    padding:14px 20px;
    text-align:center;
    color:#fff;
    background:var(--brand);
  }
  .nav-links a + a{ border-top:1px solid rgba(255,255,255,.15); }
  .nav-links a:hover,.nav-links a:focus{ background:var(--brand-dark); }

  .services-tagline{ font-size:28px; }

  .page-hero{ min-height:160px; }
  .page-hero .title{ font-size:32px; text-align:center; width:100%; }

  .container{
    padding-left:20px !important;
    padding-right:20px !important;
  }

  /* Services page mobile */
  .service-detail{
    padding:42px 0 60px;
  }
  .service-detail h2{ margin-top:8px; }
  .service-detail .cols .aside{ margin-bottom:14px; }

  /* Gallery mobile */
  .gallery-grid{ grid-template-columns:repeat(2, 1fr); gap:14px; }

  /* Contact card mobile */
  .contact-grid{ padding:0; }
  .info-card{ max-width:720px; }

  /* Projects mobile */
  .project-grid{ grid-template-columns:1fr; gap:16px; }

  /* View project mobile */
  .project-details{ grid-template-columns:1fr; gap:18px; }
  .vp-project-hero{
    aspect-ratio:16/10;
    min-height:220px;
  }
}

/* Prevent header overflow under 603px */
@media (max-width:603px){
  header.site-header{
    height:auto;
    min-height:150px;
    padding:14px 0 12px;
  }
  .quick-contacts{
    flex-direction:column; align-items:center; gap:10px;
  }
  .quick-contacts .item img{ height:34px; }

  .container{
    padding-left:22px !important;
    padding-right:22px !important;
  }

  .vp-project-hero{
    aspect-ratio:16/12;
    min-height:160px;
  }
}

/* Extra small */
@media (max-width:700px){
  .project-grid--home{grid-template-columns:1fr}
  .services-grid{grid-template-columns:1fr}
  .service{grid-template-columns:72px 1fr}
  .service .icon img{width:72px}
  .contact .form{grid-template-columns:1fr}
}

@media (max-width:485px){
  .container{
    padding-left:18px !important;
    padding-right:18px !important;
  }
  .gallery-grid{ grid-template-columns:1fr; gap:12px; }
  .service-hero{
    height:clamp(220px, 65vw, 380px);
  }
  .vp-project-hero{
    aspect-ratio:4/3;
    min-height:140px;
  }
}

@media (max-width:480px){
  .cta .container{ gap:8px; font-size:clamp(15px, 4.5vw, 22px); }
}
