/* ============================================
   MADAMECACAO V3 - RESPONSIVE DESIGN
   Mobil, Tablet ve Desktop optimizasyonu
   ============================================ */

/* ============================================
   TABLET - Medium Screens (max-width: 1024px)
   ============================================ */

@media (max-width: 1024px) {
    /* Typography adjustments */
    :root {
        --header-height: 70px;
    }

    /* Container */
    .container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    /* Section spacing */
    .section {
        padding: var(--space-4xl) 0;
    }

    /* Hero */
    .hero-logo {
        width: clamp(180px, 35vw, 350px);
    }

    .hero-title {
        font-size: clamp(2.5rem, 5vw, 4.5rem);
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
    }

    /* About Section */
    .about-content {
        gap: var(--space-2xl);
    }

    /* Product Grid */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: var(--space-xl);
    }

    /* Contact */
    .contact-content {
        gap: var(--space-2xl);
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2xl);
    }

    /* ============================================
       YENİ ÖZELLIKLER - Tablet Optimizasyonu
       ============================================ */

    /* Kardan Adam - Tablet için küçült */
    .snowman-container {
        bottom: 80px;
        right: 5%;
        transform: scale(0.8);
    }

    /* Kar taneleri - Daha az görünür */
    .snowflake {
        font-size: 0.8em;
    }

    /* Pasta animasyonları - Hafiflet */
    .pastry-item {
        font-size: 1.2em;
        opacity: 0.12;
    }
}

/* ============================================
   MOBILE - Small to Medium (max-width: 768px)
   ============================================ */

@media (max-width: 768px) {
    /* Root variables */
    :root {
        --header-height: var(--header-height-mobile);
        --space-4xl: 4rem;
        --space-5xl: 5rem;
    }

    /* Typography */
    h1 {
        font-size: var(--font-size-3xl);
    }

    h2 {
        font-size: var(--font-size-2xl);
    }

    h3 {
        font-size: var(--font-size-xl);
    }

    /* Container */
    .container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    /* Section */
    .section {
        padding: var(--space-3xl) 0;
    }

    /* ============================================
       HEADER & NAVIGATION
       ============================================ */

    .header {
        padding: var(--space-md) 0;
    }

    .header.scrolled {
        padding: var(--space-sm) 0;
    }

    .logo {
        font-size: var(--font-size-xl);
    }

    .logo-image {
        height: 40px;
    }

    .logo-text {
        font-size: var(--font-size-lg);
    }

    /* Mobile Menu */
    .mobile-menu-toggle {
        display: flex;
        z-index: var(--z-modal);
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: var(--color-dark);
        flex-direction: column;
        justify-content: flex-start;
        padding: var(--space-4xl) var(--space-xl);
        transition: right var(--transition-slow) var(--ease-out);
        z-index: var(--z-sticky);
    }

    .nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: var(--space-xl);
        width: 100%;
    }

    .nav-link {
        font-size: var(--font-size-lg);
        width: 100%;
        padding: var(--space-md) 0;
    }

    .nav-link::after {
        display: none;
    }

    /* Mobile Menu Backdrop */
    .mobile-menu-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: calc(var(--z-sticky) - 1);
    }

    .mobile-menu-backdrop.active {
        display: block;
    }

    /* ============================================
       HERO SECTION
       ============================================ */

    .hero {
        min-height: 500px;
        height: 90vh;
    }

    .hero-logo-container {
        margin-bottom: var(--space-xl);
    }

    .hero-logo {
        width: clamp(150px, 40vw, 280px);
        padding: var(--space-lg);
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
        margin-bottom: var(--space-md);
    }

    .hero-subtitle {
        font-size: var(--font-size-base);
        margin-bottom: var(--space-xl);
    }

    .hero-buttons {
        flex-direction: column;
        gap: var(--space-md);
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-scroll {
        display: none;
    }

    /* ============================================
       YENİ ÖZELLIKLER - Mobil Optimizasyonu
       ============================================ */

    /* Kardan Adam - Mobilde daha küçük ve alta taşı */
    .snowman-container {
        bottom: 50px;
        right: 5%;
        transform: scale(0.6);
    }

    /* Kar taneleri - Mobilde daha az */
    .snowflake {
        font-size: 0.7em;
        opacity: 0.8;
    }

    /* Pasta animasyonları - Mobilde daha hafif */
    .pastry-item {
        font-size: 1em;
        opacity: 0.1;
    }

    /* Hero video - Mobilde object-fit ayarı */
    .hero-background video {
        object-fit: cover;
        object-position: center;
    }

    /* ============================================
       ABOUT SECTION
       ============================================ */

    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .about-text h2 {
        text-align: center;
    }

    .about-text h2::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .about-image {
        order: -1;
    }

    /* ============================================
       PRODUCTS SECTION
       ============================================ */

    .product-filters {
        gap: var(--space-sm);
    }

    .filter-btn {
        font-size: var(--font-size-xs);
        padding: var(--space-sm) var(--space-md);
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .product-card-image {
        height: 250px;
    }

    /* ============================================
       INSTAGRAM FEED
       ============================================ */

    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    /* ============================================
       TESTIMONIALS
       ============================================ */

    .testimonial-card {
        padding: var(--space-xl);
    }

    .testimonial-text {
        font-size: var(--font-size-base);
    }

    .testimonial-avatar {
        width: 50px;
        height: 50px;
    }

    /* ============================================
       CONTACT SECTION
       ============================================ */

    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .contact-form {
        padding: var(--space-xl);
    }

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

    /* ============================================
       FOOTER
       ============================================ */

    .footer {
        padding: var(--space-3xl) 0 var(--space-xl);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

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

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

    /* ============================================
       MODAL
       ============================================ */

    .modal-content {
        max-width: 95%;
        width: 95%;
        margin: var(--space-md);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--space-lg);
    }

    .modal-title {
        font-size: var(--font-size-xl);
    }

    /* ============================================
       BUTTONS
       ============================================ */

    .btn {
        padding: var(--space-sm) var(--space-lg);
        font-size: var(--font-size-sm);
    }

    .btn-lg {
        padding: var(--space-md) var(--space-xl);
        font-size: var(--font-size-base);
    }

    /* ============================================
       CARDS
       ============================================ */

    .card-body {
        padding: var(--space-lg);
    }

    .card-footer {
        padding: var(--space-md) var(--space-lg);
        flex-direction: column;
        gap: var(--space-md);
    }

    /* ============================================
       FORMS
       ============================================ */

    .form-input,
    .form-textarea,
    .form-select {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--font-size-sm);
    }
}

