/* ========================================
   SANDTON CPF
   PHASE 1 WEBSITE
======================================== */


/* ========================================
   VARIABLES
======================================== */

:root{
    color-scheme: only light;
    
  --navy:#07182f;
  --blue:#0f4c81;
  --sky:#e8f3ff;
  --gold:#f7b731;
  --red:#d7263d;
  --whatsapp:#25D366;

  --ink:#172033;
  --muted:#64748b;
  --line:#dbe4ef;
  --bg:#f7f9fc;
  --white:#ffffff;

  --shadow:0 18px 50px rgba(7,24,47,.14);
  --radius:24px;
}


/* ========================================
   BASE
======================================== */

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
  scroll-padding-top:145px;
}

body{
  margin:0;
  font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--ink);
  background:var(--bg);
  line-height:1.55;
}

a{
  color:inherit;
}

img{
  max-width:100%;
  height:auto;
}

.container{
  width:min(1180px,92%);
  margin:auto;
}


/* ========================================
   ACCESSIBILITY
======================================== */

.skip-link{
  position:absolute;
  left:-999px;
  top:0;
  background:var(--gold);
  color:var(--navy);
  padding:.7rem 1rem;
  z-index:999;
}

.skip-link:focus{
  left:1rem;
  top:1rem;
}


/* ========================================
   HEADER
======================================== */

.site-header{
  position:sticky;
  top:0;
  z-index:100;
  background:rgba(255,255,255,.95);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}

.utility-bar{
  background:var(--navy);
  color:white;
  font-size:.85rem;
}

.utility-wrap{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:1.2rem;
  padding:.45rem 0;
  flex-wrap:wrap;
}

.utility-wrap a{
  color:white;
  text-decoration:none;
  font-weight:700;
  opacity:.92;
}

.utility-wrap a:hover{
  opacity:1;
  text-decoration:underline;
}

.nav-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1.5rem;
  padding:.85rem 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:.85rem;
  text-decoration:none;
  min-width:0;
}

.real-logo{
  width:175px;
  height:90px;
  object-fit:contain;
  flex-shrink:0;
}

.site-nav{
  display:flex;
  align-items:center;
  gap:.85rem;
  font-weight:800;
  font-size:.9rem;
}

.site-nav a{
  text-decoration:none;
  color:#26364f;
  white-space:nowrap;
}

.site-nav a:hover{
  color:var(--blue);
}

.site-nav a.active{
  color:var(--blue);
  font-weight:900;
}

.nav-cta{
  background:var(--red);
  color:white!important;
  padding:.72rem 1rem;
  border-radius:999px;
}

.menu-toggle{
  display:none;
}


/* ========================================
   HERO
======================================== */

.hero{
  position:relative;
  overflow:hidden;
  background:
    linear-gradient(
      135deg,
      var(--navy),
      #0b2b52 58%,
      #123f70
    );
  color:white;
  padding:6.5rem 0 4.5rem;
}

.hero-media{
  position:absolute;
  inset:0;
  background:
    radial-gradient(
      circle at 80% 10%,
      rgba(247,183,49,.26),
      transparent 28%
    ),
    linear-gradient(
      90deg,
      rgba(7,24,47,.9),
      rgba(7,24,47,.35)
    );
  background-size:cover;
  background-position:center;
}

.hero-grid{
  position:relative;
  display:block;
}

.hero-copy{
  position:relative;
  max-width:850px;
}

.eyebrow{
  text-transform:uppercase;
  letter-spacing:.14em;
  font-weight:900;
  color:var(--gold);
  font-size:.78rem;
}

.hero h1{
  font-size:clamp(2.4rem,6vw,5rem);
  line-height:1.02;
  margin:.4rem 0 1rem;
}

.lead{
  font-size:1.15rem;
  color:var(--ink);
  line-height:1.8;
  max-width:850px;
}

.hero .lead{
  font-size:1.22rem;
  color:#dbeafe;
  max-width:62ch;
}

.hero-actions{
  display:flex;
  gap:.9rem;
  flex-wrap:wrap;
  margin-top:1.8rem;
}


/* ========================================
   BUTTONS
======================================== */

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:999px;
  padding:.9rem 1.2rem;
  font-weight:900;
  text-decoration:none;
  cursor:pointer;
  transition:
    transform .2s ease,
    background .2s ease,
    box-shadow .2s ease;
}

.btn.primary{
  background:var(--gold);
  color:var(--navy);
}

.btn.primary:hover{
  transform:translateY(-2px);
}

