/* MaachiClean Clone - Premium Styles */

:root {
    /* Color Palette - Refined */
    --primary-color: #0490B0;
    --primary-hover: #037a96;
    --accent-color: #05C1EC;
    --text-dark: #1D1E20;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    
    /* Typography */
    --heading-font: 'Caudex', serif;
    --body-font: 'DM Sans', sans-serif;
    
    /* Spacing & Borders */
    --container-width: 1280px;
    --section-padding: 100px 0;
    --border-radius: 16px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 4px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    border-radius: inherit;
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.section {
    padding: var(--section-padding);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Buttons - Premium Look */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(4, 144, 176, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(4, 144, 176, 0.45);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Header - Sticky Glassmorphism */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 25px 0;
    transition: var(--transition);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding: 12px 0;
    box-shadow: var(--shadow-md);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: var(--white) !important;
}

header.scrolled .logo a {
    color: var(--primary-color) !important;
}

.logo img {
    height: 55px;
    transition: var(--transition);
}

/* Make logo white when header is not scrolled */
header:not(.scrolled) .logo img {
    filter: brightness(0) invert(1);
}

header.scrolled .logo img {
    height: 45px;
}

nav ul {
    display: flex;
    gap: 40px;
}

nav ul li a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--white); /* White text by default on hero */
    position: relative;
    padding: 5px 0;
}

header.scrolled nav ul li a {
    color: var(--text-dark); /* Dark text when scrolled */
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    animation: fadeInUp 1s ease-out;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
    animation: fadeInUp 1.2s ease-out;
}

/* Service Cards - Premium Grid */
.services-grid, .services-full-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: clamp(32px, 6vw, 72px);
}

.service-card, .service-item {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.service-card:hover, .service-item:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
}

.service-card img, .service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-card:hover img {
    transform: scale(1.08);
}

/* Stats Section */
.stat-item h3 {
    font-size: 4rem;
    margin-bottom: 5px;
    background: linear-gradient(to right, #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Testimonials */
.testimonial-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    position: relative;
}

/* WhatsApp Floating - Premium */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: #25d366;
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.15) rotate(10deg);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    position: relative;
    cursor: pointer;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 1.75rem;
    color: var(--white);
}

.menu-toggle svg,
.menu-toggle i {
    display: none;
}

.menu-toggle::before,
.menu-toggle::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.25s ease;
}

.menu-toggle::before {
    transform: translateY(-5px);
}

.menu-toggle::after {
    transform: translateY(5px);
}

.menu-toggle[aria-expanded='true']::before {
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded='true']::after {
    transform: rotate(-45deg);
}

header.scrolled .menu-toggle {
    color: var(--primary-color);
}

@media (max-width: 992px) {
    .menu-toggle {
        display: inline-flex;
        position: relative;
        z-index: 3;
    }

    body.menu-open::before {
        content: '';
        position: fixed;
        inset: 0;
        z-index: 900;
        background: rgba(12, 12, 9, 0.45);
    }

    header {
        padding: 18px 0;
    }

    header.scrolled {
        padding: 10px 0;
    }

    .logo a {
        gap: 8px !important;
        font-size: clamp(1.35rem, 6vw, 1.7rem) !important;
    }

    .logo svg {
        width: 26px !important;
        height: 26px !important;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: 0;
        width: min(84vw, 360px);
        height: 100dvh;
        padding: 96px 28px 32px;
        overflow-y: auto;
        visibility: hidden;
        transform: translateX(100%);
        background: var(--white);
        transition: transform 0.3s ease, visibility 0.3s;
        box-shadow: var(--shadow-lg);
    }
    
    nav.active {
        visibility: visible;
        transform: translateX(0);
    }
    
    nav ul {
        flex-direction: column;
        gap: 25px;
    }
    
    nav ul li a {
        display: block;
        padding: 8px 0;
        color: var(--text-dark) !important;
        font-size: 1.25rem;
        line-height: 1.35;
    }
    
    .header-actions {
        display: none;
    }
    
    .section {
        padding: clamp(56px, 9vw, 76px) 0;
    }
    
    .hero-content h1 {
        font-size: clamp(2.75rem, 9vw, 4rem) !important;
    }

    .services-grid,
    .services-full-grid,
    .testimonials-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 24px !important;
    }

    .about-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }
}

