/* ========================================
   ÁLBUM MODERNO - RESPONSIVE STYLES
   Mobile-First Responsive Design
   ======================================== */

/* ========== EXTRA LARGE SCREENS (1400px+) ========== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: var(--fs-7xl);
    }
    
    .section-title {
        font-size: var(--fs-5xl);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-6);
    }
}

/* ========== LARGE SCREENS (1200px - 1399px) ========== */
@media (max-width: 1399px) {
    .hero-title {
        font-size: var(--fs-6xl);
    }
    
    .hero-image-stack {
        height: 450px;
    }
    
    .stack-image {
        width: 220px;
        height: 280px;
    }
}

/* ========== MEDIUM SCREENS / TABLETS (992px - 1199px) ========== */
@media (max-width: 1199px) {
    :root {
        --fs-7xl: 3.5rem;
        --fs-6xl: 3rem;
        --fs-5xl: 2.5rem;
        --fs-4xl: 2rem;
    }
    
    .hero-title {
        font-size: var(--fs-5xl);
    }
    
    .section-title {
        font-size: var(--fs-4xl);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .gallery-item-wide {
        grid-column: span 2;
    }
    
    .kits-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-6);
    }
    
    .testimonials-slider {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonial-card:last-child {
        display: none;
    }
}

/* ========== TABLET (768px - 991px) ========== */
@media (max-width: 991px) {
    :root {
        --fs-6xl: 2.5rem;
        --fs-5xl: 2rem;
        --fs-4xl: 1.75rem;
        --fs-3xl: 1.5rem;
    }
    
    /* Navigation */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 15, 26, 0.98);
        backdrop-filter: blur(20px);
        padding: var(--space-6);
        border-radius: 0 0 var(--radius-xl) var(--radius-xl);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-top: none;
    }
    
    .navbar-nav {
        gap: var(--space-2);
    }
    
    .nav-link {
        padding: var(--space-3) var(--space-4) !important;
        border-radius: var(--radius-lg);
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .btn-nav-cta {
        width: 100%;
        margin-top: var(--space-4);
        text-align: center;
    }
    
    /* Hero Section */
    .hero-section {
        padding-top: 100px;
    }
    
    .hero-content {
        text-align: center;
        padding: var(--space-10) 0;
    }
    
    .hero-description {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--space-4);
    }
    
    .stat-divider {
        display: none;
    }
    
    .hero-visual {
        display: none;
    }
    
    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-item-wide {
        grid-column: span 2;
    }
    
    .gallery-item-tall {
        grid-row: span 1;
    }
    
    .gallery-filters {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Kits */
    .kits-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: 0 auto var(--space-16);
    }
    
    .kit-card {
        margin-bottom: var(--space-8);
    }
    
    .kit-featured {
        order: -1;
    }
    
    /* About */
    .about-content {
        padding-left: 0;
        margin-top: var(--space-12);
    }
    
    .about-image-container {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .about-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Testimonials */
    .testimonials-slider {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .testimonial-card:last-child {
        display: block;
    }
    
    /* Contact */
    .contact-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        margin-bottom: var(--space-8);
    }
    
    /* Footer */
    .footer-bottom .row {
        text-align: center;
    }
    
    .footer-bottom .col-md-6:last-child {
        margin-top: var(--space-2);
    }
}

