/* Fish & Inja Foundation - Responsive Styles */

/* ===== ANIMATIONS ===== */
@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== LARGE DEVICES (Desktops, 992px and up) ===== */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .header-logo {
        height: 120px;
    }

    .site-title {
        font-size: 2.2rem;
    }
}

/* ===== MEDIUM DEVICES (Tablets, 768px to 991.98px) ===== */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .nav-menu li a {
        padding: 15px 12px;
        font-size: 0.9rem;
    }

    .nav-menu li a i {
        margin-right: 5px;
    }

    .hero-section h1 {
        font-size: 2.2rem;
    }

    .hero-section .subtitle {
        font-size: 1.1rem;
    }

    .gallery-grid,
    .video-grid,
    .sponsor-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }

    .logo-container {
        gap: 20px;
    }

    .header-logo {
        height: 100px;
    }

    .site-title {
        font-size: 2rem;
    }

    .site-tagline {
        font-size: 1rem;
    }
}

/* ===== SMALL DEVICES (Landscape Phones, 576px to 767.98px) ===== */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-stats {
        justify-content: center;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    .menu-toggle {
        display: block;
        width: 100%;
        text-align: left;
        padding: 15px 20px;
        background: var(--deep-blue);
        color: white;
        cursor: pointer;
        border: none;
        font-size: 1.2rem;
    }

    .menu-toggle:hover {
        background: var(--medium-blue);
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        margin: 0;
        padding: 0;
    }

    .nav-menu.show {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        text-align: left;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu li a {
        padding: 15px 20px;
        width: 100%;
        display: block;
        text-align: left;
    }

    .nav-menu li a i {
        width: 25px;
        text-align: center;
    }

    .hero-section {
        padding: 60px 0;
    }

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

    .hero-section .subtitle {
        font-size: 1rem;
    }

    .gallery-grid,
    .video-grid,
    .sponsor-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        text-align: center;
    }

    .logo-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-logo {
        height: 100px;
        margin: 0 auto;
    }

    .header-text {
        text-align: center;
    }

    .site-title {
        font-size: 1.8rem;
    }

    .site-tagline {
        font-size: 0.95rem;
    }
}

