/* ============================================
   RESPONSIVE STYLES
   Mobile-First Approach
   ============================================ */

/* ============================================
   LARGE DESKTOP (1280px+)
   ============================================ */
@media screen and (min-width: 1280px) {
    .container {
        padding: 0 var(--spacing-xl);
    }

    .section__title {
        font-size: var(--text-5xl);
    }
}

/* ============================================
   DESKTOP (1024px - 1279px)
   ============================================ */
@media screen and (max-width: 1279px) {
    :root {
        --text-5xl: 2.5rem;
        --text-6xl: 3rem;
    }
}

/* ============================================
   TABLET (768px - 1023px)
   ============================================ */
@media screen and (max-width: 1023px) {
    :root {
        --text-4xl: 2rem;
        --text-5xl: 2.25rem;
        --spacing-3xl: 4rem;
    }

    /* Tours Page */
    .tours-page__layout {
        grid-template-columns: 1fr;
    }

    .tours-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        height: 100vh;
        z-index: 2000;
        transition: var(--transition-base);
        overflow-y: auto;
    }

    .tours-sidebar.active {
        left: 0;
        box-shadow: var(--shadow-2xl);
    }

    .tours-sidebar__apply {
        display: flex;
    }

    .tours-toolbar__filter-btn {
        display: flex;
    }

    .tours-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Navigation */
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--white);
        box-shadow: var(--shadow-xl);
        padding: var(--spacing-2xl) var(--spacing-lg);
        transition: var(--transition-base);
        z-index: 1001;
    }

    .nav__menu.active {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        gap: var(--spacing-md);
    }

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

    .nav__close {
        display: block;
        position: absolute;
        top: var(--spacing-md);
        right: var(--spacing-md);
    }

    .nav__toggle {
        display: block;
    }

    .nav__cta span {
        display: none;
    }

    .nav__cta i {
        font-size: var(--text-xl);
    }

    /* Hero */
    .hero__content {
        max-width: 100%;
    }

    .search-box {
        grid-template-columns: 1fr;
    }

    .search-box__btn {
        width: 100%;
    }

    /* Categories */
    .categories__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Tours */
    .tours__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Features */
    .features__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Destinations */
    .destinations__grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }

    .destination-card--large {
        grid-column: span 1;
        grid-row: span 1;
    }

    /* Blog */
    .blog__grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }

    .floating-cta span {
        display: none;
    }
}

/* ============================================
   MOBILE (640px - 767px)
   ============================================ */
@media screen and (max-width: 767px) {
    :root {
        --text-3xl: 1.5rem;
        --text-4xl: 1.75rem;
        --text-5xl: 2rem;
        --spacing-2xl: 3rem;
        --spacing-3xl: 3rem;
    }

    /* Topbar */
    .topbar {
        font-size: 0.75rem;
        padding: 0.5rem 0;
        min-height: 46px;
        display: flex;
        align-items: center;
    }

    .topbar__left,
    .topbar__right {
        gap: 0.5rem;
    }

    .topbar__text {
        display: none;
    }

    .topbar__link i {
        font-size: 1rem;
    }

    .topbar__link--payment {
        padding: 0.35rem 0.75rem;
        font-size: 0.75rem;
    }

    .topbar__link--payment .topbar__text {
        display: inline;
    }

    .topbar__social {
        gap: 0.35rem;
    }

    .topbar__social-link {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
    }

    .topbar__divider {
        height: 18px;
    }

    .header {
        top: 52px;
    }


    /* Tours Page */
    .page-header__title {
        font-size: var(--text-3xl);
    }

    .tours-sidebar {
        width: 100%;
    }

    .tours-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .tours-toolbar__left,
    .tours-toolbar__right {
        width: 100%;
    }

    .tours-toolbar__right {
        flex-wrap: wrap;
    }

    .view-toggle {
        flex: 1;
    }

    .sort-dropdown {
        flex: 1;
    }

    .sort-dropdown__select {
        width: 100%;
    }

    .tours-toolbar__filter-btn {
        width: 100%;
        justify-content: center;
    }

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

    .tours-grid.view-list .tour-card {
        grid-template-columns: 1fr;
    }

    .pagination {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    .pagination__btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .pagination__numbers {
        width: 100%;
        justify-content: center;
    }

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

    .section__header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .section__title {
        font-size: var(--text-3xl);
    }

    /* Header */
    .nav {
        height: auto;
        min-height: 90px;
        padding: 0.6rem 0;
    }

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

    .nav__logo {
        gap: 0.25rem;
    }

    .nav__logo-top-row {
        gap: 0.85rem;
    }

    .nav__logo-img {
        height: 52px;
        width: 52px;
    }

    .nav__logo-domain {
        font-size: 0.62rem;
    }

    .nav__logo-badge {
        display: flex;
    }

    .nav__logo-badge-line {
        height: 42px;
    }

    .nav__logo-badge-labels {
        height: 42px;
    }

    .nav__logo-badge-label {
        font-size: 0.45rem;
    }

    .nav__logo-badge-num {
        font-size: 2.4rem;
    }

    .nav__logo-tagline {
        display: block;
        font-size: 0.5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 220px;
    }

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

    .nav__lang {
        display: none;
    }

    /* Hero */
    .hero {
        min-height: 90vh;
        padding-top: 100px;
    }

    .hero__title {
        font-size: var(--text-3xl);
    }

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

    .hero__stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .hero__stat {
        width: 100%;
    }

    .hero__scroll {
        display: none;
    }

    /* Search Box */
    .search-box {
        padding: var(--spacing-md);
    }

    .search-box__field {
        padding: var(--spacing-sm);
    }

    /* Categories */
    .categories__grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        padding: var(--spacing-lg);
    }

    /* Tours */
    .tours__grid {
        grid-template-columns: 1fr;
    }

    .tour-card__img-wrapper {
        height: 200px;
    }

    /* Features */
    .features__grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        padding: var(--spacing-lg);
    }

    /* Destinations */
    .destinations__grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }

    /* Stats */
    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card__number {
        font-size: var(--text-4xl);
    }

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

    /* Blog */
    .blog-card__img-wrapper {
        height: 200px;
    }

    /* Newsletter */
    .newsletter__icon {
        font-size: var(--text-4xl);
    }

    .newsletter__title {
        font-size: var(--text-3xl);
    }

    .newsletter__form {
        flex-direction: column;
    }

    .newsletter__btn {
        width: 100%;
        justify-content: center;
    }

    /* Footer */
    .footer__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .footer__links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    /* Floating Buttons */
    .floating-cta {
        bottom: 20px;
        right: var(--spacing-md);
        padding: 0.875rem;
    }

    .scroll-top {
        bottom: var(--spacing-md);
        left: var(--spacing-md);
        width: 45px;
        height: 45px;
    }
}