.btn.secondary{
  background:rgba(255,255,255,.12);
  color:white;
  border:1px solid rgba(255,255,255,.28);
}

.btn.secondary:hover{
  background:rgba(255,255,255,.18);
}

.btn.whatsapp{
  background:var(--whatsapp);
  color:white;
  box-shadow:0 8px 20px rgba(37,211,102,.25);
}

.btn.whatsapp:hover{
  background:#20bd5a;
  transform:translateY(-2px);
}

.btn.facebook{
  background:#1877f2;
  color:white;
}

.btn.facebook:hover{
  background:#1268d3;
  transform:translateY(-2px);
}


/* ========================================
   EMERGENCY CONTACTS
======================================== */

.emergency-section{
  background:white;
  padding:3rem 0;
  border-bottom:1px solid var(--line);
  scroll-margin-top:0;
}

.emergency-heading{
  display:grid;
  grid-template-columns:.8fr 1.2fr;
  gap:2rem;
  align-items:end;
  margin-bottom:1.5rem;
}

.emergency-heading h2{
  margin:.25rem 0 0;
}

.emergency-heading > p{
  margin:0;
  color:var(--muted);
  max-width:620px;
}

.emergency-numbers{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:1rem;
}

.emergency-numbers a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  background:var(--sky);
  border:1px solid #cfe4fb;
  border-radius:16px;
  padding:1rem 1.1rem;
  text-decoration:none;
  transition:
    transform .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
}

.emergency-numbers a:hover{
  transform:translateY(-2px);
  border-color:#9fc8ee;
  box-shadow:0 8px 20px rgba(15,76,129,.08);
}

.emergency-numbers span{
  color:var(--ink);
  font-weight:600;
}

.emergency-numbers strong{
  color:var(--blue);
  font-weight:900;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}

.emergency-footer{
  margin-top:1.25rem;
}

.emergency-note{
  margin:0 0 1.25rem;
  color:var(--muted);
  font-size:.9rem;
}

.emergency-download{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:2rem;
  padding:1.25rem 1.4rem;
  background:var(--navy);
  color:white;
  border-radius:18px;
}

.emergency-download strong{
  display:block;
  font-size:1.05rem;
  margin-bottom:.2rem;
}

.emergency-download span{
  display:block;
  color:#dbeafe;
  font-size:.92rem;
}

.emergency-download .btn{
  flex-shrink:0;
}

/* ========================================
   GENERAL SECTIONS
======================================== */

.section{
  padding:5rem 0;
  scroll-margin-top:0;
}

.section.muted{
  background:#eef5fb;
}

.section.accent{
  background:
    linear-gradient(
      135deg,
      #0d3b66,
      var(--navy)
    );
  color:white;
}

.section-head{
  max-width:760px;
  margin-bottom:1.5rem;
}

h1{
  font-size:clamp(2.5rem,5vw,4rem);
  line-height:1.08;
}

h2{
  font-size:clamp(2rem,4vw,3.2rem);
  line-height:1.08;
  margin:.4rem 0 1rem;
}

.two-col,
.social-grid{
  display:grid;
  grid-template-columns:.9fr 1.1fr;
  gap:2rem;
  align-items:start;
}

/* Two-column sections with supporting cards */
.detail-grid{
  align-items:start;
}

.detail-grid > .cards{
  margin-top:4.25rem;
}

/* Safer City partnership logo alignment */
#safer-city .detail-grid {
  align-items: stretch;
}

.safer-city-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Safer City homepage promotional banner */

.safer-city-banner {
  background: #ffffff;
}

.safer-city-banner-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  background: #f0f6fb;
  border: 1px solid #dbe6f0;
  border-radius: 18px;
}

.safer-city-banner-logo {
  width: 210px;
  max-width: 100%;
  height: auto;
  flex-shrink: 0;
}

.safer-city-banner-content {
  flex: 1;
  min-width: 0;
}

.safer-city-banner-content .eyebrow {
  margin-bottom: 0.5rem;
}

.safer-city-banner-content h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.safer-city-banner-content p:last-child {
  margin-bottom: 0;
}

.safer-city-banner-inner .btn {
  flex-shrink: 0;
}

/* Homepage white section backgrounds */
.homepage-white {
  background: #ffffff;
}

/* Sector card information alignment */

.sector-card {
  display: flex;
  flex-direction: column;
}

.sector-card > h3 {
  min-height: 5.5rem;
}

.sector-card > p:first-of-type {
  flex-grow: 1;
}

