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

   Breakpoints:
   - 480px: Small phones
   - 768px: Tablets / Medium devices
   - 1024px: Tablet landscape / Small desktops
   - 1200px: Large desktops

   Color Theme:
   - Primary: Dark Navy (#0A1628)
   - Secondary: White (#FFFFFF)
   - Tertiary: Black (#000000)
============================================ */

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

/* Mobile: 480px and below */
@media (max-width: 480px) {
    .header-container {
        height: 64px;
        padding: 0 16px;
        min-width: 320px;
        overflow-x: hidden;
    }

    .site-logo img {
        height: 42px;
        width: auto;
    }

    .site-header.scrolled .site-logo img {
        height: 38px;
    }

    .site-logo-name {
        display: none;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .lang-switcher {
        display: none;
    }

    .lang-btn span {
        display: none;
    }

    .lang-btn {
        min-width: 44px;
        height: 44px;
    }

    .mobile-nav {
        width: 100%;
    }
}

/* Tablet Portrait: 481px - 768px */
@media (min-width: 481px) and (max-width: 768px) {
    .header-container {
        height: 80px;
        padding: 0 20px;
    }

    .site-logo img {
        height: 55px;
        width: auto;
    }

    .site-header.scrolled .site-logo img {
        height: 48px;
    }

    .site-logo-name {
        display: block;
        font-size: 1rem;
        letter-spacing: 1.2px;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .lang-switcher {
        display: none;
    }
}

/* Tablet Landscape & Small Desktop: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-container {
        height: 80px;
        padding: 0 24px;
    }

    .site-logo img {
        height: 55px;
        width: auto;
    }

    .site-header.scrolled .site-logo img {
        height: 48px;
    }

    .site-logo-name {
        display: block;
        font-size: 1.1rem;
        letter-spacing: 1.5px;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .lang-switcher {
        display: none;
    }
}

/* Desktop: 1025px and above */
@media (min-width: 1025px) {
    .header-container {
        height: auto;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .site-logo-name {
        display: none;
    }

    .lang-switcher {
        display: flex;
    }
}

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

/* Mobile: 480px and below */
@media (max-width: 480px) {
    .hero-section {
        margin-top: 0;
        padding-top: 64px;
        min-height: 380px;
        height: 65vh;
    }

    .hero-slide-content {
        padding: 0 16px;
        bottom: auto;
        top: 15%;
    }

    .hero-slide-content h1 {
        font-size: clamp(1.4rem, 6vw, 1.8rem);
        line-height: 1.2;
        margin-bottom: 12px;
    }

    .hero-slide-content p {
        font-size: 0.875rem;
        line-height: 1.4;
        margin-bottom: 16px;
    }

    .hero-slide-btns {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .hero-slide-btns .btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.875rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-arrow {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
        min-width: 36px;
        min-height: 36px;
    }

    .hero-arrow.prev {
        left: 12px;
    }

    .hero-arrow.next {
        right: 12px;
    }

    .hero-dots {
        bottom: 16px;
        gap: 6px;
    }

    .hero-dot {
        width: 8px;
        height: 8px;
        cursor: pointer;
    }

    .hero-dot.active {
        width: 20px;
    }

    .hero-floating-elements {
        display: none;
    }
}

/* Tablet Portrait: 481px - 768px */
@media (min-width: 481px) and (max-width: 768px) {
    .hero-section {
        margin-top: 80px;
        min-height: 400px;
        height: 75vh;
    }

    .hero-slide-content {
        padding: 0 24px;
        bottom: auto;
        top: 18%;
    }

    .hero-slide-content h1 {
        font-size: clamp(1.8rem, 7vw, 2.4rem);
        line-height: 1.2;
        margin-bottom: 14px;
    }

    .hero-slide-content p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 20px;
    }

    .hero-slide-btns {
        flex-direction: row;
        gap: 12px;
        flex-wrap: wrap;
    }

    .hero-slide-btns .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .hero-arrow {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
        min-width: 40px;
        min-height: 40px;
    }

    .hero-arrow.prev {
        left: 16px;
    }

    .hero-arrow.next {
        right: 16px;
    }

    .hero-dots {
        bottom: 20px;
        gap: 8px;
    }

    .hero-dot {
        width: 10px;
        height: 10px;
        cursor: pointer;
    }

    .hero-dot.active {
        width: 24px;
    }

    .hero-floating-elements {
        display: none;
    }
}

/* Tablet Landscape & Small Desktop: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-section {
        margin-top: 80px;
        min-height: 450px;
        height: 80vh;
    }

    .hero-slide-content {
        padding: 0 40px;
        bottom: auto;
        top: 20%;
    }

    .hero-slide-content h1 {
        font-size: 2.6rem;
        line-height: 1.2;
        margin-bottom: 16px;
    }

    .hero-slide-content p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 24px;
    }

    .hero-slide-btns {
        flex-direction: row;
        gap: 16px;
    }

    .hero-slide-btns .btn {
        padding: 13px 28px;
        font-size: 0.95rem;
        min-height: 44px;
    }

    .hero-arrow {
        width: 44px;
        height: 44px;
        font-size: 1rem;
        min-width: 44px;
        min-height: 44px;
    }

    .hero-arrow.prev {
        left: 20px;
    }

    .hero-arrow.next {
        right: 20px;
    }

    .hero-floating-elements {
        display: none;
    }
}

/* Desktop: 1025px and above */
@media (min-width: 1025px) {
    .hero-slide-content h1 {
        font-size: 3.4rem;
    }

    .hero-floating-elements {
        display: block;
    }
}

/* ============================================
   SECTIONS & TYPOGRAPHY
============================================ */

/* Mobile: 480px and below */
@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    body {
        font-size: 0.9375rem;
    }

    .section {
        padding: 40px 16px;
    }

    .section-header {
        margin-bottom: 30px;
    }

    .section-header h2 {
        font-size: clamp(1.4rem, 6vw, 1.8rem);
        line-height: 1.2;
    }

    .section-header p {
        font-size: 0.875rem;
        line-height: 1.5;
    }

    .btn {
        padding: 11px 22px;
        font-size: 0.85rem;
        min-height: 44px;
        border-radius: 6px;
    }

    .btn-lg {
        padding: 13px 26px;
        font-size: 0.9rem;
    }

    .btn-register {
        display: none;
    }

    .contact-form {
        padding: 20px;
        border-radius: 8px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-group {
        min-height: 44px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        min-height: 44px;
        font-size: 1rem;
        padding: 12px 14px;
    }

    textarea {
        min-height: 100px;
    }

    label {
        font-size: 0.875rem;
        margin-bottom: 6px;
    }
}

/* Tablet Portrait: 481px - 768px */
@media (min-width: 481px) and (max-width: 768px) {
    .section {
        padding: 50px 20px;
    }

    .section-header {
        margin-bottom: 35px;
    }

    .section-header h2 {
        font-size: 1.9rem;
        line-height: 1.2;
    }

    .section-header p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .btn-lg {
        padding: 14px 30px;
        font-size: 0.95rem;
    }

    .contact-form {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        min-height: 44px;
        font-size: 1rem;
        padding: 12px 16px;
    }

    textarea {
        min-height: 120px;
    }
}

/* Tablet Landscape & Small Desktop: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .section {
        padding: 60px 30px;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-header h2 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .section-header p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .contact-form {
        padding: 30px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        min-height: 44px;
        font-size: 1rem;
    }
}

/* Desktop: 1025px and above */
@media (min-width: 1025px) {
    .section {
        padding: 80px 0;
    }

    .section-header h2 {
        font-size: 2.6rem;
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================
   PAGE TITLE SECTION
============================================ */

/* Mobile: 480px and below */
@media (max-width: 480px) {
    .page-title-section {
        margin-top: 64px;
        padding: 40px 16px;
    }

    .page-title-section h1 {
        font-size: clamp(1.6rem, 7vw, 2rem);
        line-height: 1.2;
    }

    .page-title-section p {
        font-size: 0.875rem;
    }
}

/* Tablet Portrait: 481px - 768px */
@media (min-width: 481px) and (max-width: 768px) {
    .page-title-section {
        margin-top: 80px;
        padding: 50px 20px;
    }

    .page-title-section h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .page-title-section p {
        font-size: 0.95rem;
    }
}

/* Tablet Landscape & Small Desktop: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .page-title-section {
        margin-top: 80px;
        padding: 60px 30px;
    }

    .page-title-section h1 {
        font-size: 2.4rem;
    }
}

/* ============================================
   STORY GRID & CONTENT
============================================ */

/* Mobile: 480px and below */
@media (max-width: 480px) {
    .story-section {
        padding: 40px 16px;
    }

    .story-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .story-image img,
    .story-image-placeholder {
        height: 240px;
        width: 100%;
        object-fit: cover;
    }

    .story-content {
        text-align: center;
    }

    .story-content h2 {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .story-content p {
        font-size: 0.875rem;
        line-height: 1.5;
    }

    .story-btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }
}

/* Tablet Portrait: 481px - 768px */
@media (min-width: 481px) and (max-width: 768px) {
    .story-section {
        padding: 50px 20px;
    }

    .story-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .story-image img,
    .story-image-placeholder {
        height: 300px;
        width: 100%;
        object-fit: cover;
    }

    .story-content {
        text-align: center;
    }

    .story-content h2 {
        font-size: 1.6rem;
    }

    .story-content p {
        font-size: 0.95rem;
    }
}

/* Tablet Landscape & Small Desktop: 769px - 1024px and above */
@media (min-width: 769px) {
    .story-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .story-content {
        text-align: left;
    }
}

/* ============================================
   GRIDS & LAYOUTS
============================================ */

/* Mobile: 480px and below */
@media (max-width: 480px) {
    .race-cards {
        grid-template-columns: 1fr;
        max-width: 100%;
        margin: 0 auto;
        gap: 20px;
    }

    .race-card-image {
        height: 180px;
        width: 100%;
        object-fit: cover;
    }

    .race-card-body {
        padding: 16px;
    }

    .race-card-actions {
        flex-direction: column;
        gap: 10px;
    }

    .race-card-actions a,
    .race-card-actions button {
        width: 100%;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Sector/Product Detail Grid - Override inline styles */
    .race-detail-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Tablet Portrait: 481px - 768px */
@media (min-width: 481px) and (max-width: 768px) {
    .race-cards {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 24px;
    }

    .race-card-image {
        height: 200px;
        width: 100%;
        object-fit: cover;
    }

    .race-card-body {
        padding: 18px;
    }

    .race-card-actions {
        flex-direction: column;
        gap: 12px;
    }

    .race-card-actions a,
    .race-card-actions button {
        width: 100%;
        min-height: 44px;
    }

    /* Sector/Product Detail Grid - Override inline styles */
    .race-detail-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

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

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

    .footer-links a {
        justify-content: center;
    }

    .footer-contact-list a,
    .footer-address {
        justify-content: center;
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* Tablet Landscape & Small Desktop: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .race-cards {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
    }

    .race-detail-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 30px !important;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-bottom-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* Desktop: 1025px and above */
@media (min-width: 1025px) {
    .race-cards {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 28px;
    }

    .race-detail-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 40px !important;
    }

    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1.1fr 0.9fr;
    }

    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 40px;
    }

    .footer-bottom-inner {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ============================================
   ARCHIVE & TIMELINE
============================================ */

/* Tablet Landscape & Small Desktop: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .archive-timeline::before {
        left: 20px;
    }

    .archive-item:nth-child(odd),
    .archive-item:nth-child(even) {
        padding-left: 60px;
        padding-right: 0;
        justify-content: flex-start;
    }

    .archive-item-dot {
        left: 20px;
    }
}

/* ============================================
   ROUTE SWITCHER & CAROUSEL
============================================ */

/* Tablet Portrait: 481px - 768px and below */
@media (max-width: 768px) {
    .route-switcher {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 8px;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .route-switch-btn {
        flex-shrink: 0;
        font-size: 0.8rem;
        padding: 8px 14px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Route Modern Section */
    .route-modern-inner {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .route-modern-left {
        padding: 24px 16px;
        order: 2;
    }

    .route-modern-left::after {
        display: none;
    }

    .route-modern-right {
        order: 1;
        min-height: 240px;
    }

    .route-carousel {
        min-height: 240px;
    }

    .route-modern-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .route-modern-btn {
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 6px;
        padding: 10px 12px;
        background: rgba(255, 255, 255, 0.04);
        font-size: 0.8rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        text-align: center;
    }

    .route-modern-btn:hover {
        padding-left: 12px;
    }

    .route-modern-btn.active {
        background: rgba(244, 162, 97, 0.1);
        border-color: rgba(244, 162, 97, 0.3) !important;
    }

    .rmb-num {
        font-size: 0.85rem;
        font-weight: 600;
    }

    .rmb-name {
        font-size: 0.7rem;
        letter-spacing: 0.03em;
    }

    .rmb-arrow {
        display: none;
    }

    .route-modern-arrows {
        display: none;
    }

    .route-modern-header h2 {
        font-size: 1.5rem;
    }

    .route-detail-btn {
        font-size: 0.7rem;
        padding: 8px 14px;
        top: 12px;
        left: 12px;
        min-height: 36px;
    }
}

/* Tablet Landscape & Small Desktop: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .route-modern-inner {
        grid-template-columns: 280px 1fr;
    }

    .route-modern-left {
        padding: 32px 20px;
    }

    .route-modern-nav {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .route-modern-btn {
        justify-content: flex-start;
        padding: 12px 14px;
        font-size: 0.85rem;
        min-height: 44px;
    }

    .rmb-name {
        font-size: 0.8rem;
    }

    .route-modern-header h2 {
        font-size: 1.6rem;
    }
}

/* ============================================
   MAPS & MEDIA
============================================ */

/* Mobile: 480px and below */
@media (max-width: 480px) {
    #route-map,
    .route-map {
        height: 280px;
    }

    .video-placeholder {
        padding: 32px 16px;
        border-radius: 6px;
    }
}

/* Tablet Portrait: 481px - 768px */
@media (min-width: 481px) and (max-width: 768px) {
    #route-map,
    .route-map {
        height: 330px;
    }

    .video-placeholder {
        padding: 40px 20px;
        border-radius: 8px;
    }
}

/* Tablet Landscape & Small Desktop: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    #route-map,
    .route-map {
        height: 380px;
    }

    .video-placeholder {
        padding: 50px 24px;
    }
}

/* ============================================
   CONTACT FORM ELEMENTS
============================================ */

/* Mobile: 480px and below */
@media (max-width: 480px) {
    .security-question-wrap {
        flex-direction: column;
        gap: 12px;
    }

    .security-question-box {
        justify-content: center;
        min-width: auto;
        padding: 10px 14px;
        min-height: 44px;
        border-radius: 6px;
    }

    .security-answer-input {
        padding: 12px 14px !important;
        text-align: center;
        min-height: 44px;
        border-radius: 6px;
    }
}

/* ============================================
   UTILITY & ACCESSIBILITY
============================================ */

/* Mobile: 480px and below */
@media (max-width: 480px) {
    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }

    /* Prevent horizontal scroll on small devices */
    body,
    html {
        overflow-x: hidden;
        max-width: 100vw;
    }
}

/* Touch target minimum (44px) for all interactive elements */
@media (max-width: 768px) {
    a,
    button,
    input[type="button"],
    input[type="submit"],
    [role="button"] {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Ensure minimum readable font sizes */
@media (max-width: 768px) {
    body {
        font-size: clamp(0.875rem, 2vw, 1rem);
    }

    small,
    .label,
    .caption {
        font-size: clamp(0.75rem, 1.8vw, 0.875rem);
    }

    h1, h2, h3, h4, h5, h6 {
        line-height: 1.2;
    }
}

/* ============================================
   DESKTOP ADJUSTMENTS (1200px+)
============================================ */

@media (min-width: 1200px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 40px;
    }

    .hero-slide-content h1 {
        font-size: 3.6rem;
    }

    .section {
        padding: 100px 0;
    }
}

/* ============================================
   PRINT MEDIA
============================================ */

@media print {
    .site-header,
    .site-footer,
    .back-to-top,
    #preloader,
    .mobile-nav,
    .mobile-nav-overlay,
    .mobile-menu-toggle,
    .lang-switcher {
        display: none !important;
    }

    main {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    .section {
        padding: 20px 0;
        page-break-inside: avoid;
    }

    .hero-section {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: white;
    }
}