/* ============================================
   SMALL MOBILE - Extra Small (max-width: 480px)
   ============================================ */

@media (max-width: 480px) {
    /* Root variables */
    :root {
        --space-3xl: 2.5rem;
        --space-4xl: 3.5rem;
        --space-5xl: 4rem;
    }

    /* Section */
    .section {
        padding: var(--space-2xl) 0;
    }

    /* Logo - Extra Small Screens */
    .logo-image {
        height: 35px;
    }

    .logo-text {
        font-size: var(--font-size-base);
    }

    /* Hero */
    .hero-logo {
        width: clamp(120px, 50vw, 200px);
        padding: var(--space-md);
    }

    .hero-title {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: var(--font-size-sm);
    }

    /* ============================================
       YENİ ÖZELLIKLER - Küçük Mobil Optimizasyonu
       ============================================ */

    /* Kardan Adam - Küçük ekranlarda gizle */
    .snowman-container {
        display: none;
    }

    /* Kar taneleri - Daha minimal */
    .snowflake {
        font-size: 0.6em;
    }

    /* Pasta animasyonları - Çok hafif */
    .pastry-item {
        font-size: 0.9em;
        opacity: 0.08;
    }

    /* Product Grid */
    .product-card-image {
        height: 200px;
    }

    /* Instagram Grid */
    .instagram-grid {
        grid-template-columns: 1fr;
    }

    /* Buttons */
    .hero-buttons {
        gap: var(--space-sm);
    }

    /* Section Title */
    .section-title h2::after {
        width: 60px;
        height: 3px;
    }

    /* Toast */
    .toast {
        min-width: auto;
        width: calc(100% - var(--space-xl) * 2);
        left: var(--space-xl);
        right: var(--space-xl);
    }

    /* Modal */
    .modal-content {
        border-radius: var(--radius-xl);
    }

    /* Footer */
    .footer-bottom {
        font-size: var(--font-size-xs);
    }
}

/* ============================================
   LARGE SCREENS - Desktop (min-width: 1536px)
   ============================================ */

@media (min-width: 1536px) {
    .container {
        max-width: var(--container-2xl);
    }

    /* Product Grid için daha fazla sütun */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }

    /* Instagram Grid */
    .instagram-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ============================================
   LANDSCAPE ORIENTATION - Mobile/Tablet
   ============================================ */

@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: var(--space-4xl) 0;
    }

    .hero-scroll {
        display: none;
    }

    .section {
        padding: var(--space-3xl) 0;
    }

    /* Landscape modda kardan adamı küçült */
    .snowman-container {
        transform: scale(0.5);
        bottom: 30px;
        right: 3%;
    }

    /* Animasyonları hafiflet */
    .snowflake,
    .pastry-item {
        opacity: 0.5;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    /* Yazdırmada gizlenecek elementler */
    .header,
    .mobile-menu-toggle,
    .hero-scroll,
    .btn,
    .modal,
    .toast,
    .loading-screen,
    .scroll-progress,
    .snowflakes,
    .snowman-container,
    .pastries-falling {
        display: none !important;
    }

    /* Sayfa ayarları */
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    /* Sayfa sonları */
    .section {
        page-break-inside: avoid;
    }

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

    /* Linkler */
    a[href]::after {
        content: " (" attr(href) ")";
    }

    /* Gölgeler ve animasyonlar */
    * {
        box-shadow: none !important;
        animation: none !important;
        transition: none !important;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
    /* Touch için daha büyük dokunma alanları */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-link {
        padding: var(--space-md) var(--space-lg);
    }

    /* Hover efektlerini devre dışı bırak */
    .hover-lift:hover,
    .hover-grow:hover,
    .hover-rotate:hover {
        transform: none;
    }

    /* Touch için animasyon sürelerini kısalt */
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.2s !important;
    }

    /* Kar ve pasta animasyonlarını optimize et */
    .snowflake,
    .pastry-item {
        will-change: auto;
    }

    /* Shimmer efektini hafiflet */
    .btn-secondary::before {
        animation-duration: 4s;
    }
}

/* ============================================
   ACCESSIBILITY - High Contrast Mode
   ============================================ */

@media (prefers-contrast: high) {
    :root {
        --color-primary: #000;
        --color-secondary: #000;
        --color-accent: #000;
        --color-light: #fff;
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* ============================================
   DARK MODE SUPPORT (gelecek için hazır)
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* Dark mode renkleri buraya eklenebilir */
    /* Şu an için devre dışı */
}
