/*
Theme Name: Leafit Custom Theme
Author: Your Name
Description: Custom CMS theme for Leafit Agency.
Version: 1.0
*/

/* =========================================
   GLOBAL THEME VARIABLES
   ========================================= */
/* Default (Light Mode) */
:root {
    --bg-color: #FAFAFA;
    --text-color: #1A1A1A;
    --accent-color: #88FFCC; /* The Mint Green from image_1.png */
    --border-color: #EAEAEA;
}

/* Dark Mode Overrides (Controlled by [data-theme="dark"] variable in JavaScript) */
[data-theme="dark"] {
    --bg-color: #1A1A1A;
    --text-color: #FAFAFA;
    --border-color: #333333;
}

/* =========================================
   RESET & TYPOGRAPHY
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* =========================================
   GLOBAL UTILITIES & BUTTONS
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.section-intro { margin-bottom: 24px; }
.subtitle { font-size: 0.9rem; font-weight: 500; color: var(--text-color); margin-bottom: 8px; }
.green-line { width: 40px; height: 2px; background-color: var(--accent-color); }

.btn-outline {
    border: 1px solid var(--text-color);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    background-color: transparent;
}

.btn-solid {
    background-color: var(--text-color); /* Mapped from old --btn-dark variable */
    color: var(--bg-color); /* Mapped from old --btn-dark-text variable */
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.site-header {
    padding: 20px 0;
    background-color: var(--bg-color);
    position: sticky; /* Changed this from relative to sticky */
    top: 0; /* Added this to tell it to stick to the very top */
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Specific styling for your two new PNG logos */
.logo-img { 
    height: 32px; 
    width: auto; 
    display: block; 
}

.desktop-nav { 
    display: flex; 
    gap: 32px; 
}

.desktop-nav a { 
    color: var(--text-color); 
    text-decoration: none; 
    font-weight: 500; 
    font-size: 0.95rem; 
}

.desktop-nav a:hover { 
    opacity: 0.7; 
}

.header-controls { 
    display: flex; 
    align-items: center; 
    gap: 24px; 
}

/* =========================================
   HEADER BUTTONS & NEW SVG TOGGLE
   ========================================= */
.header-controls { 
    display: flex; 
    align-items: center; 
    gap: 24px; 
}

.header-buttons {
    display: flex;
    gap: 12px;
}

/* Hide the two buttons on smaller screens to keep header clean */
@media (max-width: 1050px) {
    .desktop-only { display: none !important; }
}

/* NEW SVG THEME TOGGLE SWITCH */
.theme-switch { 
    position: relative; 
    display: inline-block; 
    width: 64px; /* Made slightly wider to fit the icons beautifully */
    height: 32px; 
}
.theme-switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--text-color);
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px; /* Spaces the sun/moon from the edges */
}

/* Styles the inline SVGs */
.slider svg {
    width: 16px;
    height: 16px;
    color: var(--bg-color);
    z-index: 1;
}

/* The actual circle that slides */
.toggle-circle {
    position: absolute; 
    height: 24px; 
    width: 24px; 
    left: 4px; 
    bottom: 4px;
    background-color: var(--bg-color);
    transition: .4s;
    border-radius: 50%;
    z-index: 2;
}

input:checked + .slider { 
    background-color: var(--text-color); 
}

input:checked + .slider .toggle-circle { 
    transform: translateX(32px); /* Slides perfectly over the sun */
}

/* HAMBURGER ICON */
.hamburger {
    display: none; /* Hidden by default on desktop */
    flex-direction: column; 
    justify-content: space-between;
    width: 26px; height: 18px; 
    background: none; border: none; 
    cursor: pointer; padding: 0;
}

.hamburger .bar { 
    height: 2px; width: 100%; 
    background-color: var(--text-color); 
    transition: all 0.3s ease; 
}

/* Hamburger Animation */
.hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* =========================================
   MOBILE DROPDOWN (INVERSE COLORS)
   ========================================= */
.mobile-nav {
    position: absolute; 
    top: 100%; left: 0; 
    width: 100%;
    background-color: var(--text-color); /* Mapped from old --btn-dark variable to create the perfect inverse! */
    padding: 40px 0 60px;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 32px;
    
    /* Hidden by default */
    opacity: 0; 
    visibility: hidden; 
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border-top: 1px solid rgba(128,128,128,0.2);
}

.mobile-nav.open { 
    opacity: 1; 
    visibility: visible; 
    transform: translateY(0); 
}

.mobile-nav a { 
    color: var(--bg-color); /* Mapped from old --btn-dark-text variable */
    font-size: 1.6rem; 
    text-decoration: none; 
    font-weight: 400; 
}

/* =========================================
   HERO SLIDER
   ========================================= */
