/* ========================================
   TOTALCARE FACILITY SERVICES - V2
   Clean Corporate Style (KBS-inspired)
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Colors - Subtle, Professional */
    --black: #1a1a1a;
    --black-soft: #262626;
    --yellow: #FFB800;
    --yellow-hover: #E5A400;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --container-max: 1280px;
    --section-pad: clamp(5rem, 9vw, 8rem);

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: var(--font-body);
    color: var(--black);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
    font-weight: 400;
}

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--gray-50);
}

::-webkit-scrollbar-thumb {
    background-color: var(--gray-400);
    border-radius: 6px;
    border: 3px solid var(--gray-50);
    transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--yellow);
}

/* Firefox Support */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--gray-400) var(--gray-50);
}

/* ======================================== */

/* PRELOADER */
#preloader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-inner { text-align: center; }

.preloader-logo {
    height: 56px;
    margin: 0 auto 2rem;
    display: block;
    animation: preloader-pulse 1.6s ease-in-out infinite;
}

.preloader-bar {
    width: 220px;
    height: 3px;
    background: #f5f5f5;
    overflow: hidden;
    margin: 0 auto 1.25rem;
    border-radius: 2px;
    position: relative;
}

.preloader-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: #FFB800;
    border-radius: 2px;
    animation: preloader-bar-slide 1.4s ease-in-out infinite;
}

.preloader-text {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #a3a3a3;
}

@keyframes preloader-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.97); }
}

@keyframes preloader-bar-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 2.5rem);
}

/* ==========  TYPOGRAPHY ========== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--black);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 800; }
h2 { font-size: clamp(1.875rem, 3.8vw, 2.75rem); }
h3 { font-size: clamp(1.375rem, 2.4vw, 1.75rem); }
h4 { font-size: 1.125rem; }

p { color: var(--gray-700); line-height: 1.65; }

.eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 1rem;
    display: inline-block;
}

.eyebrow-yellow {
    color: var(--yellow);
}

.lead {
    font-size: clamp(1rem, 1.4vw, 1.125rem);
    color: var(--gray-700);
    line-height: 1.7;
    max-width: 620px;
}


/* ==========  NEW HEADER DESIGN ========== */
.site-header {
    width: 100%;
    z-index: 1000;
    position: relative;
    background: var(--white);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

/* TOP BAR */
.header-top-bar {
    background-color: #1f365c; /* Dark blue from example */
    color: #fff;
    font-size: 0.85rem;
    padding: 0.5rem 0;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.top-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-info svg {
    width: 16px;
    height: 16px;
}

.top-bar-social {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.top-bar-social a {
    color: #fff;
    transition: color 0.3s;
}

.top-bar-social a:hover {
    color: var(--yellow);
}

.top-bar-social svg {
    width: 16px;
    height: 16px;
}

/* MIDDLE BAR */
.header-middle {
    background: var(--white);
    padding: 1.5rem 0;
    border-bottom: 1px solid #eaeaea;
}

.middle-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.middle-logo img {
    height: 45px;
    width: auto;
}

.middle-contact {
    text-align: right;
}

.contact-label {
    font-size: 0.85rem;
    color: var(--yellow);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.1rem;
    letter-spacing: 0.05em;
}

.contact-number {
    font-size: 1.7rem;
    color: #1f365c;
    font-weight: 800;
    line-height: 1.1;
}

/* BOTTOM NAVIGATION */
.header-bottom {
    background: var(--white);
}

.bottom-inner {
    display: flex;
    justify-content: center;
}

.main-nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav-links li {
    position: relative;
}

/* Vertical separators */
.main-nav-links li:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 1px;
    background-color: #eaeaea;
}

.main-nav-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    color: #555;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
}

.main-nav-links a svg {
    width: 16px;
    height: 16px;
    color: #777;
    transition: color 0.3s;
}

.main-nav-links a:hover,
.main-nav-links a.active {
    color: #1f365c;
}

.main-nav-links a:hover svg,
.main-nav-links a.active svg {
    color: #1f365c;
}

.main-nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--yellow);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.main-nav-links a:hover::before,
.main-nav-links a.active::before {
    transform: scaleX(1);
}