/* ========== MOBILE LARGE (576px - 767px) ========== */
@media (max-width: 767px) {
    :root {
        --fs-5xl: 1.75rem;
        --fs-4xl: 1.5rem;
        --fs-3xl: 1.25rem;
        --fs-2xl: 1.125rem;
        --space-24: 4rem;
        --space-20: 3.5rem;
        --space-16: 3rem;
    }
    
    /* Sections */
    section {
        padding: var(--space-16) 0;
    }
    
    .section-header {
        margin-bottom: var(--space-10);
    }
    
    /* Hero */
    .hero-title {
        font-size: var(--fs-4xl);
    }
    
    .hero-description {
        font-size: var(--fs-base);
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .hero-stats {
        padding: var(--space-4);
    }
    
    .stat-item {
        flex: 1;
        min-width: 80px;
    }
    
    .stat-number {
        font-size: var(--fs-2xl);
    }
    
    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-3);
    }
    
    .gallery-item-wide,
    .gallery-item-tall {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .gallery-image {
        min-height: 180px;
    }
    
    .overlay-title {
        font-size: var(--fs-base);
    }
    
    .overlay-description {
        display: none;
    }
    
    /* About */
    .about-image-main img {
        height: 350px;
    }
    
    .about-image-float {
        width: 120px;
        height: 120px;
    }
    
    .about-experience-badge {
        padding: var(--space-3) var(--space-4);
    }
    
    .experience-number {
        font-size: var(--fs-2xl);
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
    }
    
    .about-stats {
        flex-direction: column;
        align-items: center;
        gap: var(--space-4);
    }
    
    /* Upload */
    .upload-dropzone {
        padding: var(--space-8);
    }
    
    .upload-preview {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Contact */
    .social-icons {
        justify-content: center;
    }
    
    /* Footer */
    .footer .row > div {
        margin-bottom: var(--space-8);
    }
    
    .footer-brand {
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-links,
    .footer-contact {
        text-align: center;
    }
    
    /* Toast */
    .toast-container {
        left: var(--space-4);
        right: var(--space-4);
        bottom: var(--space-4);
    }
    
    .toast {
        min-width: auto;
    }
    
    /* Back to Top */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: var(--space-4);
        right: var(--space-4);
    }
    
    /* Custom Cursor - Hide on mobile */
    .custom-cursor,
    .cursor-follower {
        display: none !important;
    }
}

/* ========== MOBILE SMALL (max 575px) ========== */
@media (max-width: 575px) {
    :root {
        --fs-4xl: 1.375rem;
        --fs-3xl: 1.125rem;
        --fs-2xl: 1rem;
        --space-8: 1.5rem;
    }
    
    /* Typography */
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-badge {
        font-size: var(--fs-xs);
        padding: var(--space-1) var(--space-3);
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: var(--fs-lg);
    }
    
    .brand-icon {
        width: 35px;
        height: 35px;
        font-size: var(--fs-base);
    }
    
    /* Hero */
    .hero-badge {
        font-size: var(--fs-xs);
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--space-3);
    }
    
    .stat-item {
        width: 100%;
        padding: var(--space-3);
        background: rgba(255, 255, 255, 0.03);
        border-radius: var(--radius-lg);
    }
    
    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-image {
        min-height: 220px;
    }
    
    .gallery-filters {
        gap: var(--space-2);
    }
    
    .filter-btn {
        padding: var(--space-2) var(--space-3);
        font-size: var(--fs-xs);
    }
    
    .filter-btn span {
        display: none;
    }
    
    /* Kits */
    .kit-card-inner {
        padding: var(--space-6);
    }
    
    .kit-icon {
        width: 60px;
        height: 60px;
        font-size: var(--fs-2xl);
    }
    
    .price-value {
        font-size: var(--fs-4xl);
    }
    
    /* About */
    .about-image-main img {
        height: 280px;
    }
    
    .about-image-float {
        width: 100px;
        height: 100px;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: var(--space-6);
    }
    
    .testimonial-text {
        font-size: var(--fs-base);
    }
    
    /* Contact */
    .contact-card {
        padding: var(--space-6);
    }
    
    .contact-form-container {
        padding: var(--space-6);
    }
    
    .contact-icon {
        width: 45px;
        height: 45px;
    }
    
    /* Upload */
    .upload-container {
        padding: var(--space-6);
    }
    
    .upload-icon {
        width: 60px;
        height: 60px;
        font-size: var(--fs-2xl);
    }
    
    .dropzone-icon {
        font-size: var(--fs-4xl);
    }
    
    .upload-preview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Loading Screen */
    .loading-3d-cube {
        width: 80px;
        height: 80px;
    }
    
    .cube-face {
        width: 80px;
        height: 80px;
        font-size: var(--fs-2xl);
    }
    
    .cube-face.front  { transform: rotateY(0deg) translateZ(40px); }
    .cube-face.back   { transform: rotateY(180deg) translateZ(40px); }
    .cube-face.right  { transform: rotateY(90deg) translateZ(40px); }
    .cube-face.left   { transform: rotateY(-90deg) translateZ(40px); }
    .cube-face.top    { transform: rotateX(90deg) translateZ(40px); }
    .cube-face.bottom { transform: rotateX(-90deg) translateZ(40px); }
    
    .loading-title {
        font-size: var(--fs-2xl);
    }
    
    .loading-progress-container {
        width: 200px;
    }
}