.hero-section { padding: 100px 5% 40px; text-align: center; }
.hero-title { font-size: 5.5rem; font-weight: 500; line-height: 1.05; letter-spacing: -0.03em; max-width: 900px; margin: 0 auto; }
.hero-underline { width: 60px; height: 3px; background-color: var(--accent-color); margin: 32px auto; }
.hero-subtext { font-size: 1.15rem; line-height: 1.6; max-width: 600px; margin: 0 auto 40px; color: var(--text-color); opacity: 0.8; }
.hero-buttons { display: flex; justify-content: center; gap: 16px; margin-bottom: 80px; }

.hero-slider-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    max-height: 450px; 
}

.hero-slider-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    width: 100%;
}

.hero-slide {
    min-width: 100%;
    position: relative;
}

.hero-slide img {
    width: 100%; /* Force the image width within the container */
    height: 450px; 
    display: block;
    object-fit: cover; 
}

.hero-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 7rem !important; /* Forces the correct size */
    color: #FFFFFF;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin: 0;
    pointer-events: none;
    text-shadow: 0px 10px 30px rgba(0,0,0,0.15);
    white-space: nowrap !important; /* Forces the text to stay on one line */
    width: 100%; /* Gives the text full room to stretch */
    text-align: center; /* Keeps it perfectly centered */
}

/* Pagination Dots */
.hero-slider-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot.active {
    background-color: #FFFFFF;
    transform: scale(1.2);
}

/* =========================================
   CLIENT LOGOS
   ========================================= */
.client-logos-section {
    padding: 60px 0;
    border-bottom: 1px solid var(--border-color);
}

.logos-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 32px;
    margin-top: 32px;
}

.client-logo {
    max-height: 35px;
    opacity: 0.4;
    filter: grayscale(100%);
    transition: opacity 0.3s ease;
}

.client-logo:hover {
    opacity: 1; 
}

/* =========================================
   SERVICES SECTION & HOVER ANIMATION
   ========================================= */
.services-section { padding: 100px 0; }

.section-title {
    font-size: 3.5rem;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    max-width: 800px;
    margin-bottom: 60px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.service-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.service-number {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

/* Fix for the link wrapper */
.service-icon-link {
    display: block; 
}

/* The Green Box */
.service-icon-wrapper {
    background-color: var(--accent-color);
    border-radius: 8px;
    aspect-ratio: 4/3;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    overflow: hidden;
    /* Added !important and will-change to guarantee this works based on your previous video! */
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1) !important; 
    will-change: transform; 
}

.service-icon {
    width: 80px;
    height: auto;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1) !important; 
    will-change: transform;
}

/* THE PREMIUM VIDEO HOVER ANIMATION (FORCED) */
.service-card:hover .service-icon-wrapper {
    transform: scale(0.92) !important; /* Forces the green box to shrink */
}

.service-card:hover .service-icon {
    transform: scale(1.25) !important; /* Pops the black icon outward */
}

.service-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 12px; }
.service-text { font-size: 0.95rem; line-height: 1.6; color: var(--text-color); opacity: 0.8; margin-bottom: 24px; flex-grow: 1; }

.service-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    margin-top: auto;
    display: inline-block;
}

.service-link:hover { text-decoration: underline; }

/* =========================================
   STATS SECTION
   ========================================= */
.stats-section { padding: 60px 0 100px; }
.stats-grid { display: flex; justify-content: space-between; margin-top: 40px; border-bottom: 1px dashed var(--border-color); padding-bottom: 60px; }
.stat-item { flex: 1; }
.stat-value { font-size: 5.5rem; font-weight: 400; line-height: 1; letter-spacing: -0.03em; margin-bottom: 12px; }
.stat-value span { font-size: 2rem; margin-left: 4px; }
.stat-label { font-size: 0.85rem; font-weight: 500; color: var(--text-color); opacity: 0.7; }

/* =========================================
   DARK STATEMENT SECTION
   ========================================= */
.statement-section { background-color: var(--text-color); color: var(--bg-color); padding: 100px 0; }
.statement-content { max-width: 900px; margin-top: 40px; }
.statement-content p { font-size: 2.8rem; line-height: 1.3; font-weight: 400; letter-spacing: -0.01em; }

/* Magic CSS to turn normal underlines into the cool green line from image_1.png! */
.statement-content u { 
    text-decoration: none; 
    border-bottom: 4px solid var(--accent-color); 
    padding-bottom: 4px;
}

/* =========================================
   PROJECTS SECTION
   ========================================= */
.projects-section { padding: 100px 0; }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.project-card { text-decoration: none; color: var(--text-color); display: flex; flex-direction: column; }
.project-card:hover .project-img-wrapper img { transform: scale(1.05); }

.project-img-wrapper { border-radius: 8px; overflow: hidden; margin-bottom: 20px; aspect-ratio: 4/3; }
.project-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; display: block; }

.project-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.project-subtitle { font-size: 0.85rem; opacity: 0.7; margin-bottom: 16px; flex-grow: 1; }
.project-link { font-size: 0.85rem; font-weight: 600; }
.project-card:hover .project-link { text-decoration: underline; }

/* =========================================
   TEAM SECTION
   ========================================= */
