/**
 * Homepage Compact Styles
 */

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

.hero-gallery-section {
    width: 100%;
    margin-top: -80px;
    padding-top: 80px;
    overflow: hidden;
}

/* Desktop Slider - 1920x400px (Tam uyumlu) */
.hero-gallery-desktop {
    display: block;
}

.gallery-slider-desktop {
    position: relative;
    width: 100%;
    max-width: 1920px; /* Maksimum genişlik: 1920px */
    margin: 0 auto;
    height: 400px; /* Sabit yükseklik: 400px */
    overflow: hidden;
}

.gallery-slide-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: block;
    text-decoration: none;
    color: inherit;
}
.gallery-slide-link:has(.active) {
    z-index: 2;
}

.gallery-slide-desktop,
.gallery-slide-link .gallery-slide-desktop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.gallery-slide-desktop.active,
.gallery-slide-link .gallery-slide-desktop.active {
    opacity: 1;
    z-index: 2;
}

.gallery-slide-desktop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Laptop Slider - 1366x500px (13-15" Laptop'lar) */
.hero-gallery-laptop {
    display: none;
}

.gallery-slider-laptop {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    max-width: 1366px;
    aspect-ratio: 1366 / 500;
    min-height: 400px;
    background-color: #f5f5f5;
}

@supports not (aspect-ratio: 1) {
    .gallery-slider-laptop {
        padding-top: 36.6%; /* 500/1366 * 100 */
        aspect-ratio: auto;
        height: 0;
    }
}

.gallery-slide-laptop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.gallery-slide-laptop.active {
    opacity: 1;
    z-index: 2;
}

.gallery-slide-laptop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Tablet Slider - 1024x600px */
.hero-gallery-tablet {
    display: none;
}

.gallery-slider-tablet {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    max-width: 1024px;
    aspect-ratio: 1024 / 600;
    min-height: 400px;
    background-color: #f5f5f5;
}

@supports not (aspect-ratio: 1) {
    .gallery-slider-tablet {
        padding-top: 58.59%; /* 600/1024 * 100 */
        aspect-ratio: auto;
        height: 0;
    }
}

.gallery-slide-tablet {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide-tablet.active {
    opacity: 1;
    z-index: 2;
}

.gallery-slide-tablet img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}

/* Mobile Slider - 1080x1350px (Tam uyumlu, responsive) */
.hero-gallery-mobile {
    display: none;
}

.gallery-slider-mobile {
    position: relative;
    width: 100%; /* Tam genişlik */
    margin: 0 auto;
    overflow: hidden; /* Slider için gerekli */
    max-width: 1080px; /* Maksimum genişlik: 1080px */
    /* Aspect ratio: 1080:1350 görsel için (genişlik:yükseklik) */
    /* 1080px genişlik, 1350px yükseklik */
    /* aspect-ratio: width / height = 1080 / 1350 = 0.8 */
    aspect-ratio: 1080 / 1350;
    min-height: 400px; /* Minimum yükseklik garantisi */
    background-color: #f5f5f5; /* Görsel yüklenene kadar arka plan */
}

/* Fallback for older browsers - padding-top trick */
@supports not (aspect-ratio: 1) {
    .gallery-slider-mobile {
        padding-top: 125%; /* 1350/1080 * 100 = 125% */
        aspect-ratio: auto;
        height: 0; /* Padding-top trick için */
    }
}

.gallery-slide-mobile {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Görselin tam gösterilmesi için */
    padding: 0;
    margin: 0;
}

.gallery-slide-mobile.active {
    opacity: 1;
    z-index: 2;
}

.gallery-slide-mobile img {
    /* Görselin tam gösterilmesi için - contain kullan */
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Tam görsel gösterimi - kırpma yok */
    object-position: center center;
    display: block;
    /* Görselin orijinal aspect ratio'sunu koru */
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Small Mobile Slider - 720x900px */
.hero-gallery-small-mobile {
    display: none;
}

.gallery-slider-small-mobile {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    max-width: 720px;
    aspect-ratio: 720 / 900;
    min-height: 300px;
    background-color: #f5f5f5;
}

@supports not (aspect-ratio: 1) {
    .gallery-slider-small-mobile {
        padding-top: 125%; /* 900/720 * 100 */
        aspect-ratio: auto;
        height: 0;
    }
}

.gallery-slide-small-mobile {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide-small-mobile.active {
    opacity: 1;
    z-index: 2;
}

.gallery-slide-small-mobile img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}

/* Tiny Mobile Slider - 480x600px */
.hero-gallery-tiny-mobile {
    display: none;
}

.gallery-slider-tiny-mobile {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    max-width: 480px;
    aspect-ratio: 480 / 600;
    min-height: 250px;
    background-color: #f5f5f5;
}

@supports not (aspect-ratio: 1) {
    .gallery-slider-tiny-mobile {
        padding-top: 125%; /* 600/480 * 100 */
        aspect-ratio: auto;
        height: 0;
    }
}

.gallery-slide-tiny-mobile {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide-tiny-mobile.active {
    opacity: 1;
    z-index: 2;
}

.gallery-slide-tiny-mobile img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}

/* Section Title Compact */
.section-title-compact {
    text-align: center;
    font-size: var(--text-2xl);
    margin-bottom: var(--space-6);
    font-weight: var(--font-bold);
    color: var(--color-secondary);
}

/* Tours Grid Compact */
.tours-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-5);
}

