/* ==========================================
   Rogério Magrão e Banda - Responsive Styles
   Mobile-First Approach
   ========================================== */

/* ==========================================
   Mobile Styles (320px - 767px)
   Base styles are already mobile-friendly
   ========================================== */

/* ==========================================
   Tablet Styles (768px - 1023px)
   ========================================== */
@media screen and (max-width: 1023px) {

    /* Typography Adjustments */
    html {
        font-size: 15px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.75rem;
    }

    /* Navigation - Show Mobile Menu */
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }

    #nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 400px;
        height: 100vh;
        background: var(--color-secondary-dark);
        padding: 100px 2rem 2rem;
        transition: right 0.4s ease-in-out;
        box-shadow: var(--shadow-xl);
        overflow-y: auto;
    }

    #nav-menu.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-link {
        display: block;
        padding: 1rem;
        font-size: 1.3rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Mobile Menu Toggle Animation */
    .mobile-menu-toggle.active .hamburger:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .mobile-menu-toggle.active .hamburger:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active .hamburger:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* Hero Section */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .hero-logo {
        width: 280px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 350px;
        justify-content: center;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .about-image {
        max-width: 600px;
        margin: 0 auto;
    }

    /* Members Grid */
    .featured-member {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .featured-member-image {
        height: 400px;
    }

    .members-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    /* Gallery */
    .gallery-item {
        width: 350px;
        height: 260px;
    }

    /* Downloads Grid */
    .videos-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--spacing-md);
    }

    /* Downloads Grid */
    .downloads-grid {
        grid-template-columns: 1fr;
    }        

    .social-icons {
        gap: var(--spacing-sm);
    }    

    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

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

/* ==========================================
   Mobile Styles (max-width: 767px)
   ========================================== */
@media screen and (max-width: 767px) {

    /* Typography */
    html {
        font-size: 14px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.5rem;
    }

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

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

    /* Container Padding */
    .container {
        padding: 0 var(--spacing-sm);
    }

    /* Spacing Adjustments */
    :root {
        --spacing-xxl: 3rem;
        --spacing-xl: 2.5rem;
        --spacing-lg: 2rem;
    }

    /* Header */
    .logo img {
        height: 50px;
    }

    #header.scrolled .logo img {
        height: 40px;
    }

    #nav-menu {
        width: 85%;
    }

    /* Hero Section */
    .hero-section {
        min-height: auto;
        padding: var(--spacing-xl) var(--spacing-sm);
        margin-top: 70px;
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-logo {
        width: 220px;
    }

    .video-container {
        margin: var(--spacing-md) auto;
    }

    .play-button {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .scroll-indicator {
        display: none;
    }

    /* Buttons */
    .btn {
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
    }

    /* About Section */
    .about-text h3 {
        font-size: 1.8rem;
    }

    .about-text .subtitle {
        font-size: 1.3rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .history-links {
        flex-direction: column;
    }

    /* Members Grid */
    .featured-member {
        grid-template-columns: 1fr;
        padding: var(--spacing-md);
    }

    .featured-member-image {
        height: 350px;
    }

    .featured-member-info h3 {
        font-size: 1.8rem;
    }

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

    /* Gallery */
    .gallery-item {
        width: 300px;
        height: 225px;
    }

    /* Downloads Section */
    .download-category.dvd-grid .download-list {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .agency-credits {
        flex-direction: column;
        text-align: center;
    }

    /* Videos Grid */
    .videos-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .video-overlay h3 {
        font-size: 1.1rem;
    }

    .video-overlay i {
        font-size: 3rem;
    }

    /* Downloads Section */
    .download-category {
        padding: var(--spacing-md);
    }

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

    .download-link {
        padding: var(--spacing-sm);
        gap: var(--spacing-sm);
    }

    .download-link span {
        font-size: 0.95rem;
    }

    .download-link i:first-child {
        font-size: 1.2rem;
    }

    /* Contact Section */
    .form-row {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .contact-form-wrapper {
        padding: var(--spacing-md);
    }

    .contact-info {
        text-align: center;
    }

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

    .contact-item i {
        font-size: 2.5rem;
    }

    /* Footer */
    .footer {
        padding: var(--spacing-lg) 0 var(--spacing-md);
    }

    .footer-bottom {
        font-size: 0.9rem;
    }

    /* Back to Top Button */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    /* Video Modal */
    .video-modal-content {
        width: 95%;
    }

    .video-modal-close {
        top: -40px;
        font-size: 2.5rem;
    }
}

/* ==========================================
   Small Mobile Styles (max-width: 480px)
   ========================================== */
@media screen and (max-width: 480px) {

    /* Extra small adjustments */
    .hero-title {
        font-size: 1.5rem;
    }

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

    .hero-logo {
        width: 180px;
    }

    .hero-cta .btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }

    .member-image {
        height: 350px;
    }

    .social-icons a {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .download-link span {
        font-size: 0.9rem;
    }
}

/* ==========================================
   Large Desktop Styles (min-width: 1400px)
   ========================================== */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }

    .hero-title {
        font-size: 4.5rem;
    }

    .hero-subtitle {
        font-size: 2rem;
    }

    .hero-logo {
        width: 400px;
    }

    .section-title {
        font-size: 3.5rem;
    }

    .members-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .videos-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {

    /* Hide non-essential elements */
    #header,
    .mobile-menu-toggle,
    .back-to-top,
    .video-modal,
    .scroll-indicator,
    .hero-cta,
    .play-button,
    #contato {
        display: none !important;
    }

    /* Adjust colors for print */
    body {
        background: white;
        color: black;
    }

    .hero-overlay {
        opacity: 0.5;
    }

    /* Remove shadows and transitions */
    * {
        box-shadow: none !important;
        transition: none !important;
    }

    /* Page breaks */
    section {
        page-break-inside: avoid;
    }

    /* Show URLs for links */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}

/* ==========================================
   Landscape Mobile Styles
   ========================================== */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .hero-logo {
        width: 200px;
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .scroll-indicator {
        display: none;
    }
}

/* ==========================================
   Accessibility - 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;
    }

    .hero-logo {
        animation: none;
    }

    .scroll-indicator {
        animation: none;
    }
}

/* ==========================================
   High Contrast Mode
   ========================================== */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #FF4500;
        --color-secondary: #000000;
        --color-white: #FFFFFF;
    }

    .btn-outline,
    .nav-link {
        border-width: 3px;
    }
}

/* ==========================================
   Dark Mode Support (Optional)
   ========================================== */
@media (prefers-color-scheme: dark) {
    /* Keep the website in light mode always */
    /* This section can be used if dark mode is needed in future */
}

/* ==========================================
   Image Modal Responsive
   ========================================== */
@media screen and (max-width: 768px) {
    .image-modal-close {
        top: 10px;
        right: 10px;
        font-size: 2rem;
    }

    .image-modal-prev,
    .image-modal-next {
        font-size: 2rem;
        padding: 10px;
    }

    .image-modal-prev {
        left: 10px;
    }

    .image-modal-next {
        right: 10px;
    }

    #image-modal-img {
        max-width: 95%;
        max-height: 80vh;
    }
}

/* ==========================================
   Touch Device Optimizations
   ========================================== */
@media (hover: none) and (pointer: coarse) {

    /* Increase touch targets */
    .btn,
    .nav-link,
    .download-link,
    .video-card,
    .member-social {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover effects that don't work on touch */
    .video-card:hover .video-overlay {
        opacity: 0;
    }

    /* Show play button overlay always on touch devices */
    .video-overlay {
        opacity: 0.9;
    }
}