/* Responsive CSS for GRPHARM Website */

/* Large Screens (1200px and up) */
@media screen and (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
}

/* Medium Screens (992px to 1199px) */
@media screen and (max-width: 1199px) {
    .slide-content h2 {
        font-size: 2.5rem;
    }
    
    .manifesto-content h2 {
        font-size: 2rem;
    }
    
    .logo {
        width: 150px;
    }
}

/* Tablet Screens (768px to 991px) */
@media screen and (max-width: 991px) {
    .header-inner {
        padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 2);
    }
    
    .logo {
        width: 120px;
    }
    
    .main-nav li {
        margin-left: calc(var(--spacing-unit) * 2);
    }
    
    .main-nav a {
        font-size: 0.8rem;
    }
    
    .slide {
        height: 60vh;
    }
    
    .slide-content h2 {
        font-size: 2rem;
    }
    
    .hero-tagline h1 {
        font-size: 1rem;
    }
    
    .footer-inner {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Improve product grid layout */
    .product-grid {
        gap: calc(var(--spacing-unit) * 2);
    }
    
    .category-image {
        padding-bottom: 100%; /* Square aspect ratio for better fit */
    }
    
    /* Adjust footer logo size */
    .footer-logo {
        width: 300px;
    }
}

/* Mobile Screens (481px to 767px) */
@media screen and (max-width: 767px) {
    /* Adjust header for better mobile experience */
    .header-inner {
        padding: var(--spacing-unit) calc(var(--spacing-unit) * 2);
        position: relative;
    }
    
    .logo {
        width: 100px;
    }
    
    /* Hide desktop navigation */
    .main-nav ul {
        display: none;
    }
    
    /* Improve mobile navigation */
    .nav-container {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: 0;
        background-color: var(--color-black);
        overflow: hidden;
        transition: height 0.3s ease;
        z-index: 999;
        display: flex;
        flex-direction: column;
    }
    
    .main-nav {
        width: 100%;
        overflow-y: auto; /* Allow scrolling for tall menus */
    }
    
    .main-nav.active, .nav-container.active {
        height: calc(100vh - 60px);
        border-top: 1px solid var(--color-gray);
    }
    
    .main-nav.active ul {
        display: flex;
        flex-direction: column;
        padding: calc(var(--spacing-unit) * 3);
    }
    
    .main-nav li {
        margin: 0 0 calc(var(--spacing-unit) * 3) 0;
    }
    
    .main-nav a {
        font-size: 1.2rem;
        display: block;
        padding: calc(var(--spacing-unit) * 1.5) 0; /* Larger touch target */
        color: var(--color-white);
    }
    
    /* Improve language selector */
    .language-selector {
        margin: 0 calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 3);
    }
    
    .language-buttons {
        justify-content: center;
    }
    
    .lang-btn {
        padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2); /* Larger touch target */
        font-size: 1rem;
    }
    
    /* Improve menu toggle */
    .menu-toggle {
        display: flex !important;
        width: 30px;
        height: 24px; /* Slightly larger */
        z-index: 1000;
        position: absolute;
        top: 20px;
        right: 20px;
        cursor: pointer;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }
    
    .menu-toggle span {
        transition: all 0.3s ease;
        height: 3px; /* Slightly thicker lines */
        background-color: var(--color-white);
    }
    
    /* Adjust hero section */
    .slide {
        height: 50vh;
    }
    
    .slide-content {
        left: 5%;
        width: 90%;
        text-align: center;
    }
    
    .slide-content h2 {
        font-size: 1.8rem;
        text-shadow: 0 0 10px rgba(0, 0, 0, 0.7); /* Stronger shadow for readability */
    }
    
    .hero-tagline {
        bottom: calc(var(--spacing-unit) * 2);
        left: 5%;
        width: 90%;
        text-align: center;
    }
    
    .hero-tagline h1 {
        font-size: 0.9rem;
        text-shadow: 0 0 10px rgba(0, 0, 0, 0.7); /* Stronger shadow for readability */
    }
    
    /* Adjust product grid */
    .product-grid {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 4);
    }
    
    .product-category h3 {
        font-size: 1.5rem;
        top: calc(var(--spacing-unit) * 3);
        left: calc(var(--spacing-unit) * 3);
    }
    
    /* Adjust manifesto section */
    .manifesto-content h2 {
        font-size: 1.8rem;
    }
    
    .manifesto-content p {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    
    /* Adjust footer */
    .footer-inner {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 3);
    }
    
    .footer-logo {
        width: 250px;
        margin: 0 auto calc(var(--spacing-unit) * 4) auto;
    }
    
    .footer-nav ul, .footer-social ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-nav li, .footer-social li {
        margin: 0 calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 2) 0;
    }
    
    .footer-nav a, .footer-social a {
        font-size: 1rem;
        padding: calc(var(--spacing-unit) * 0.5) 0;
    }
    
    .footer-copyright {
        text-align: center;
    }
    
    /* Adjust section padding */
    .featured-products, .manifesto, .participation {
        padding: calc(var(--spacing-unit) * 5) calc(var(--spacing-unit) * 2);
    }
    
    /* Adjust buttons */
    .btn-primary, .btn-outline {
        padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 3);
        font-size: 1rem;
        width: 100%; /* Full width buttons on mobile */
        text-align: center;
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }
}

