/* ============================================================
   Abang Servis Aircond — Shared site layer
   Logo-matched palette + header + footer + image components
   Loaded by every page in addition to its inline page CSS.
   ============================================================ */

/* ---- Canonical brand palette (matches logo: royal blue + red) ---- */
:root {
    --navy-900: #001a4d;
    --navy-800: #00277a;
    --navy-700: #0038a9;   /* logo blue — primary brand */
    --navy-600: #1149c4;   /* interactive blue */
    --navy-500: #2a62de;
    --navy-400: #5683ee;
    --navy-300: #8badf5;
    --navy-100: #d4e0fb;
    --navy-50:  #eef3fe;
    --red-700:  #a8141b;
    --red-600:  #e01b22;   /* logo red — accent */
    --red-500:  #ee3940;
    --red-400:  #f4696e;
    --red-300:  #f9a3a6;
    --red-100:  #fbd9da;
    --red-50:   #fef0f0;
    --green-700: #15803d;
    --green-600: #1fb855;
    --green-500: #25D366;
    --green-50:  #f0fdf4;
    --amber-500: #f59e0b;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50:  #f9fafb;
    --white: #ffffff;
}

img { max-width: 100%; }

/* container fallback (pages already define their own; harmless if so) */
.site-header .container,
.site-footer .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* ============================================================
   SITE HEADER — sticky, logo + nav + WhatsApp
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.97);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 1px 12px rgba(0,26,77,0.05);
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 70px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: auto;
}

.site-logo img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 8px;
}

.site-logo-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 900;
    font-size: 1.05rem;
    line-height: 1.1;
    color: var(--navy-700);
    letter-spacing: -0.3px;
}

.site-logo-text span { display: block; color: var(--red-600); font-size: 0.7rem; letter-spacing: 2px; font-weight: 800; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav > a {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
    text-decoration: none;
    padding: 9px 13px;
    border-radius: 9px;
    transition: all 0.2s;
    white-space: nowrap;
}

.site-nav > a:hover { color: var(--navy-700); background: var(--navy-50); }

.site-nav > a.nav-wa {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--green-500);
    color: var(--white);
    font-weight: 700;
    padding: 10px 18px;
    box-shadow: 0 4px 14px rgba(37,211,102,0.32);
}

.site-nav > a.nav-wa:hover { background: var(--green-600); color: var(--white); transform: translateY(-1px); }
.site-nav > a.nav-wa svg { width: 16px; height: 16px; fill: currentColor; }

/* mobile burger — CSS-only toggle */
.nav-toggle { display: none; }
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    flex-shrink: 0;
}
.nav-burger span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: var(--navy-700);
    border-radius: 2px;
    transition: all 0.25s;
}

@media (max-width: 960px) {
    .nav-burger { display: flex; }
    .site-nav {
        position: fixed;
        inset: 70px 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--white);
        border-bottom: 1px solid var(--gray-200);
        box-shadow: 0 20px 40px rgba(0,26,77,0.12);
        padding: 12px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        padding-top: 0;
        padding-bottom: 0;
    }
    .nav-toggle:checked ~ .site-nav {
        max-height: 90vh;
        padding-top: 12px;
        padding-bottom: 16px;
        overflow-y: auto;
    }
    .site-nav > a { padding: 13px 14px; font-size: 0.98rem; }
    .site-nav > a.nav-wa { justify-content: center; margin-top: 8px; }
    .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
    .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 380px) {
    .site-logo-text { display: none; }
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
    background: var(--navy-900);
    color: rgba(255,255,255,0.7);
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin-top: 0;
}

.site-footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 48px;
    padding-top: 64px;
    padding-bottom: 56px;
}

.footer-brand img {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    background: var(--white);
    padding: 4px;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.75;
    margin-bottom: 20px;
    max-width: 330px;
}

.footer-wa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--green-500);
    color: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 12px 22px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}
.footer-wa:hover { background: var(--green-600); transform: translateY(-2px); }
.footer-wa svg { width: 17px; height: 17px; fill: currentColor; }

.footer-col h4 {
    color: var(--white);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 18px;
}

.footer-col a {
    display: block;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.62);
    text-decoration: none;
    padding: 6px 0;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--red-400); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 22px 0;
}
.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.footer-bottom p { font-size: 0.8rem; color: rgba(255,255,255,0.45); }

@media (max-width: 860px) {
    .site-footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; padding-top: 48px; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .site-footer-grid { grid-template-columns: 1fr; }
    .footer-bottom .container { flex-direction: column; text-align: center; }
}

/* ============================================================
   IMAGE / MEDIA COMPONENTS  — reusable across all page types
   ============================================================ */