/* Nav Toggle (Hamburger) */
.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--black);
    margin-left: auto;
    transition: all 0.3s var(--ease);
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }


/* Nav Toggle (Hamburger) */
.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--black);
    margin-left: auto;
    transition: all 0.3s var(--ease);
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* Mobile adjustments */


@media (max-width: 1100px) {
    .header-top-bar { display: none; }
    .middle-contact { display: none; }
    
    .header-middle { border-bottom: none; position: relative; z-index: 1001; }
    
    .nav-toggle { 
        display: flex; 
        position: relative; 
        z-index: 1002; /* Stay above the menu */
    }
    
    .nav-toggle.active span {
        background: var(--black);
    }
    
    /* Overlay for the background */
    body.menu-open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        z-index: 990;
        transition: opacity 0.4s var(--ease);
        pointer-events: none; /* Remove lock */
    }
    
    .main-nav-links.active {
        right: 0;
    }
    
    .main-nav-links li:not(:last-child)::after {
        display: none; /* remove separators */
    }
    
    .main-nav-links a {
        padding: 1.25rem 2rem;
        border-bottom: 1px solid var(--gray-100);
        font-size: 1rem;
        color: var(--black);
    }
    
    .main-nav-links a svg {
        margin-right: 0.5rem;
        color: var(--yellow);
        width: 20px;
        height: 20px;
    }
    
    .main-nav-links a::before {
        display: none; /* hide bottom border line */
    }
    
    .main-nav-links a.active {
        background: var(--gray-50);
        border-left: 4px solid var(--yellow);
        padding-left: calc(2rem - 4px);
    }
}

@media (min-width: 1101px) {
    .nav-toggle { display: none; }
}



/* ==========  BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.75rem;
    font-size: 0.938rem;
    font-weight: 600;
    transition: all 0.25s var(--ease);
    cursor: pointer;
    line-height: 1;
}

.btn-primary {
    background: var(--black);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--gray-800);
}

.btn-secondary {
    background: transparent;
    color: var(--black);
    border: 1.5px solid var(--gray-300);
}

.btn-secondary:hover {
    border-color: var(--black);
    background: var(--gray-50);
}

.btn-yellow {
    background: var(--yellow);
    color: var(--black);
}

.btn-yellow:hover {
    background: var(--yellow-hover);
}

.btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.25s var(--ease);
}

.btn:hover svg {
    transform: translateX(3px);
}

/* Text link */
.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.938rem;
    font-weight: 600;
    color: var(--black);
    border-bottom: 1.5px solid var(--yellow);
    padding-bottom: 2px;
    transition: all 0.2s var(--ease);
}

.text-link:hover {
    color: var(--yellow);
}

.text-link svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s var(--ease);
}

.text-link:hover svg {
    transform: translateX(3px);
}

/* ==========  REVEAL ANIMATIONS (subtle) ========== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

@keyframes autoReveal { to { opacity: 1; transform: translateY(0); } }
.reveal { animation: autoReveal 0.7s var(--ease) 2.5s forwards; }
.reveal.in-view { animation: none; }

/* ==========  FOOTER ========== */
.footer {
    background: var(--black);
    color: var(--white);
    padding: 5rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 4rem;
    padding-bottom: 4rem;
}

.footer-brand img {
    height: 40px;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    color: var(--gray-400);
    font-size: 0.938rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
    max-width: 320px;
}

.footer-tagline {
    font-size: 0.813rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--yellow);
}

.footer-col h4 {
    font-size: 0.813rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.75rem; }

.footer-col a {
    color: var(--gray-400);
    font-size: 0.938rem;
    transition: color 0.2s var(--ease);
}

.footer-col a:hover { color: var(--yellow); }

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.938rem;
    color: var(--gray-400);
}

.footer-contact-item svg {
    width: 18px;
    height: 18px;
    color: var(--yellow);
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.75rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: 0.813rem;
}