.team-section { padding: 100px 0; border-top: 1px solid var(--border-color); }
.team-subtext { max-width: 800px; font-size: 0.95rem; line-height: 1.6; color: var(--text-color); opacity: 0.8; margin-bottom: 60px; }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.team-name { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.team-roles { font-size: 0.85rem; line-height: 1.8; opacity: 0.8; }

/* =========================================
   TESTIMONIALS SECTION (DARK)
   ========================================= */
.testimonials-section { background-color: var(--text-color); color: var(--bg-color); padding: 100px 0; }
.testimonials-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 60px; margin-top: 40px; }
.quote-text { font-size: 1.8rem; line-height: 1.4; font-weight: 400; margin-bottom: 24px; letter-spacing: -0.01em; }
.quote-author { font-size: 0.85rem; font-weight: 500; opacity: 0.7; }

/* =========================================
   CTA SECTION (GREEN)
   ========================================= */
.cta-section { background-color: var(--accent-color); color: #1A1A1A; padding: 100px 0; text-align: center; }
.cta-heading { font-size: 4.5rem; font-weight: 500; letter-spacing: -0.03em; margin-bottom: 24px; line-height: 1.1; }
.cta-divider { width: 60px; height: 2px; background-color: rgba(255,255,255,0.5); margin: 0 auto 24px; }
.cta-subtext { font-size: 1.1rem; margin-bottom: 40px; opacity: 0.9; }
.cta-btn { background-color: #1A1A1A; color: #FFFFFF; padding: 14px 32px; font-size: 1rem; border-radius: 6px; display: inline-block; transition: transform 0.3s ease; }
.cta-btn:hover { transform: translateY(-3px); }

/* =========================================
   FOOTER SECTION
   ========================================= */
.site-footer {
    background-color: #1A1A1A !important; /* Locks background to dark */
    color: #FFFFFF !important; /* Locks text to white */
    padding: 80px 0 40px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #FFFFFF !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.footer-line {
    width: 60px;
    height: 2px;
    background-color: var(--accent-color);
    margin-bottom: 60px;
}

.footer-columns {
    display: flex;
    justify-content: space-between;
    margin-bottom: 80px;
    max-width: 600px; 
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav a {
    color: #FFFFFF !important; /* Locks links to white */
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-address {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.95rem;
    opacity: 0.8;
    line-height: 1.5;
}

.footer-email {
    color: #FFFFFF !important; /* Locks email to white */
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-email:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-copyright {
    font-size: 0.85rem;
    opacity: 0.6;
    color: #FFFFFF !important;
}

/* =========================================
   CUSTOM LOGOS UTILITY (Safety net)
   ========================================= */
.custom-logo-img {
    max-height: 35px; /* Professional standard size */
    width: auto;
    display: block;
}

/* =========================================
   GLOBAL CONSOLIDATED RESPONSIVENESS
   ========================================= */
/* Tablet (max-width: 992px) */
@media (max-width: 992px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { flex-direction: column; gap: 40px; }
    .statement-content p { font-size: 2rem; }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    /* Global Safety Net */
    body, html {
        overflow-x: hidden; /* Prevents horizontal scrolling */
    }
    
    .container {
        padding: 0 20px; /* Consistent Mobile Padding */
    }

    /* Fixed Mobile Header Fixes - This solves image_78.png! */
    .desktop-nav { display: none !important; }
    .hamburger { display: flex !important; }
    .logo-img, .custom-logo-img { max-height: 28px; } /* Scales logos properly */

    /* Hero Slider Fixes */
    .hero-section { padding-top: 60px; }
    .hero-title { font-size: 3rem; }
    .hero-subtext { font-size: 1rem; }
    .hero-buttons { flex-direction: column; padding: 0 20px; }
    .hero-slider-container { max-height: 300px !important; }
    .hero-slide img { height: 300px !important; }
    .hero-overlay-text { font-size: 3rem !important; }

    /* Other Mobile Grids into 1 Column */
    .logos-grid { justify-content: center; }
    .section-title { font-size: 2.5rem; }
    .services-grid { grid-template-columns: 1fr; }
    .service-icon-wrapper { aspect-ratio: 16/9; }
    .projects-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: 1fr; gap: 40px; }
    .testimonials-grid { grid-template-columns: 1fr; gap: 60px; }
    
    /* Font Shrinkers */
    .stat-value { font-size: 4rem; }
    .quote-text { font-size: 1.5rem; }
    .cta-heading { font-size: 3rem; }

    /* Footer Fixes */
    .footer-columns {
        flex-direction: column;
        gap: 40px;
    }
}

/* =========================================
   RESTORED HEADER BUTTONS & TOGGLE ICONS
   ========================================= */

/* Hide the desktop button on smaller screens to keep the header clean */
@media (max-width: 992px) {
    .header-cta-btn { display: none !important; }
}

/* Make the mobile menu button contrast against the dark dropdown */
.mobile-cta-btn {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
}

/* Keep the white slider circle floating on top */
.slider:before {
    z-index: 2;
}

