:root {
    /* Light Theme */
    --primary-color: #166534;
    --primary-gradient: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    --bg-color: #f0fdf4;
    --surface-color: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --border-color: #dcfce7;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] {
    /* Dark Theme */
    --primary-color: #4ade80;
    --primary-gradient: linear-gradient(135deg, #22c55e 0%, #14532d 100%);
    --bg-color: #022c22; /* Very dark green */
    --surface-color: #064e3b;
    --text-primary: #f0fdf4;
    --text-secondary: #d1fae5;
    --border-color: #065f46;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Header */
.salatly-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(var(--bg-color), 0.8); /* backdrop support needed but keeping simple */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Theme Toggle */
#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: transform 0.2s;
    color: var(--text-primary);
}

#theme-toggle:hover {
    transform: rotate(15deg);
    background-color: var(--surface-color);
}

#theme-toggle .icon-moon { display: none; }
[data-theme="dark"] #theme-toggle .icon-sun { display: none; }
[data-theme="dark"] #theme-toggle .icon-moon { display: inline; }

/* Hamburger */
.hamburger-menu {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hamburger-menu span {
    width: 30px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: 0.3s;
}

/* Nav Drawer */
.nav-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: var(--surface-color);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    display: flex;
    flex-direction: column;
}

.nav-drawer.active {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.drawer-title {
    font-weight: 700;
    font-size: 1.2rem;
}

.close-btn {
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.nav-drawer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-drawer a {
    display: block;
    padding: 1.5rem 2rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.nav-drawer a:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    min-height: auto; /* Changed from 100vh to auto */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--surface-color);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin: 0 0 1.5rem;
    font-weight: 700;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.cta-group {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-secondary {
    background-color: var(--surface-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Hero Visual (Image) */
.hero-visual {
    /* flex: 1; - Removed to allow more dynamic sizing */
    display: flex;
    justify-content: center;
    align-items: center; /* Center the image vertically as well */
    position: relative;
    padding: 2rem 0; /* Add some padding for visual separation */
}

.hero-image {
    max-width: 100%; /* Allow it to take full width of its container */
    height: 600px; /* Fixed height of 600px */
    object-fit: cover; /* Ensure it covers the area, cropping if necessary */
    border-radius: 20px; /* Rounded corners for the image */
    box-shadow: var(--shadow); /* Apply existing shadow variable */
}



/* Features Section */
.features {
    padding: 6rem 2rem;
    background-color: var(--surface-color);
    text-align: center;
}

.features h2 {
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

.feature-items-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid; /* Changed to grid layout */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid columns */
    gap: 2rem; /* Gap between cards */
}

.feature-item {
    background-color: var(--bg-color); /* Card background */
    padding: 2rem; /* Card padding */
    border-radius: 20px; /* Rounded corners for cards */
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow); /* Card shadow */
    
    display: flex; /* Flexbox within each card */
    flex-direction: column; /* Stack content vertically: icon then text */
    align-items: center; /* Center content horizontally */
    text-align: center; /* Center text */
    gap: 1rem; /* Reduced space between visual and text within card for compactness */
}

.feature-item:hover {
    transform: translateY(-5px);
}

/* Remove reverse class as it's not applicable in the new card layout */
.feature-item.reverse {
    flex-direction: column; /* Ensure it stays column-flex on all screens */
}

.feature-text {
    flex: none; /* Remove flex: 1 from text */
}

.feature-text h3 {
    font-size: 1.5rem; /* Adjust font size for cards */
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-text p {
    font-size: 0.95rem; /* Adjust font size for cards */
    color: var(--text-secondary);
    line-height: 1.6;
}

.feature-visual {
    flex: none; /* Remove flex: 1 from visual */
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: unset; /* Remove min-width */
}

.feature-visual .icon {
    font-size: 3rem; /* Adjust icon size for cards */
    color: var(--primary-color);
    background-color: var(--surface-color); /* Adjusted background for icon */
    border-radius: 50%;
    padding: 1rem; /* Adjusted padding for icon */
    box-shadow: none; /* Remove shadow from icon */
    border: none; /* Remove border from icon */
}

/* Footer */
footer {
    padding: 4rem 2rem 2rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--surface-color); /* Match header/surface color */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto 2rem;
    display: flex;
    flex-wrap: wrap; /* Allow columns to wrap on smaller screens */
    justify-content: space-between;
    gap: 2rem;
}

.footer-column {
    flex: 1;
    min-width: 200px; /* Minimum width for columns before wrapping */
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-column h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-column p.tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    font-size: 1.8rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.copyright {
    margin: 0;
}

.back-to-top {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
    margin-top: 0.5rem; /* For wrapping on small screens */
}

.back-to-top:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 6rem; /* Adjusted for smaller screens */
    }

    .feature-item {
        flex-direction: column;
        text-align: center;
    }

    .feature-item.reverse {
        flex-direction: column; /* Remove reverse on small screens */
    }

    .feature-visual {
        margin-top: 2rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-column {
        min-width: unset; /* Remove min-width for full-width columns */
    }

    .footer-links, .social-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .cta-group {
        flex-direction: column;
    }

    .feature-text h3 {
        font-size: 1.5rem;
    }

    .feature-visual .icon {
        font-size: 4rem;
        padding: 1.5rem;
    }
}