/* ============================================
   SMALL MOBILE (320px - 639px)
   ============================================ */
@media screen and (max-width: 639px) {
    :root {
        --container-padding: 0.75rem;
        --text-2xl: 1.25rem;
        --text-3xl: 1.375rem;
        --spacing-xl: 2rem;
    }

    /* Navigation */
    .nav__menu {
        width: 100%;
        right: -100%;
    }

    .nav__logo-tagline {
        max-width: 160px;
    }

    .nav__logo-badge-num {
        font-size: 2rem;
    }

    .nav__logo-badge-line {
        height: 36px;
    }

    .nav__logo-badge-labels {
        height: 36px;
    }

    /* Hero */
    .hero__subtitle {
        font-size: var(--text-sm);
        padding: 0.375rem var(--spacing-sm);
    }

    .hero__stat i {
        font-size: var(--text-2xl);
    }

    .hero__stat strong {
        font-size: var(--text-xl);
    }

    /* Category Cards */
    .category-card__icon {
        width: 60px;
        height: 60px;
    }

    .category-card__icon i {
        font-size: var(--text-2xl);
    }

    .category-card__title {
        font-size: var(--text-xl);
    }

    /* Stats */
    .stats__grid {
        grid-template-columns: 1fr;
    }

    .stat-card__icon {
        font-size: var(--text-4xl);
    }

    /* Search Modal */
    .search-modal__content {
        width: 95%;
        padding: var(--spacing-lg);
    }

    .search-modal__form {
        flex-direction: column;
    }

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

    /* Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: var(--text-sm);
    }

    /* Tour Card */
    .tour-card__meta {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .tour-card__price-amount {
        font-size: var(--text-2xl);
    }

    .tour-card__btn {
        padding: 0.625rem 1.25rem;
        font-size: var(--text-sm);
    }
}

/* ============================================
   LANDSCAPE ORIENTATION
   ============================================ */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: var(--spacing-3xl) 0;
    }

    .hero__content {
        margin-bottom: var(--spacing-lg);
    }

    .hero__title {
        font-size: var(--text-3xl);
    }

    .hero__stats {
        display: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {

    .header,
    .floating-cta,
    .scroll-top,
    .nav__toggle,
    .hero__scroll {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .section {
        page-break-inside: avoid;
    }
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Kullanıcı dark mode tercih ederse */
    /* Bu kısım isteğe bağlı olarak doldurulabilir */
}

/* ============================================
   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__scroll {
        animation: none;
    }

    .floating-cta {
        animation: none;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */
@media (prefers-contrast: high) {
    :root {
        --primary: #0066CC;
        --secondary: #CC6600;
    }

    .btn--primary,
    .btn--secondary {
        border: 2px solid currentColor;
    }

    a:focus,
    button:focus {
        outline: 3px solid currentColor;
        outline-offset: 2px;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {

    /* Touch devices */
    .btn,
    .nav__link,
    .category-card,
    .tour-card,
    .destination-card {
        -webkit-tap-highlight-color: transparent;
    }

    /* Daha büyük tıklama alanları */
    .nav__link {
        padding: var(--spacing-sm) 0;
    }

    .btn {
        min-height: 48px;
    }
}