.sector-card > p:not(:first-of-type) {
  min-height: 2.8rem;
}

.sector-card > p {
  margin-bottom: 14px;
}

.sector-card > a:last-child {
  margin-top: auto;
}

/* About page - Who We Are layout */

.about-who-we-are .container > div:first-child {
  max-width: 850px;
}

.about-who-we-are .cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 30px;
}

@media (max-width: 600px) {
  .about-who-we-are .cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .safer-city-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .safer-city-banner-logo {
    width: 190px;
  }
}

/* ========================================
   TRUST STRIP
======================================== */

.trust-strip{
  background:white;
  border-bottom:1px solid var(--line);
}

.strip-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:2rem;
  padding:2rem 0;
}

.strip-grid div{
  text-align:center;
  padding:0 1rem;
}

.strip-grid strong{
  display:block;
  font-size:1.2rem;
  color:var(--blue);
  margin-bottom:.65rem;
}

.strip-grid span{
  display:block;
  color:var(--muted);
  line-height:1.7;
  max-width:300px;
  margin:auto;
}


/* ========================================
   CARDS
======================================== */

.cards,
.safety-grid,
.sector-grid{
  display:grid;
  gap:1rem;
}

.cards{
  grid-template-columns:repeat(2,1fr);
}

.safety-grid{
  grid-template-columns:repeat(3,1fr);
}

.sector-grid{
  grid-template-columns:repeat(4,1fr);
}

.card,
.sector-card,
.feature-card{
  background:white;
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:1.4rem;
  box-shadow:0 10px 30px rgba(15,76,129,.08);
}

.sector-card{
  display:flex;
  flex-direction:column;
}

.card h3,
.feature-card h3,
.sector-card h3{
  margin-top:.3rem;
}

.sector-card span{
  display:inline-block;
  background:#dceeff;
  color:var(--blue);
  padding:.3rem .65rem;
  border-radius:999px;
  font-weight:900;
  font-size:.78rem;
  margin-bottom:.7rem;
}

.feature-card ol,
.feature-card ul{
  padding-left:1.15rem;
}

.text-link,
.sector-card a{
  font-weight:900;
  color:var(--blue);
}

.programme-link{
  display:inline-block;
  margin-top:1.25rem;
}

.sector-card a{
  margin-top:auto;
  padding-top:1rem;
}



/* ========================================
   COMMUNITY SAFETY STRUCTURE
======================================== */

.structure-heading{
  margin-top:2.5rem;
  margin-bottom:1.25rem;
  max-width:780px;
}

.structure-heading > span{
  display:block;
  color:var(--blue);
  font-size:.78rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.12em;
  margin-bottom:.35rem;
}

.structure-heading h3{
  margin:.2rem 0 .5rem;
  font-size:1.45rem;
  color:var(--navy);
}

.structure-heading p{
  margin:0;
  color:var(--muted);
  line-height:1.7;
}

.programmes-heading{
  margin-top:3.5rem;
}

.programme-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:1rem;
}

.programme-card{
  display:flex;
  flex-direction:column;
  background:white;
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:1.5rem;
  box-shadow:0 10px 30px rgba(15,76,129,.08);
}

.programme-label{
  align-self:flex-start;
  display:inline-block;
  background:#dceeff;
  color:var(--blue);
  padding:.3rem .65rem;
  border-radius:999px;
  font-weight:900;
  font-size:.78rem;
  margin-bottom:.8rem;
}

.programme-card h3{
  margin:.2rem 0 .6rem;
  color:var(--navy);
}

.programme-card p{
  margin-top:0;
  color:var(--muted);
  line-height:1.7;
  flex-grow:1;
}

.programme-card a{
  color:var(--blue);
  font-weight:900;
  text-decoration:none;
  margin-top:.5rem;
}

.programme-card a:hover{
  text-decoration:underline;
}

.structure-action{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:2rem;
  margin-top:2rem;
  padding:1.4rem 1.5rem;
  background:white;
  border:1px solid var(--line);
  border-radius:var(--radius);
}

.structure-action strong{
  display:block;
  color:var(--navy);
  font-size:1.05rem;
  margin-bottom:.2rem;
}

.structure-action span{
  display:block;
  color:var(--muted);
}

.structure-action .btn{
  flex-shrink:0;
}

/* ========================================
   OFFICIAL UPDATES
======================================== */

.social-grid{
  align-items:center;
}

.social-buttons{
  display:flex;
  gap:.8rem;
  flex-wrap:wrap;
  margin-top:1.5rem;
}