.tour-card-compact {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-gray-200);
    transition: all var(--transition-base);
}

.tour-card-compact:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: var(--color-primary);
}

.tour-img-compact {
    height: 160px;
    overflow: hidden;
}

.tour-img-compact img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.tour-card-compact:hover .tour-img-compact img {
    transform: scale(1.05);
}

.tour-body-compact {
    padding: var(--space-4);
}

.tour-title-compact {
    font-size: var(--text-lg);
    margin-bottom: var(--space-3);
    line-height: 1.3;
}

.tour-title-compact a {
    color: var(--color-secondary);
    text-decoration: none;
}

.tour-title-compact a:hover {
    color: var(--color-primary);
}

.tour-meta-compact {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    font-size: var(--text-xs);
    color: var(--color-gray-600);
}

.tour-meta-compact span {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.tour-price-compact {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-primary);
}

/* Info Section Compact */
.info-section-compact {
    padding: var(--space-12) 0;
}

.info-grid-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
    align-items: center;
}

.info-grid-compact h2 {
    margin-bottom: var(--space-4);
}

.info-grid-compact p {
    color: var(--color-gray-600);
    margin-bottom: var(--space-6);
    line-height: 1.7;
}

.stats-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.stat {
    text-align: center;
    padding: var(--space-4);
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
}

.stat strong {
    display: block;
    font-size: var(--text-2xl);
    color: var(--color-primary);
    margin-bottom: var(--space-1);
    font-weight: var(--font-bold);
}

.stat span {
    font-size: var(--text-xs);
    color: var(--color-gray-600);
}

/* Tours CTA Button */
.tours-cta-button {
    margin-top: var(--space-8);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Laptop (1440px-1025px) - 13-15" Laptop'lar */
@media (max-width: 1440px) and (min-width: 1025px) {
    .hero-gallery-desktop {
        display: none;
    }
    
    .hero-gallery-laptop {
        display: block;
    }
    
    .hero-gallery-tablet,
    .hero-gallery-mobile,
    .hero-gallery-small-mobile,
    .hero-gallery-tiny-mobile {
        display: none;
    }
}

@media (max-width: 1024px) {
    .gallery-slider-desktop {
        height: 350px;
    }
    
    .gallery-slider-laptop {
        height: 400px;
    }
}

/* Küçük tablet ve büyük telefonlar (768px-481px) */
@media (max-width: 768px) and (min-width: 481px) {
    .gallery-slider-desktop {
        height: 300px;
    }
}

/* Küçük telefonlar (480px ve altı) - Desktop gizli olacak ama yine de tanımlı */
@media (max-width: 480px) {
    .gallery-slider-desktop {
        height: 250px;
    }
}

/* Tablet (1024px-769px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .hero-gallery-desktop,
    .hero-gallery-laptop {
        display: none;
    }
    
    .hero-gallery-tablet {
        display: block;
    }
    
    .hero-gallery-mobile,
    .hero-gallery-small-mobile,
    .hero-gallery-tiny-mobile {
        display: none;
    }
}

/* Mobile (768px-481px) */
@media (max-width: 768px) and (min-width: 481px) {
    /* Hide desktop and tablet */
    .hero-gallery-desktop,
    .hero-gallery-tablet {
        display: none;
    }

    /* Show mobile gallery */
    .hero-gallery-mobile {
        display: block;
    }
    
    .hero-gallery-small-mobile,
    .hero-gallery-tiny-mobile {
        display: none;
    }

    .gallery-slider-mobile {
        max-width: 100%;
        width: 100%;
    }
    
    .gallery-slide-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .gallery-slide-mobile img {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        object-position: center center;
    }
}

/* Mobile (768px-481px) - Grid adjustments */
@media (max-width: 768px) {
    .tours-grid-compact {
        grid-template-columns: 1fr;
    }

    .info-grid-compact {
        grid-template-columns: 1fr;
    }

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

/* Small Mobile (480px-361px) */
@media (max-width: 480px) and (min-width: 361px) {
    /* Hide other galleries */
    .hero-gallery-desktop,
    .hero-gallery-tablet,
    .hero-gallery-mobile,
    .hero-gallery-tiny-mobile {
        display: none;
    }
    
    /* Show small mobile gallery */
    .hero-gallery-small-mobile {
        display: block;
    }
    
    .gallery-slider-small-mobile {
        max-width: 100%;
        width: 100%;
    }
    
    .gallery-slide-small-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .gallery-slide-small-mobile img {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        object-position: center center;
    }
}

/* Tiny Mobile (360px ve altı) */
@media (max-width: 360px) {
    /* Hide other galleries */
    .hero-gallery-desktop,
    .hero-gallery-tablet,
    .hero-gallery-mobile,
    .hero-gallery-small-mobile {
        display: none;
    }
    
    /* Show tiny mobile gallery */
    .hero-gallery-tiny-mobile {
        display: block;
    }
    
    .gallery-slider-tiny-mobile {
        max-width: 100%;
        width: 100%;
    }
    
    .gallery-slide-tiny-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .gallery-slide-tiny-mobile img {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        object-position: center center;
    }
}