.media {
    display: block;
    overflow: hidden;
    border-radius: 18px;
    background: var(--gray-100);
    position: relative;
}
.media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.media.shadow { box-shadow: 0 24px 60px rgba(0,26,77,0.14); }
.media.ring { border: 1px solid var(--gray-200); }

/* aspect ratios */
.ratio-1-1   { aspect-ratio: 1 / 1; }
.ratio-4-3   { aspect-ratio: 4 / 3; }
.ratio-3-4   { aspect-ratio: 3 / 4; }
.ratio-16-9  { aspect-ratio: 16 / 9; }
.ratio-3-2   { aspect-ratio: 3 / 2; }

/* floating accent badge that can sit on a photo */
.media-badge {
    position: absolute;
    left: 16px;
    bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--white);
    color: var(--navy-800);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 9px 15px;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(0,26,77,0.18);
}
.media-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red-600);
}

/* two-column image + text split */
.media-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}
.media-split.reverse .media-split-media { order: 2; }

/* responsive photo grid */
.photo-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.photo-grid .media { aspect-ratio: 4 / 3; }

/* gallery — first item large */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.photo-gallery .media:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

/* team / technician portraits */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}
.team-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
}
.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 44px rgba(0,26,77,0.12);
    border-color: transparent;
}
.team-card .media { border-radius: 0; aspect-ratio: 1 / 1; }
.team-card-body { padding: 20px 22px; }
.team-card-body h3 { font-size: 1.05rem; font-weight: 800; color: var(--gray-900); margin-bottom: 3px; }
.team-card-body p { font-size: 0.85rem; color: var(--red-600); font-weight: 600; }

/* blog / project featured image */
.featured-img {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,26,77,0.14);
    aspect-ratio: 16 / 9;
    background: var(--gray-100);
}
.featured-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* inline content image inside articles */
.content-img {
    border-radius: 16px;
    overflow: hidden;
    margin: 28px 0;
    border: 1px solid var(--gray-200);
}
.content-img img { width: 100%; display: block; }
.content-img figcaption {
    font-size: 0.82rem;
    color: var(--gray-500);
    padding: 12px 16px;
    background: var(--gray-50);
    text-align: center;
}

/* small thumbnail strip */
.thumb-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}
.thumb-strip .media { aspect-ratio: 1 / 1; border-radius: 12px; }

@media (max-width: 860px) {
    .media-split { grid-template-columns: 1fr; gap: 32px; }
    .media-split.reverse .media-split-media { order: 0; }
    .team-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
    .photo-gallery { grid-template-columns: 1fr 1fr; }
    .photo-gallery .media:first-child { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 520px) {
    .team-grid { grid-template-columns: 1fr; }
    .photo-gallery { grid-template-columns: 1fr; }
}

/* ============================================================
   AREA TECHNICIAN-IN-CHARGE  — used on location pages
   ============================================================ */
.area-lead { padding: 90px 0; background: var(--gray-50); }
.area-lead-head { text-align: center; margin-bottom: 40px; }
.area-lead-head h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--navy-900);
    line-height: 1.2;
    margin-bottom: 10px;
}
.area-lead-head p {
    color: var(--gray-500);
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

.area-lead-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 22px 60px rgba(0,26,77,0.10);
    max-width: 800px;
    margin: 0 auto;
}

.area-lead-photo { position: relative; background: var(--gray-100); }
.area-lead-photo img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.area-lead-body {
    padding: 34px 36px;
    display: flex;
    flex-direction: column;
}

.area-lead-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    align-self: flex-start;
    background: var(--red-50);
    color: var(--red-600);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 13px;
    border-radius: 50px;
    margin-bottom: 14px;
}
.area-lead-tag::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red-600);
}

.area-lead-body h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--navy-900);
    margin-bottom: 3px;
}

.area-lead-role {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--navy-700);
    margin-bottom: 14px;
}

.area-lead-bio {
    font-size: 0.92rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 18px;
}

.area-lead-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 22px;
}
.area-lead-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--gray-700);
}
.area-lead-meta span::before {
    content: '✓';
    color: var(--green-600);
    font-weight: 900;
}

.area-lead-wa {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    align-self: flex-start;
    margin-top: auto;
    background: var(--green-500);
    color: var(--white);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 13px 24px;
    border-radius: 13px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(37,211,102,0.32);
    transition: all 0.2s;
}
.area-lead-wa:hover { background: var(--green-600); transform: translateY(-2px); }
.area-lead-wa svg { width: 18px; height: 18px; fill: currentColor; }

@media (max-width: 600px) {
    .area-lead { padding: 64px 0; }
    .area-lead-card { grid-template-columns: 1fr; max-width: 420px; }
    .area-lead-photo img { min-height: 320px; }
    .area-lead-body { padding: 28px 24px; }
}