/* Internal Page Styles */
.page-hero {
    background-color: var(--text-dark);
    padding: 180px 0 100px;
    color: var(--white);
    text-align: center;
}

.page-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

@media (max-width: 640px) {
    .container {
        width: calc(100% - 32px);
    }

    .hero {
        height: auto !important;
        min-height: 100svh;
        padding: 118px 0 48px !important;
        background-position: 58% center !important;
    }

    .hero-content {
        max-width: none !important;
    }

    .hero-content h1 {
        margin-bottom: 18px !important;
        font-size: clamp(2.6rem, 13vw, 3.5rem) !important;
        line-height: 1.02 !important;
        overflow-wrap: anywhere;
    }

    .hero-content p {
        margin-bottom: 28px !important;
        font-size: 1.08rem !important;
        line-height: 1.55;
    }

    .hero-btns {
        flex-direction: column;
        gap: 12px !important;
    }

    .hero-btns .btn,
    .section .btn {
        width: 100%;
        min-height: 48px;
        padding: 12px 20px;
    }

    .section-title {
        margin-bottom: 32px !important;
        text-align: left !important;
    }

    .section-title h2,
    .section > .container > h2 {
        font-size: clamp(2rem, 10vw, 2.6rem) !important;
        line-height: 1.08;
    }

    .service-card img,
    .service-img img,
    .service-item > img {
        height: 210px !important;
    }

    .service-card:hover,
    .service-item:hover,
    .btn:hover {
        transform: none;
    }

    .uvc-banner {
        min-height: 460px !important;
        padding: 72px 0 !important;
        background-position: 35% center !important;
    }

    .uvc-banner .container {
        justify-content: flex-start !important;
    }

    .uvc-banner .container > div {
        width: 100%;
        max-width: none !important;
        text-align: left !important;
    }

    .uvc-banner h2 {
        font-size: clamp(2.65rem, 13vw, 3.6rem) !important;
        line-height: 1.02 !important;
    }

    .tamuje-layout {
        width: 100%;
    }

    .tamuje-layout > div {
        min-width: 0 !important;
        flex-basis: 100% !important;
    }

    .tamuje-copy {
        padding: 48px 24px 56px !important;
    }

    .tamuje-copy h2 {
        font-size: 2.25rem !important;
        line-height: 1.08;
    }

    .testimonials-grid > div {
        padding: 28px 24px !important;
    }

    .pattern-divider {
        margin-top: 72px !important;
    }

    .page-hero {
        padding: 64px 0 48px !important;
        text-align: left;
    }

    .page-hero h1 {
        font-size: clamp(2.25rem, 11vw, 3rem) !important;
        line-height: 1.05;
        overflow-wrap: anywhere;
    }

    .page-hero p {
        font-size: 1.05rem !important;
        line-height: 1.6;
    }

    .impact-hero {
        display: grid !important;
        width: 100%;
    }

    .impact-hero > div {
        min-width: 0 !important;
    }

    .impact-hero-copy {
        padding: 48px 24px 56px !important;
    }

    .impact-stats {
        position: static !important;
        display: grid !important;
        grid-template-columns: 1fr;
        min-width: 0 !important;
        margin-top: 16px;
        padding: 28px 20px !important;
        box-shadow: none !important;
    }

    .impact-stats h3 {
        font-size: 2rem !important;
    }

    .home-stats {
        position: static !important;
        width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px !important;
        margin-top: 12px;
        padding: 24px 18px !important;
        box-shadow: none !important;
    }

    .home-stats h3 {
        font-size: 1.75rem !important;
    }

    .clients-slider {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-items: center;
        gap: 28px 20px !important;
    }

    footer {
        padding: 48px 0 88px !important;
    }

    footer .container > div:first-child > div {
        min-width: 0 !important;
        flex-basis: 100% !important;
    }

    footer img {
        max-width: 120px;
        height: 40px !important;
        object-fit: contain;
    }

    .whatsapp-float {
        right: 18px;
        bottom: max(18px, env(safe-area-inset-bottom));
        width: 56px;
        height: 56px;
        font-size: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