.qr-card{
  background:white;
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:1.75rem;
  text-align:center;
  box-shadow:0 10px 30px rgba(15,76,129,.08);
  width:100%;
  max-width:360px;
  margin-left:auto;
}

.qr-card h3{
  margin:.2rem 0 1rem;
  color:var(--navy);
}

.qr-card img{
  display:block;
  width:200px;
  max-width:100%;
  height:auto;
  margin:0 auto 1rem;
}

.qr-card p{
  margin:0;
  color:var(--muted);
  font-size:.92rem;
  line-height:1.6;
}


/* ========================================
   COMMUNITY CALENDAR
======================================== */

.timeline{
  display:grid;
  gap:1rem;
}

.timeline article{
  display:grid;
  grid-template-columns:140px 1fr;
  gap:1rem;
  background:white;
  border:1px solid var(--line);
  border-radius:20px;
  padding:1rem;
}

.timeline time{
  font-weight:900;
  color:var(--blue);
}

.timeline h3{
  margin-top:0;
  margin-bottom:.4rem;
}

.timeline p{
  margin-top:0;
}

.calendar-action{
  margin-top:2rem;
  padding:1.5rem 1.75rem;
  background:var(--sky);
  border:1px solid #cfe4fb;
  border-radius:var(--radius);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:2rem;
}

.calendar-action p{
  margin:0;
}

.calendar-action .btn{
  flex-shrink:0;
}

/* ========================================
   GET INVOLVED & SUPPORT
======================================== */

.involve-intro{
  max-width:800px;
  margin-bottom:2rem;
}

.accent .lead{
  color:#dbeafe;
}

.involve-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:1rem;
}

.involve-card{
  display:flex;
  flex-direction:column;
  background:white;
  color:var(--ink);
  border-radius:var(--radius);
  padding:1.6rem;
  min-height:280px;
}

.involve-number{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  margin-bottom:1rem;
  border-radius:50%;
  background:var(--sky);
  color:var(--blue);
  font-weight:900;
  font-size:.85rem;
}

.involve-card h3{
  margin:.2rem 0 .65rem;
  color:var(--navy);
  font-size:1.35rem;
}

.involve-card p{
  margin-top:0;
  color:var(--muted);
  line-height:1.7;
  flex-grow:1;
}

.involve-card a{
  color:var(--blue);
  font-weight:900;
  text-decoration:none;
  margin-top:1rem;
}

.involve-card a:hover{
  text-decoration:underline;
}

.involve-action{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:2rem;
  margin-top:2rem;
  padding:1.4rem 1.5rem;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  border-radius:var(--radius);
}

.involve-action strong{
  display:block;
  color:white;
  font-size:1.05rem;
  margin-bottom:.2rem;
}

.involve-action span{
  display:block;
  color:#dbeafe;
}

.involve-action .btn{
  flex-shrink:0;
}

/* Align headings in Official Information cards */
.official-links .card h3 {
  min-height: 3.2rem;
}

/* ========================================
   CONTACT
======================================== */

.contact-options{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:1rem;
}

.contact-card{
  display:flex;
  flex-direction:column;
  background:white;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:1.5rem;
  box-shadow:0 10px 30px rgba(15,76,129,.06);
}

.contact-label{
  align-self:flex-start;
  display:inline-block;
  background:var(--sky);
  color:var(--blue);
  padding:.3rem .65rem;
  border-radius:999px;
  font-size:.78rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-bottom:.8rem;
}

.contact-card h3{
  margin:.2rem 0 .6rem;
  color:var(--navy);
}

.contact-card p{
  margin-top:0;
  color:var(--muted);
  line-height:1.7;
  flex-grow:1;
}

.contact-card a{
  color:var(--blue);
  font-weight:900;
  text-decoration:none;
  overflow-wrap:anywhere;
  margin-top:.5rem;
}

.contact-card a:hover{
  text-decoration:underline;
}

.emergency-contact-card{
  border-color:#f2c5cb;
}

.emergency-contact-card .contact-label{
  background:#fdecef;
  color:var(--red);
}

.emergency-contact-card a{
  color:var(--red);
}

.contact-notice{
  display:flex;
  align-items:center;
  gap:1rem;
  margin-top:1.25rem;
  padding:1rem 1.25rem;
  background:var(--sky);
  border:1px solid #cfe4fb;
  border-radius:16px;
}

.contact-notice strong{
  color:var(--navy);
  white-space:nowrap;
}

.contact-notice span{
  color:var(--muted);
}