/* Small Mobile Screens (up to 480px) */
@media screen and (max-width: 480px) {
    /* Adjust typography */
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    /* Adjust hero section */
    .slide {
        height: 40vh;
    }
    
    .slide-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-tagline h1 {
        font-size: 0.8rem;
    }
    
    /* Adjust section padding */
    .featured-products, .manifesto, .participation {
        padding: calc(var(--spacing-unit) * 4) calc(var(--spacing-unit) * 2);
    }
    
    /* Adjust buttons */
    .btn-primary, .btn-outline {
        padding: calc(var(--spacing-unit) * 1.2) calc(var(--spacing-unit) * 2);
        font-size: 0.9rem;
    }
    
    /* Adjust product categories */
    .product-category h3 {
        font-size: 1.3rem;
        top: calc(var(--spacing-unit) * 2);
        left: calc(var(--spacing-unit) * 2);
    }
    
    /* Adjust section titles */
    .section-title {
        font-size: 1.3rem;
        margin: calc(var(--spacing-unit) * 3) 0;
    }
    
    /* Adjust manifesto content */
    .manifesto-content h2 {
        font-size: 1.5rem;
        margin-bottom: calc(var(--spacing-unit) * 3);
    }
    
    .manifesto-content p {
        font-size: 1rem;
        margin-bottom: calc(var(--spacing-unit) * 2);
    }
    
    /* Adjust footer */
    .footer-logo {
        width: 200px;
    }
}

/* Extra Small Mobile Screens (up to 375px) */
@media screen and (max-width: 375px) {
    /* Further adjustments for very small screens */
    .header-inner {
        padding: var(--spacing-unit) calc(var(--spacing-unit) * 1.5);
    }
    
    .logo {
        width: 80px;
    }
    
    .slide-content h2 {
        font-size: 1.3rem;
    }
    
    .hero-tagline h1 {
        font-size: 0.7rem;
    }
    
    .product-category h3 {
        font-size: 1.2rem;
    }
    
    .featured-products, .manifesto, .participation {
        padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 1.5);
    }
    
    .footer-logo {
        width: 180px;
    }
    
    .footer-nav li, .footer-social li {
        margin: 0 calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 1.5) 0;
    }
    
    .footer-nav a, .footer-social a {
        font-size: 0.9rem;
    }
}

/* JavaScript Classes */
.menu-open {
    overflow: hidden;
}

/* Fix for product pages on mobile */
@media screen and (max-width: 767px) {
    .product-item {
        margin-bottom: calc(var(--spacing-unit) * 6);
    }
    
    .category-hero-content h1 {
        font-size: 2rem;
        text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    }
    
    .category-hero-content p {
        font-size: 1rem;
        text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    }
    
    .vote-hero h1, .contact-hero h1 {
        font-size: 2rem;
        text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    }
    
    /* Fix for contact form */
    .contact-container {
        gap: calc(var(--spacing-unit) * 3);
    }
    
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: calc(var(--spacing-unit) * 1.2);
    }
    
    /* Fix for vote page */
    .vote-grid {
        gap: calc(var(--spacing-unit) * 3);
    }
    
    .vote-item {
        margin-bottom: calc(var(--spacing-unit) * 3);
    }
    
    .vote-buttons {
        flex-direction: column;
        gap: calc(var(--spacing-unit) * 1);
    }
    
    .btn-vote {
        padding: calc(var(--spacing-unit) * 1.5);
    }
    
    .past-votes-grid {
        gap: calc(var(--spacing-unit) * 4);
    }
}
