/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Modern Social App Gradient */
    --primary-gradient: linear-gradient(135deg, #ff416c, #ff4b2b); 
    --primary-color: #ff4b2b;
    --text-dark: #1a1a1a;
    --text-light: #555;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
}

body {
    font-family: "Segoe UI", Tahoma, Verdana, Geneva, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    /* IMPORTANT: Push content down so it doesn't hide behind the fixed header */
    padding-top: 100px; 
}

a {
    text-decoration: none;
    transition: 0.3s ease;
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3 {
    color: var(--text-dark);
    font-weight: 700;
    margin-top: 0;
}

/* =========================================
   2. HEADER SECTION (Sticky & Folding)
   ========================================= */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed; /* Fixes header to top */
    width: 100%;     /* Ensures it spans full width */
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 15px 0; /* Default larger padding */
    transition: all 0.3s ease-in-out; /* Smooth folding animation */
}

/* The folded state activated by JS */
header.scrolled {
    padding: 5px 0; /* Shrinks height */
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    background: rgba(255, 255, 255, 0.98);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* Ensure logo behaves well during shrink */
.logo img {
    transition: transform 0.3s ease;
}

header.scrolled .logo img {
    transform: scale(0.9); /* Slight shrink effect for logo */
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1rem;
}

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

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 60px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 20px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 35px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* =========================================
   4. BUTTONS
   ========================================= */
.download-btn {
    display: inline-block;
    font-weight: 700;
    background: var(--primary-gradient);
    border: none;
    padding: 14px 35px;
    font-size: 16px;
    color: white !important;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 75, 43, 0.4);
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 75, 43, 0.6);
}

/* =========================================
   5. FEATURES GRID
   ========================================= */
.features {
    padding: 80px 0;
    text-align: center;
    background-color: var(--white);
}

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

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-item {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    border: 1px solid #eee;
    transition: transform 0.3s ease;
}

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

.feature-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 20px auto;
}

/* =========================================
   6. HOW IT WORKS & TESTIMONIALS
   ========================================= */
.how-it-works {
    background: #fff5f5;
    padding: 80px 0;
    text-align: center;
}

.steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

/* Reuse feature item style for steps */
.step, .testimonial-item {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    flex: 1;
    min-width: 250px;
    max-width: 350px;
}

.step img {
    width: 100%;
    max-width: 200px;
    margin: 0 auto 15px;
    border-radius: 10px;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.testimonial-item img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    border: 3px solid var(--primary-color);
    object-fit: cover;
}

.testimonial-item h4 {
    color: var(--primary-color);
    margin-top: 15px;
}

/* =========================================
   7. FOOTER & LEGACY SUPPORT
   ========================================= */
/* Legacy classes for policy pages */
.csae, .safety-measures, .reporting-abuse, .parental-notification, .contact-info {
    background: var(--white);
    margin: 20px 0;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

footer {
    background: var(--text-dark);
    color: #fff;
    padding: 40px 0;
    text-align: center;
}

.footer-copyright {
    opacity: 0.7;
    margin-top: 20px;
}

/* =========================================
   8. MOBILE RESPONSIVENESS & HAMBURGER
   ========================================= */

/* Hamburger Icon (Hidden on Desktop) */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 3px;
    transition: 0.3s;
}

@media (max-width: 768px) {
    /* Adjust Body Padding */
    body {
        padding-top: 70px;
    }

    /* Stack Hero Section */
    .hero {
        flex-direction: column;
        text-align: center;
        margin-top: 20px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    /* Show Hamburger on Mobile */
    .hamburger {
        display: flex;
    }

    /* Mobile Menu - Hidden by Default */
    .nav-links {
        display: none; /* Hide links initially */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%; /* Position right below header */
        left: 0;
        background: rgba(255, 255, 255, 0.98);
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        text-align: center;
        backdrop-filter: blur(10px);
    }

    /* Mobile Menu - Active State (Visible via JS) */
    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease forwards;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .nav-links li {
        margin: 10px 0;
    }

    .nav-links .download-btn {
        width: 80%; /* Make button wide on mobile */
        margin: 0 auto;
    }
}