/* ===== EXTRA SMALL DEVICES (Portrait Phones, less than 576px) ===== */
@media (max-width: 575.98px) {
    .container {
        width: 95%;
        padding: 0 10px;
    }

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

    .top-bar .contact-info span {
        display: block;
        margin: 5px 0;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-stats {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .stat-badge {
        width: 100%;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .logo p {
        font-size: 0.9rem;
    }

    .menu-toggle {
        display: block;
        width: 100%;
        text-align: left;
        padding: 15px 20px;
        background: var(--deep-blue);
        color: white;
        cursor: pointer;
        border: none;
        font-size: 1.2rem;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
    }

    .nav-menu.show {
        display: flex;
    }

    .nav-menu li a {
        text-align: left;
        padding: 12px 20px;
    }

    .hero-section {
        padding: 40px 0;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .hero-section .subtitle {
        font-size: 0.9rem;
    }

    .gallery-grid,
    .video-grid,
    .sponsor-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 15px;
    }

    .card h2 {
        font-size: 1.5rem;
    }

    .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }

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

    #back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .modal-content {
        max-width: 95%;
        margin: 10px auto;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
        margin: 5px 0;
    }

    /* Gallery mobile responsive */
    @media screen and (max-width: 768px) {
        .gallery-grid {
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 20px;
        }

        .gallery-title {
            font-size: 1.1rem;
        }

        .gallery-info {
            padding: 15px;
        }

        .gallery-modal-content-wrapper {
            padding: 20px;
            min-height: 70vh;
        }

        .gallery-modal-close {
            top: 10px;
            right: 20px;
            font-size: 35px;
            width: 45px;
            height: 45px;
        }

        .gallery-modal-caption {
            font-size: 1.1rem;
        }

        .gallery-modal-meta {
            flex-direction: column;
            gap: 10px;
            align-items: center;
        }
    }

    @media screen and (max-width: 480px) {
        .gallery-grid {
            grid-template-columns: 1fr;
            gap: 20px;
        }

        .gallery-image-container {
            aspect-ratio: 16 / 9;
        }

        .gallery-modal-content-wrapper {
            padding: 15px;
        }

        .gallery-modal-close {
            width: 40px;
            height: 40px;
            font-size: 30px;
        }
    }

    @media screen and (max-width: 360px) {
        .gallery-item {
            height: 200px;
        }

        .no-images i {
            font-size: 4rem;
        }

        .no-images h3 {
            font-size: 1.3rem;
        }
    }

    /* Header mobile */
    .logo-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-logo {
        height: 80px;
        margin: 0 auto;
    }

    .header-text {
        text-align: center;
    }

    .site-title {
        font-size: 1.5rem;
    }

    .site-tagline {
        font-size: 0.85rem;
        padding: 0 10px;
    }
}

/* ===== VERY SMALL PHONES ===== */
@media screen and (max-width: 360px) {
    .header-logo {
        height: 70px;
    }

    .site-title {
        font-size: 1.3rem;
    }

    .site-tagline {
        font-size: 0.8rem;
    }
}

/* ===== DESKTOP (min-width: 769px) ===== */
@media screen and (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }

    .nav-menu {
        display: flex !important;
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {

    .btn,
    .nav-menu li a,
    .gallery-item,
    .sponsor-item {
        min-height: 44px;
        min-width: 44px;
    }

    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        padding: 20px 0;
    }

    .modal-content {
        max-height: 70vh;
    }
}

/* ===== HIGH RESOLUTION SCREENS ===== */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .logo h1 {
        font-weight: 600;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #f0f0f0;
    }

    .card {
        background-color: #2d2d2d;
        color: #f0f0f0;
    }

    .card h2,
    .card h3 {
        color: var(--accent-gold);
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        background-color: #3d3d3d;
        color: #f0f0f0;
        border-color: #4d4d4d;
    }

    .stat-item {
        background-color: #2d2d2d;
    }

    .sponsor-item {
        background-color: #2d2d2d;
    }

    .video-item {
        background-color: #2d2d2d;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== FOLDABLE DEVICES ===== */
@media (spanning: single-fold-vertical) {
    .container {
        width: calc(env(fold-left) - 20px);
    }
}

/* ===== PRINT STYLES ===== */
@media print {

    .top-bar,
    nav,
    footer,
    .btn,
    .newsletter-form,
    #back-to-top,
    .modal,
    .social-links,
    .footer-social {
        display: none !important;
    }

    body {
        background: white;
        color: black;
        font-size: 12pt;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    h1,
    h2,
    h3 {
        page-break-after: avoid;
    }

    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
}

@media screen and (max-width: 992px) {
    .contact-grid {
        gap: 20px;
    }
}

@media screen and (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-form-wrapper,
    .contact-info-wrapper {
        padding: 20px;
    }

    .info-item {
        padding: 12px 0;
    }

    .info-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form button {
        width: 100%;
    }

    .map-container iframe {
        height: 350px;
    }
}

@media screen and (max-width: 480px) {

    .contact-form-wrapper,
    .contact-info-wrapper {
        padding: 15px;
    }

    .info-card {
        padding: 15px;
    }

    .info-item {
        gap: 10px;
    }

    .info-content h4 {
        font-size: 0.95rem;
    }

    .info-content p {
        font-size: 0.9rem;
    }

    .map-container iframe {
        height: 300px;
        
    }

    .btn-submit {
        padding: 12px;
        font-size: 1rem;
    }
}

@media screen and (max-width: 768px) {
    .impact-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .impact-before, .impact-after {
        aspect-ratio: 4 / 3;
    }
    
    .impact-title {
        font-size: 1.1rem;
    }
    
    .impact-info {
        padding: 15px;
    }
}

@media screen and (max-width: 480px) {
    .impact-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .impact-before, .impact-after {
        aspect-ratio: 1 / 1;
    }
}
