/* =====================================================
   TOUR CATEGORIES EXPANDABLE - Show More System
   ===================================================== */

.tour-categories-expandable {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--background-color) 100%);
    position: relative;
    overflow: hidden;
}

.tour-categories-expandable::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(0, 102, 204, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
    gap: 2rem;
}

.header-content {
    flex: 1;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
    max-width: 600px;
}

.header-actions {
    flex-shrink: 0;
}

.view-all-tours-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.2);
}

.view-all-tours-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #002b66 100%);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 102, 204, 0.3);
}

.view-all-tours-btn:active {
    transform: translateY(0);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Category Card */
.category-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    transform: translateY(0);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 102, 204, 0.1);
}

/* Category Image */
.category-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease;
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 20, 40, 0.4) 0%,
        rgba(0, 40, 80, 0.2) 50%,
        rgba(0, 60, 120, 0.3) 100%
    );
}

.category-icon {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.category-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient-primary);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
}

/* Category Content */
.category-content {
    padding: 1.5rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    flex: 1;
}

.category-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.rating-score {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.rating-stars {
    color: var(--warning-color);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.category-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Category Stats */
.category-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.stat-item i {
    color: var(--primary-color);
    width: 16px;
}

.price-from {
    font-weight: 600;
    color: var(--success-color);
}

/* Explore Button */
.category-explore-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.category-explore-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.category-explore-btn:hover::before {
    left: 100%;
}

.category-explore-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #002b66 100%);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(25, 118, 210, 0.3);
}

/* Show More Section */
.show-more-section {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2.5rem;
    background: var(--white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.show-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: 1;
}

.show-more-btn:hover::before {
    transform: scaleX(1);
}

.show-more-btn:hover {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 102, 204, 0.3);
}

.show-more-btn span,
.show-more-btn i {
    position: relative;
    z-index: 2;
}

.show-more-btn i {
    transition: transform 0.3s ease;
}

.show-more-btn:hover i {
    transform: scale(1.1);
}

/* Animation Classes */
.category-card.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card.fade-out {
    animation: fadeOutDown 0.4s ease-in;
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Search Highlight */
.category-card.search-highlight {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 60px rgba(255, 215, 0, 0.3),
        0 0 0 3px rgba(255, 215, 0, 0.5),
        0 8px 32px rgba(0, 0, 0, 0.08);
    animation: searchPulse 2s ease-in-out;
}

@keyframes searchPulse {
    0% { 
        box-shadow: 
            0 20px 60px rgba(255, 215, 0, 0.3),
            0 0 0 3px rgba(255, 215, 0, 0.5),
            0 8px 32px rgba(0, 0, 0, 0.08);
    }
    50% { 
        box-shadow: 
            0 25px 70px rgba(255, 215, 0, 0.4),
            0 0 0 6px rgba(255, 215, 0, 0.3),
            0 12px 40px rgba(0, 0, 0, 0.12);
    }
    100% { 
        box-shadow: 
            0 20px 60px rgba(255, 215, 0, 0.3),
            0 0 0 3px rgba(255, 215, 0, 0.5),
            0 8px 32px rgba(0, 0, 0, 0.08);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .tour-categories-expandable {
        padding: 60px 0;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-card {
        border-radius: 16px;
    }
    
    .category-image {
        height: 200px;
    }
    
    .category-stats {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .show-more-btn {
        padding: 1rem 2rem;
        font-size: 0.9rem;
    }
}

/* =====================================================
   RESPONSIVE DESIGN - TÜM MOBİL CİHAZLAR İÇİN
   Premium Platform/Viator Seviyesi Categories Mobile Experience
   ===================================================== */

/* TABLET (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .tour-categories-expandable {
        padding: 60px 0;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

/* STANDARD MOBİL (768px ve altı) */
@media (max-width: 768px) {
    .tour-categories-expandable {
        padding: 40px 0; /* Daha kompakt */
    }
    
    .container {
        padding: 0 1rem; /* Yan padding */
    }
    
    /* SECTION HEADER MOBİL UYUMLU */
    .section-header {
        text-align: center;
        margin-bottom: 2rem; /* Daha az margin */
    }
    
    .section-title {
        font-size: 2rem; /* Küçült: 3rem → 2rem */
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem; /* Küçült */
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }
    
    .view-all-tours-btn {
        padding: 1rem 1.5rem; /* Touch-friendly */
        font-size: 0.95rem;
        min-height: 48px; /* Apple/Google guidelines */
        border-radius: 8px;
        width: auto;
        min-width: 160px;
    }
    
    /* CATEGORIES HORIZONTAL SCROLL MOBILE */
    .categories-grid {
        display: flex;
        gap: 1rem;
        margin: 0 -1rem;
        padding: 0 1rem 1rem 1rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        /* Hide scrollbar but keep functionality */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .categories-grid::-webkit-scrollbar {
        display: none;
    }
    
    /* Scroll indicators */
    .categories-grid::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 40px;
        background: linear-gradient(to right, transparent, white);
        pointer-events: none;
        z-index: 2;
    }
    
    .category-card {
        flex: 0 0 260px;
        max-width: 260px;
        margin: 0;
        border-radius: 12px;
        scroll-snap-align: start;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        transition: all 0.3s ease;
    }
    
    .category-card:hover {
        transform: none;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    }
    
    .category-image {
        height: 140px;
        border-radius: 12px 12px 0 0;
        position: relative;
    }
    
    .category-image img {
        transition: transform 0.3s ease;
    }
    
    .category-card:active .category-image img {
        transform: scale(1.05);
    }
    
    /* CATEGORY BADGES MOBİL UYUMLU */
    .category-badge {
        top: 0.5rem;
        left: 0.5rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
        border-radius: 12px;
        backdrop-filter: blur(8px);
        background: rgba(255, 107, 107, 0.9);
    }
    
    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* CATEGORY CONTENT COMPACT MOBILE */
    .category-content {
        padding: 0.875rem;
        position: relative;
    }
    
    .category-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .category-title {
        font-size: 0.95rem;
        font-weight: 600;
        line-height: 1.2;
        margin: 0 0 0.25rem 0;
        color: var(--text-dark);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .category-rating {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        background: var(--bg-light);
        padding: 0.25rem 0.5rem;
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }
    
    .rating-stars {
        color: var(--warning-color);
        font-size: 0.7rem;
    }
    
    .rating-score {
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--text-color);
    }
    
    /* CATEGORY DESCRIPTION MOBILE COMPACT */
    .category-description {
        font-size: 0.8rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
        color: var(--text-light);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* HIDE FEATURES ON MOBILE */
    .category-features {
        display: none;
    }
    
    .feature-item {
        font-size: 0.85rem; /* Küçült */
        padding: 0.5rem 0;
        width: 100%;
        justify-content: flex-start;
        border-bottom: 1px solid var(--border-light);
    }
    
    .feature-item:last-child {
        border-bottom: none;
    }
    
    .feature-item i {
        margin-right: 0.75rem;
        color: var(--primary-color);
        font-size: 1rem;
        width: 20px;
        text-align: center;
    }
    
    /* CATEGORY STATS MOBILE */
    .category-stats {
        display: flex;
        gap: 1rem;
        margin-bottom: 0.75rem;
        padding: 0;
        border: none;
        font-size: 0.75rem;
    }
    
    .stat-item {
        display: flex;
        align-items: center;
        gap: 0.3rem;
        color: var(--text-light);
    }
    
    .stat-item i {
        font-size: 0.8rem;
        color: var(--primary-color);
    }
    
    .price-from {
        font-weight: 700;
        color: var(--success-color);
        font-size: 0.85rem;
    }
    
    /* CATEGORY EXPLORE BUTTON MOBİL UYUMLU */
    .category-explore-btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.85rem;
        min-height: 40px;
        border-radius: 8px;
        font-weight: 600;
        margin-top: auto;
        background: var(--primary-color);
        border: none;
        color: var(--white);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        transition: all 0.2s ease;
    }
    
    .category-explore-btn:active {
        background: var(--primary-dark);
        color: var(--white);
        transform: scale(0.98);
    }
    
    /* SHOW MORE SECTION MOBİL UYUMLU */
    .show-more-section {
        margin-top: 2rem; /* Daha az margin */
        padding-top: 1.5rem;
    }
    
    .show-more-btn {
        padding: 1rem 2rem; /* Touch-friendly */
        font-size: 0.95rem;
        min-height: 48px;
        border-radius: 25px;
        gap: 0.75rem;
        width: auto;
        min-width: 180px;
    }
}

/* KÜÇÜK MOBİL (480px ve altı) */
@media (max-width: 480px) {
    .tour-categories-expandable {
        padding: 30px 0; /* Daha da kompakt */
    }
    
    .container {
        padding: 0 0.75rem; /* Daha az yan padding */
    }
    
    /* SECTION HEADER KÜÇÜK MOBİL */
    .section-header {
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem; /* Daha küçük: 2rem → 1.75rem */
        margin-bottom: 0.875rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem; /* Daha küçük */
    }
    
    .view-all-tours-btn {
        padding: 0.875rem 1.25rem; /* Daha kompakt */
        font-size: 0.9rem;
        min-height: 46px;
        min-width: 140px;
    }
    
    /* CATEGORIES GRID KÜÇÜK MOBİL */
    .categories-grid {
        gap: 1.25rem;
        margin-top: 1.5rem;
    }
    
    .category-card {
        border-radius: 14px; /* Daha az yuvarlak */
    }
    
    .category-image {
        height: 180px; /* Daha küçük: 200px → 180px */
        border-radius: 14px 14px 0 0;
    }
    
    /* CATEGORY CONTENT KÜÇÜK MOBİL */
    .category-content {
        padding: 1.25rem; /* Daha küçük */
    }
    
    .category-header {
        gap: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .category-title {
        font-size: 1rem; /* Daha küçük */
        line-height: 1.25;
    }
    
    .rating-score {
        font-size: 0.95rem;
    }
    
    .rating-stars {
        font-size: 0.8rem;
    }
    
    .category-description {
        font-size: 0.85rem; /* Daha küçük */
        margin-bottom: 1rem;
    }
    
    .category-features {
        gap: 0.625rem;
        margin-bottom: 1.25rem;
    }
    
    .feature-item {
        font-size: 0.8rem; /* Daha küçük */
        padding: 0.375rem 0;
    }
    
    .feature-item i {
        font-size: 0.9rem;
        margin-right: 0.5rem;
        width: 16px;
    }
    
    .category-explore-btn {
        padding: 0.875rem; /* Daha kompakt */
        font-size: 0.9rem;
        min-height: 46px;
        border-radius: 6px;
    }
    
    /* SHOW MORE KÜÇÜK MOBİL */
    .show-more-section {
        margin-top: 1.5rem;
        padding-top: 1.25rem;
    }
    
    .show-more-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        min-height: 46px;
        border-radius: 23px;
        min-width: 160px;
    }
}

/* ÇOK KÜÇÜK EKRANLAR (360px ve altı) */
@media (max-width: 360px) {
    .tour-categories-expandable {
        padding: 25px 0;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .section-title {
        font-size: 1.6rem;
        line-height: 1.25;
    }
    
    .section-subtitle {
        font-size: 0.85rem;
    }
    
    .categories-grid {
        gap: 1rem;
    }
    
    .category-card {
        border-radius: 12px;
    }
    
    .category-image {
        height: 160px;
        border-radius: 12px 12px 0 0;
    }
    
    .category-content {
        padding: 1rem;
    }
    
    .category-title {
        font-size: 0.95rem;
    }
    
    .category-description {
        font-size: 0.8rem;
    }
    
    .feature-item {
        font-size: 0.75rem;
    }
    
    .category-explore-btn {
        padding: 0.75rem;
        font-size: 0.85rem;
        min-height: 44px;
    }
    
    .show-more-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
        min-height: 44px;
        min-width: 140px;
    }
}

/* LANDSCAPE ORİENTASYON (Yatay tutma) */
@media (max-height: 500px) and (orientation: landscape) {
    .tour-categories-expandable {
        padding: 20px 0;
    }
    
    .section-header {
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 0.5rem;
    }
    
    .section-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 kolon yatayda */
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .category-image {
        height: 120px; /* Çok küçük yükseklik */
    }
    
    .category-content {
        padding: 1rem;
    }
    
    .category-header {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .category-title {
        font-size: 0.9rem;
    }
    
    .category-description {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
        max-height: 2.4em; /* 2 satır max */
        overflow: hidden;
    }
    
    .category-features {
        display: none; /* Yer tasarrufu */
    }
    
    .show-more-section {
        margin-top: 1rem;
        padding-top: 1rem;
    }
}

/* CROSS-BROWSER MOBİL UYUMLULUK */
/* iOS Safari özel düzeltmeler */
@supports (-webkit-touch-callout: none) {
    .category-explore-btn,
    .show-more-btn,
    .view-all-tours-btn {
        -webkit-tap-highlight-color: rgba(0,102,204,0.2);
    }
    
    /* iOS safe area için ek padding */
    @media screen and (max-height: 812px) and (max-width: 414px) {
        .tour-categories-expandable {
            padding-bottom: calc(30px + env(safe-area-inset-bottom));
        }
    }
}

/* Android WebView özel düzeltmeler */
@media screen and (-webkit-min-device-pixel-ratio: 2) and (max-width: 768px) {
    .category-explore-btn,
    .show-more-btn,
    .view-all-tours-btn {
        min-height: 48px; /* Android için daha büyük */
    }
}