/* ==========  RESPONSIVE ========== */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1100px) {
    .main-nav-links {
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: calc(100vh - 65px);
        background: #ffffff;
        z-index: 9999;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 3rem 2rem;
        gap: 1.5rem;
        margin: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s var(--ease);
        overflow-y: auto;
        list-style: none;
    }
    
    .main-nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .main-nav-links li {
        width: 100%;
    }
    
    .main-nav-links a {
        font-size: 1.25rem;
        font-weight: 600;
        display: block;
        padding: 0.75rem 0;
        width: 100%;
    }
    
    .nav-cta { display: none; }
    .nav-toggle { display: flex; }
    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .footer { padding-top: 4rem; }
}

/* ========== MOBILE NAV SOCIAL LINKS ========== */
.mobile-social-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    margin-left: 2rem;
}
.mobile-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--yellow);
    border-radius: 50%;
    color: var(--black);
    transition: all 0.3s ease;
}
.mobile-social-links a svg {
    width: 18px;
    height: 18px;
}
.mobile-social-links a:hover {
    transform: scale(1.1);
}
.main-nav-links .mobile-social-links a {
    padding: 0;
    border: none;
}

@media (max-width: 1100px) {
    .mobile-social-links {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center;
        gap: 1.5rem;
        padding: 2rem 0;
        border-top: 1px solid var(--gray-100);
        margin-top: auto; /* push to bottom of drawer if there's space */
        width: 100%;
    }
    
    .main-nav-links .mobile-social-links a {
        padding: 0;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 45px;
        height: 45px;
        background: var(--gray-100);
        border-radius: 50%;
        color: var(--black);
    }
    
    .main-nav-links .mobile-social-links a.active {
        background: var(--gray-100);
        border: none;
    }
    
    .main-nav-links .mobile-social-links a:hover {
        background: var(--yellow);
    }
    
    .main-nav-links .mobile-social-links a svg {
        margin: 0;
        width: 20px;
        height: 20px;
        color: currentColor;
    }
}

/* ========== MOBILE NAV SOCIAL LINKS ========== */
.mobile-social-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    margin-left: 2rem;
}
.mobile-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--yellow);
    border-radius: 50%;
    color: var(--black);
    transition: all 0.3s ease;
}
.mobile-social-links a svg {
    width: 18px;
    height: 18px;
}
.mobile-social-links a:hover {
    transform: scale(1.1);
}
.main-nav-links .mobile-social-links a {
    padding: 0;
    border: none;
}

@media (max-width: 1100px) {
    .mobile-social-links {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center;
        gap: 1.5rem;
        padding: 2rem 0;
        border-top: 1px solid var(--gray-100);
        margin-top: auto; /* push to bottom of drawer if there's space */
        width: 100%;
    }
    
    .main-nav-links .mobile-social-links a {
        padding: 0;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 45px;
        height: 45px;
        background: var(--gray-100);
        border-radius: 50%;
        color: var(--black);
    }
    
    .main-nav-links .mobile-social-links a.active {
        background: var(--gray-100);
        border: none;
    }
    
    .main-nav-links .mobile-social-links a:hover {
        background: var(--yellow);
    }
    
    .main-nav-links .mobile-social-links a svg {
        margin: 0;
        width: 20px;
        height: 20px;
        color: currentColor;
    }
}


/* Special Nav Link for End of Lease */
.main-nav-links .special-nav-item {
    display: flex;
    align-items: center;
    margin: 0 0.5rem;
}
.main-nav-links .special-nav-item::after {
    display: none !important;
}
.main-nav-links .special-nav-item a {
    padding: 8px 16px !important;
    background-color: var(--yellow);
    color: var(--black) !important;
    border-radius: 4px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(255,184,0,0.2);
    height: auto;
}
.main-nav-links .special-nav-item a:hover {
    background-color: #e6a600;
}
.main-nav-links .special-nav-item a::before {
    display: none !important;
}
.main-nav-links .special-nav-item a svg {
    color: var(--black) !important;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  animation: marquee 20s linear infinite;
}
.animate-marquee:hover {
  animation-play-state: paused;
}