/* ========== LANDSCAPE MOBILE ========== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 100px 0 var(--space-10);
    }
    
    .hero-content {
        padding: var(--space-6) 0;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    .loading-screen {
        overflow-y: auto;
    }
}

/* ========== HIGH DPI SCREENS ========== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .gallery-image img,
    .about-image-main img,
    .about-image-float img,
    .stack-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ========== DARK MODE PREFERENCE ========== */
@media (prefers-color-scheme: dark) {
    /* Already dark theme, no changes needed */
}

/* ========== PRINT STYLES ========== */
@media print {
    .loading-screen,
    .custom-cursor,
    .cursor-follower,
    .back-to-top,
    .toast-container,
    .hero-canvas-container,
    .floating-elements,
    .scroll-indicator {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .glass-nav {
        position: relative;
        background: white;
        box-shadow: none;
    }
    
    section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .hero-section {
        min-height: auto;
        background: white;
    }
    
    .btn {
        border: 1px solid black;
    }
}

/* ========== ACCESSIBILITY - FOCUS VISIBLE ========== */
@media (prefers-reduced-motion: no-preference) {
    :focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
        transition: outline-offset 0.2s ease;
    }
}

/* ========== HOVER MEDIA QUERY ========== */
@media (hover: hover) and (pointer: fine) {
    /* Enable hover effects only for devices that support it */
    .gallery-item:hover .gallery-image img {
        transform: scale(1.1);
    }
    
    .gallery-item:hover .gallery-overlay {
        opacity: 1;
    }
    
    .kit-card:hover .kit-card-inner {
        border-color: rgba(99, 102, 241, 0.3);
        box-shadow: var(--shadow-glow);
    }
    
    .testimonial-card:hover {
        transform: translateY(-5px);
    }
}

/* Disable hover effects on touch devices */
@media (hover: none) {
    .gallery-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    }
    
    .overlay-content {
        transform: translateY(0);
    }
    
    .tilt-effect:hover {
        transform: none;
    }
}

/* ========== SAFE AREA INSETS (Notched Phones) ========== */
@supports (padding: max(0px)) {
    .glass-nav {
        padding-left: max(var(--space-4), env(safe-area-inset-left));
        padding-right: max(var(--space-4), env(safe-area-inset-right));
    }
    
    .footer {
        padding-bottom: max(var(--space-6), env(safe-area-inset-bottom));
    }
    
    .toast-container {
        bottom: max(var(--space-6), env(safe-area-inset-bottom));
        right: max(var(--space-6), env(safe-area-inset-right));
    }
    
    .back-to-top {
        bottom: max(var(--space-6), env(safe-area-inset-bottom));
        right: max(var(--space-6), env(safe-area-inset-right));
    }
}

/* ========== CONTAINER QUERIES (Future-proof) ========== */
@supports (container-type: inline-size) {
    .gallery-grid {
        container-type: inline-size;
    }
    
    @container (max-width: 600px) {
        .gallery-item {
            grid-column: span 1 !important;
        }
    }
}
