/* ------------------------------------------------------------------
    HEADER STYLESHEET
    Description: Styling for the responsive header section including
    logo, navigation menu, mobile responsiveness, and Play Store link.
------------------------------------------------------------------ */

/* -------------------- Base Header Layout -------------------- */

/* Container for the entire header bar */
.site-header {
    background: linear-gradient(135deg, #f3f4f6, #e0e7ff); /* Soft gradient background */
    padding: 20px 0;
    color: #333; /* Dark text for readability */
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle drop shadow */
    position: relative;
}

/* Wrapper for header content to keep it centered */
.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* -------------------- Logo -------------------- */

/* Logo image styling */
.logo img {
    width: 150px; /* Fixed size for consistent branding */
}

/* -------------------- Mobile Hamburger Menu -------------------- */

/* Hamburger menu is hidden on desktop */
.menu-icon {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    z-index: 1001; /* Keeps it clickable above the nav */
}

/* Hamburger bars */
.menu-icon .bar {
    width: 35px;
    height: 5px;
    background-color: #333;
    border-radius: 5px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* Animate hamburger to X on toggle */
.menu-icon.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.menu-icon.active .bar:nth-child(2) {
    opacity: 0;
}
.menu-icon.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* -------------------- Navigation Menu -------------------- */

/* Default desktop menu layout */
.main-nav {
    display: flex;
    gap: 20px; /* Spacing between menu items */
}

/* Individual navigation links */
.main-nav a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    padding: 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Hover effect for links */
.main-nav a:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #3b82f6; /* Calming blue on hover */
    border-radius: 5px;
}

/* -------------------- Play Store Icon -------------------- */

/* Container for Play Store icon */
.header-playstore a {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

/* Hover zoom effect */
.playstore-icon:hover {
    transform: scale(1.1);
}

/* -------------------- Mobile Responsiveness -------------------- */

/* Small screens: phones, small tablets */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Hide nav menu by default on mobile */
    .main-nav {
        display: none;
        flex-direction: column;
        gap: 15px;
        background: rgba(255, 255, 255, 0.95);
        padding: 20px;
        width: 100%;
        position: absolute;
        top: 70px;
        right: 20px;
        border-radius: 10px;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease-in-out;
    }

    /* Show hamburger icon on mobile */
    .menu-icon {
        display: flex;
    }

    /* When menu-icon is active, show the nav */
    .menu-icon.active + .main-nav {
        display: flex;
        transform: translateY(0);
    }

    /* Mobile nav item styling */
    .main-nav a {
        font-size: 18px;
        padding: 12px 0;
        text-align: center;
        width: 100%;
        border-bottom: 1px solid #ddd;
    }

    /* Mobile hover */
    .main-nav a:hover {
        background-color: #f3f4f6;
        color: #3b82f6;
    }

    /* Resize Play Store icon for mobile */
    .playstore-icon {
        width: 130px;
        margin-top: 20px;
    }
}

/* -------------------- Tablet Responsiveness -------------------- */

@media (max-width: 1024px) {
    .site-header {
        flex-direction: column;
        align-items: center;
    }

    .main-nav {
        gap: 10px;
    }

    .playstore-icon {
        width: 140px;
    }
}

/* -------------------- Desktop Optimization -------------------- */

@media (min-width: 1024px) {
    .site-header {
        flex-direction: row;
        justify-content: space-between;
        padding: 20px 40px;
    }

    .main-nav {
        display: flex;
        gap: 20px;
    }

    .playstore-icon {
        width: 150px;
    }
}