/* ========================================
   FOOTER
======================================== */

.site-footer{
  background:#061121;
  color:white;
  padding:2.5rem 0 1.5rem;
}

.footer-grid{
  display:grid;
  grid-template-columns:1.3fr 1fr 1fr;
  gap:2rem;
}

.footer-grid strong{
  display:block;
  margin-bottom:.5rem;
}

.site-footer p{
  color:#b7c6d9;
  margin:.3rem 0;
  line-height:1.7;
}

.site-footer a{
  color:#dbeafe;
  text-decoration:none;
}

.site-footer a:hover{
  color:white;
  text-decoration:underline;
}

.footer-bottom{
  margin-top:2rem;
  padding-top:1.5rem;
  border-top:1px solid rgba(255,255,255,.12);
}

.footer-credentials{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:.6rem;
  color:var(--gold);
  font-size:.85rem;
  font-weight:800;
  margin-bottom:1rem;
}

.footer-divider{
  color:#64748b;
}

.footer-legal{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:2rem;
}

.footer-legal p{
  font-size:.8rem;
  max-width:650px;
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width:980px){
    
    .emergency-heading{
  grid-template-columns:1fr;
  gap:.5rem;
}

.emergency-numbers{
  grid-template-columns:repeat(2,1fr);
}

  html{
    scroll-padding-top:160px;
  }

  .utility-wrap{
    justify-content:center;
    gap:.7rem;
    font-size:.78rem;
    text-align:center;
  }

  .nav-wrap{
    align-items:center;
  }

 .real-logo{
  width:150px;
  height:auto;
  max-height:80px;
}

  .menu-toggle{
    display:inline-flex;
    border:1px solid var(--line);
    background:white;
    border-radius:999px;
    padding:.65rem .9rem;
    font-weight:900;
    cursor:pointer;
  }

  .site-nav{
    display:none;
    position:absolute;
    left:4%;
    right:4%;
    top:100%;
    background:white;
    padding:1rem;
    border-radius:20px;
    box-shadow:var(--shadow);
    flex-direction:column;
    align-items:stretch;
    gap:.4rem;
  }

  .site-nav.open{
    display:flex;
  }

  .site-nav a{
    padding:.85rem 1rem;
    border-radius:12px;
  }

  .site-nav a:hover{
    background:var(--sky);
  }

  .nav-cta{
    text-align:center;
  }

  .hero{
    padding:4rem 0 3rem;
  }

.hero-grid,
.two-col,
.social-grid{
  grid-template-columns:1fr;
}

.detail-grid > .cards{
  margin-top:0;
}

  .strip-grid{
    grid-template-columns:1fr;
    gap:1.5rem;
  }

  .sector-grid,
  .programme-grid,
  .involve-grid,
  .contact-options,
  .safety-grid,
  .cards,
  .footer-grid{
    grid-template-columns:1fr;
  }

  .timeline article{
    grid-template-columns:1fr;
  }

  .qr-card{
    margin:0 auto;
  }

  .calendar-action{
    flex-direction:column;
    align-items:flex-start;
  }

}


@media (max-width:600px){

.emergency-section{
  padding:2.25rem 0;
}

.emergency-numbers{
  grid-template-columns:1fr;
}

.emergency-download{
  flex-direction:column;
  align-items:flex-start;
}

.emergency-download .btn{
  width:100%;
}

  html{
    scroll-padding-top:150px;
  }

  .section{
    padding:3.5rem 0;
  }

  .hero{
    padding:3.5rem 0 2.5rem;
  }

  .hero h1{
    font-size:clamp(2.4rem,12vw,3.5rem);
  }

  .hero-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .hero-actions .btn{
    width:100%;
  }

  .social-buttons{
    flex-direction:column;
    align-items:stretch;
  }

  .social-buttons .btn{
    width:100%;
  }

  .calendar-action .btn{
    width:100%;
  }
  
  .structure-action{
  flex-direction:column;
  align-items:flex-start;
}

.structure-action .btn{
  width:100%;
}

.involve-action{
  flex-direction:column;
  align-items:flex-start;
}

.involve-action .btn{
  width:100%;
}

.contact-notice{
  flex-direction:column;
  align-items:flex-start;
}

.contact-notice strong{
  white-space:normal;
}

.footer-credentials{
  align-items:flex-start;
}

.footer-divider{
  display:none;
}

.footer-credentials span{
  width:100%;
}

.footer-legal{
  flex-direction:column;
  align-items:flex-start;
  gap:.75rem;
}

}