/* =========================================
   ROUTAS LOGISTICS - RESPONSIVE DESIGN
   ONLY FOR MOBILE & TABLET (max-width: 991.98px)
   Desktop (992px+) uses original styles
   ========================================= */

/* =========================================
   MOBILE ONLY (0-575px)
   ========================================= */

@media (max-width: 575.98px) {
    body {
        font-size: 14px;
    }

    /* Hero Section */
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2;
        margin-top: 0.5rem !important;
    }

    .seamless-route {
        font-size: 1.5rem !important;
    }

    .end-to-end {
        font-size: 2.5rem !important;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem !important;
    }

    .btn-plan {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 280px;
    }

    /* Top Bar */
    .top-bar {
        font-size: 0.7rem;
        padding: 8px 0;
    }

    .top-bar .container {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    /* Navbar */
    .navbar-container-wrapper {
        padding-top: 1rem;
        padding-bottom: 0.5rem;
    }

    .floating-navbar {
        width: 100%;
        border-radius: 8px;
        padding: 0.6rem 1rem;
    }

    .navbar-brand {
        font-size: 1.1rem;
        margin-right: 0;
    }

    .brand-line {
        height: 16px;
        width: 4px;
    }

    .nav-link {
        font-size: 0.9rem;
        margin: 8px 0;
        padding: 8px 0 !important;
    }

    .btn-lang,
    .btn-nav-contact {
        font-size: 0.8rem;
        padding: 6px 12px;
        margin: 5px;
    }

    /* Collage Grid */
    .collage-box {
        min-height: 180px;
        margin-bottom: 1rem;
    }

    .text-overlay {
        padding: 1rem;
    }

    .md-24 {
        font-size: 16px !important;
    }

    .handwritten-highlight {
        font-size: 1.3rem !important;
    }

    .stat-card-custom {
        padding: 1.5rem;
    }

    .stat-card-custom h2 {
        font-size: 2rem !important;
    }

    /* Certifications Slider */
    .cert-section-wrapper {
        flex-direction: column !important;
        gap: 1.5rem !important;
        text-align: center;
    }

    .cert-slider {
        width: 100% !important;
        max-width: 300px;
        margin: 0 auto;
    }

    .cert-slider .swiper-slide img {
        /* height: 25px !important; */
    }

    /* Services Section */
    .services-header h2 {
        font-size: 1.5rem !important;
    }

    .md-f-size-35 {
        font-size: 1.5rem !important;
    }

    .service-row-card {
        padding: 1.5rem;
    }

    .service-icon-img {
        max-height: 80px;
    }

    .service-title {
        font-size: 1.3rem !important;
    }

    .md-44 {
        font-size: 1.3rem !important;
    }

    .md-30 {
        font-size: 1rem !important;
    }

    .service-desc {
        font-size: 0.85rem;
    }

    /* Mad Libs Form */
    .mad-libs-title {
        font-size: 1.8rem !important;
    }

    .mad-libs-line {
        font-size: 0.95rem !important;
        line-height: normal;
        flex-direction: column;
        gap: 0.8rem;
        text-align: left !important;
    }

    .line-2 {
        display: none !important;
    }

    .mad-libs-pair {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 10px;
        border-bottom: 1px solid #ccc;
        padding-bottom: 5px;
    }

    .mad-libs-label {
        white-space: nowrap;
        font-weight: 700;
    }

    .mad-libs-input {
        width: auto !important;
        flex: 1;
        text-align: right;
        font-size: 0.9rem;
        padding: 0;
        border-bottom: none !important;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mad-libs-input::placeholder {
        font-size: 0.8rem;
        opacity: 0.6;
    }

    .btn-submit-form {
        padding: 10px 30px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 280px;
    }

    .privacy-text {
        font-size: 0.7rem;
    }

    /* Blog Section */
    .text-BLOG {
        font-size: 18px !important;
    }

    .blog-text h6 {
        font-size: 1rem;
    }

    .blog-text p {
        font-size: 0.85rem;
    }

    .blog_view_all {
        font-size: 16px;
    }

    /* Footer */
    .footer-section {
        padding-bottom: 1rem;
    }

    .footer-box {
        padding: 1rem;
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .double-footer {
        padding: 2rem 1rem !important;
        margin: 1rem 0 !important;
    }

    /* About Page */
    .about-sketch-icon {
        width: 120px;
        margin-bottom: 1.5rem;
    }

    .about-headline {
        font-size: 1.2rem !important;
        margin-bottom: 1.5rem;
    }

    .about-text p {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    .reach_all_routas {
        font-size: 1.5rem !important;
    }

    /* Blog Page */
    .blog-row-card {
        border-radius: 12px;
        min-height: auto;
    }

    .blog-content-inner {
        padding: 1.5rem;
    }

    .blog-title {
        font-size: 1.3rem !important;
        margin-bottom: 1rem;
    }

    .blog-text {
        font-size: 0.9rem;
    }

    .btn-read-all {
        padding: 10px 24px;
        font-size: 0.9rem;
        width: 100%;
    }

    .blog-img-wrapper {
        padding: 0;
        height: 200px;
    }

    .blog-img {
        border-radius: 0;
    }

    .btn-see-more {
        padding: 10px 30px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 280px;
    }

    /* Blog Detail Page */
    .f-33 {
        font-size: 1.5rem !important;
    }

    .btn-share-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .blog-detail-content {
        padding: 1.5rem !important;
        font-size: 0.95rem;
    }

    .blog-detail-content h2 {
        font-size: 1.3rem !important;
        margin-top: 1.5rem;
    }

    /* Plan Shipment Widget */
    .plan_shipment img {
        width: 100%;
        height: auto;
    }

    /* Lines */
    .line,
    .line-2 {
        width: 90%;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }

    /* Container */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Spacing */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .my-5 {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }
}

/* =========================================
   SMALL MOBILE (576px - 767px)
   ========================================= */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-title {
        font-size: 2.5rem !important;
    }

    .end-to-end {
        font-size: 3rem !important;
    }

    .btn-plan {
        width: auto;
    }

    .floating-navbar {
        width: 95%;
    }

    .collage-box {
        min-height: 200px;
    }

    .service-title {
        font-size: 1.5rem !important;
    }

    .md-44 {
        font-size: 1.5rem !important;
    }

    .mad-libs-title {
        font-size: 2.2rem !important;
    }

    .mad-libs-line {
        font-size: 1.05rem !important;
    }

    .btn-submit-form,
    .btn-see-more {
        width: auto;
    }
}

/* =========================================
   TABLETS ONLY (768px - 991px)
   ========================================= */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero */
    .hero-title {
        font-size: 3rem !important;
    }

    .end-to-end {
        font-size: 4rem !important;
    }

    /* Navbar */
    .floating-navbar {
        width: 90%;
        padding: 0.8rem 1.5rem;
    }

    /* Collage Grid */
    .collage-box {
        min-height: 250px;
    }

    /* Services */
    .service-row-card {
        padding: 2rem;
    }

    .service-title {
        font-size: 1.8rem !important;
    }

    .md-44 {
        font-size: 1.8rem !important;
    }

    .md-30 {
        font-size: 1.2rem !important;
    }

    /* Mad Libs */
    .mad-libs-title {
        font-size: 2.5rem !important;
    }

    .mad-libs-line {
        font-size: 1.1rem !important;
        flex-direction: column;
        gap: 1rem;
        text-align: left !important;
    }

    .mad-libs-pair {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 20px;
        border-bottom: 1px solid #ccc;
        padding-bottom: 8px;
    }

    .mad-libs-input {
        flex: 1;
        text-align: right;
        width: auto !important;
        min-width: 0;
    }

    .mad-libs-input::placeholder {
        font-size: 0.9rem;
    }

    /* Blog Page */
    .blog-content-inner {
        padding: 2rem;
    }

    .blog-img-wrapper {
        padding: 2rem;
        height: 300px;
    }

    .blog-title {
        font-size: 1.5rem !important;
    }

    /* About Page */
    .about-headline {
        font-size: 1.4rem !important;
    }

    .reach_all_routas {
        font-size: 2rem !important;
    }

    /* Footer */
    .double-footer {
        padding: 3rem 1rem !important;
    }
}

/* =========================================
   MOBILE & TABLET COMMON (max 991px)
   ========================================= */
@media (max-width: 991.98px) {
    /* Navbar Mobile Menu */
    .navbar-collapse {
        background-color: #090321;
        padding: 1rem;
        border-radius: 8px;
        margin-top: 1rem;
    }

    .navbar-nav {
        margin-bottom: 1rem;
    }

    .nav-item {
        text-align: center;
        padding: 0.5rem 0;
    }

    .nav-link {
        padding: 0.5rem 1rem !important;
    }

    .btn-lang,
    .btn-nav-contact {
        width: 100%;
        text-align: center;
        display: block;
        margin: 0.5rem 0;
    }

    .dropdown-menu {
        width: 100%;
        text-align: center;
    }

    /* Service Cards - Stack Vertically */
    .service-row-card {
        flex-direction: column;
        text-align: center;
    }

    .service-icon-col,
    .service-title-col,
    .service-desc-col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        margin-bottom: 1rem;
    }

    .service-desc-col {
        border-left: none !important;
    }

    /* Blog Cards - Stack Vertically */
    .blog-card {
        display: flex !important;
        flex-direction: column !important;
    }

    .blog-image {
        width: 100% !important;
        height: 180px;
        margin-bottom: 1rem;
    }

    .blog-image img {
        height: 100%;
        object-fit: cover;
    }

    .blog-text {
        width: 100% !important;
        padding-left: 0 !important;
        padding-top: 1rem;
    }

    /* About Page Images */
    .image-composition-wrapper {
        min-height: 300px;
        /* padding: 1rem; */
        /* margin-top: 2rem; */
    }

    .bg-shape-large,
    .bg-shape-small {
        display: none;
    }

    .img-large {
        position: relative;
        width: 100%;
        height: 220px;
        right: auto;
        top: auto;
        margin-bottom: 1rem;
    }

    .img-small {
        position: relative;
        width: 90%;
        height: 160px;
        left: auto;
        bottom: auto;
        margin-left: 5%;
        margin-top: -50px;
    }
}

/* =========================================
   ADMIN PANEL RESPONSIVE (max 991px)
   ========================================= */

@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s ease;
        background-color: #090321;
    }

    .sidebar.active {
        left: 0;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .top-navbar {
        padding: 1rem;
    }

    .top-navbar h5 {
        font-size: 1rem;
    }

    .container-fluid {
        padding: 1rem !important;
    }

    .card {
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1rem !important;
    }

    /* Tables */
    .table-responsive {
        font-size: 0.85rem;
    }

    .table th,
    .table td {
        padding: 0.75rem 0.5rem !important;
    }

    .table th:first-child,
    .table td:first-child {
        padding-left: 1rem !important;
    }

    .table th:last-child,
    .table td:last-child {
        padding-right: 1rem !important;
    }

    /* Hide some columns on mobile */
    .table td:nth-child(3),
    .table th:nth-child(3) {
        display: none;
    }

    /* Buttons */
    .btn-modern {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    /* Blog Image in Table */
    .table img {
        width: 40px !important;
        height: 40px !important;
    }

    /* Action Buttons */
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        left: -240px;
        width: 240px;
        transition: left 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .container-fluid {
        padding: 1.5rem !important;
    }

    .table th,
    .table td {
        padding: 0.75rem !important;
    }
}

/* =========================================
   ACCESSIBILITY & PERFORMANCE
   ========================================= */

/* Smooth scrolling */
@media (max-width: 991.98px) {
    html {
        scroll-behavior: smooth;
        scroll-padding-top: 80px;
    }
}

/* 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;
    }
}

/* Touch Device Optimizations */
@media (max-width: 991.98px) and (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn,
    .nav-link,
    .sidebar-link {
        min-height: 44px;
        min-width: 44px;
    }

    /* Prevent zoom on iOS */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Landscape Mode Fixes */
@media (max-width: 991.98px) and (orientation: landscape) and (max-height: 500px) {
    .hero-title {
        font-size: 2rem !important;
        margin-top: 0.5rem !important;
    }

    .navbar-container-wrapper {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .collage-box {
        min-height: 150px;
    }

    .mad-libs-title {
        font-size: 1.5rem !important;
    }

    .mad-libs-line {
        font-size: 0.9rem !important;
        line-height: 1.8;
    }

    .py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
}

/* Print Styles */
@media print {
    .top-bar,
    .navbar-container-wrapper,
    .footer-section,
    .btn,
    .sidebar,
    .top-navbar {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* Safe Area Insets (for notched devices) */
@supports (padding: max(0px)) {
    @media (max-width: 991.98px) {
        .top-bar,
        .navbar-container-wrapper,
        .container {
            padding-left: max(15px, env(safe-area-inset-left));
            padding-right: max(15px, env(safe-area-inset-right));
        }

        .footer-section {
            padding-bottom: max(1rem, env(safe-area-inset-bottom));
        }
    }
}

/* =========================================
   HELLO ROUTAS FORM - MOBILE & TABLET IMPROVEMENTS
   ========================================= */

/* Mobile Only (0-575px) */
/* @media (max-width: 575.98px) {
    .hello-routas-form {
        max-width: 100%;
        padding: 0 1rem;
    }

    .form-row-wrapper {
        margin-bottom: 1rem;
    }

    .mad-libs-line {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        text-align: left;
    }

    .mad-libs-line-split {
        flex-direction: column;
        gap: 1rem;
    }

    .input-group-inline {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
    }

    .form-label-inline {
        font-weight: 600;
        color: var(--text-color);
        font-size: 0.9rem;
        white-space: nowrap;
        min-width: fit-content;
    }

    .mad-libs-input {
        flex: 1;
        min-width: 0;
        padding: 10px 14px !important;
        border: 1px solid #ddd !important;
        border-radius: 8px !important;
        font-size: 16px !important;
        background: #fff;
        color: #333 !important;
        transition: border-color 0.3s;
    }

    .mad-libs-input:focus {
        border-color: var(--routas-purple) !important;
        outline: none;
        box-shadow: 0 0 0 3px rgba(90, 93, 252, 0.1);
    }

    .mad-libs-input::placeholder {
        color: #999;
        font-size: 13px;
    }

    .mad-libs-select {
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
        padding-right: 35px !important;
    }

    .mad-libs-textarea {
        min-height: 70px;
        resize: vertical;
        font-family: inherit;
        line-height: 1.4;
    }

    .line-2 {
        width: 100%;
        height: 1px;
        background: linear-gradient(
            90deg,
            transparent 0%,
            rgba(0, 0, 0, 0.1) 50%,
            transparent 100%
        );
        margin: 0.5rem 0;
    }

    .btn-submit-form {
        width: 100%;
        max-width: 100%;
        padding: 14px 24px;
        font-size: 1rem;
        margin-top: 1.5rem;
    }

    .privacy-text {
        font-size: 0.75rem;
        padding: 0 0.5rem;
        margin-top: 1rem;
    }
} */

/* Small Mobile (576px - 767px) */
/* @media (min-width: 576px) and (max-width: 767.98px) {
    .hello-routas-form {
        max-width: 540px;
        margin: 0 auto;
    }

    .mad-libs-line {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .mad-libs-line-split {
        flex-direction: column;
        gap: 1rem;
    }

    .input-group-inline {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }

    .form-label-inline {
        font-weight: 600;
        color: var(--text-color);
        font-size: 1rem;
        white-space: nowrap;
        min-width: fit-content;
    }

    .mad-libs-input {
        flex: 1;
        min-width: 0;
        padding: 10px 14px !important;
        border: 1px solid #ddd !important;
        border-radius: 8px !important;
        font-size: 16px !important;
        background: #fff;
        color: #333 !important;
    }

    .mad-libs-input:focus {
        border-color: var(--routas-purple) !important;
        outline: none;
        box-shadow: 0 0 0 3px rgba(90, 93, 252, 0.1);
    }

    .mad-libs-select {
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
        padding-right: 35px !important;
    }

    .mad-libs-textarea {
        min-height: 70px;
        resize: vertical;
    }

    .line-2 {
        width: 100%;
        height: 1px;
        background: linear-gradient(
            90deg,
            transparent 0%,
            rgba(0, 0, 0, 0.1) 50%,
            transparent 100%
        );
        margin: 0.5rem 0;
    }

    .btn-submit-form {
        width: 100%;
        max-width: 400px;
        padding: 14px 24px;
        font-size: 1rem;
        margin-top: 1.5rem;
    }
} */

/* Tablet (768px - 991px) */
/* @media (min-width: 768px) and (max-width: 991.98px) {
    .hello-routas-form {
        max-width: 720px;
        margin: 0 auto;
    }

    .mad-libs-line {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .mad-libs-line-split {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        width: 100%;
    }

    .input-group-inline {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
    }

    .form-label-inline {
        font-weight: 600;
        color: var(--text-color);
        font-size: 1.05rem;
        white-space: nowrap;
        min-width: fit-content;
    }

    .mad-libs-input {
        flex: 1;
        padding: 10px 14px !important;
        border: 1px solid #ddd !important;
        border-radius: 8px !important;
        font-size: 16px !important;
        background: #fff;
        color: #333 !important;
        min-width: 0;
    }

    .mad-libs-input:focus {
        border-color: var(--routas-purple) !important;
        outline: none;
        box-shadow: 0 0 0 3px rgba(90, 93, 252, 0.1);
    }

    .mad-libs-select {
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        padding-right: 40px !important;
    }

    .mad-libs-textarea {
        min-height: 70px;
        resize: vertical;
        width: 100%;
    }

    .line-2 {
        width: 100%;
        height: 1px;
        background: linear-gradient(
            90deg,
            transparent 0%,
            rgba(0, 0, 0, 0.1) 50%,
            transparent 100%
        );
        margin: 0.75rem 0;
    }

    .btn-submit-form {
        width: auto;
        min-width: 300px;
        padding: 12px 40px;
        font-size: 1rem;
        margin-top: 1.5rem;
    }

    .privacy-text {
        font-size: 0.8rem;
        margin-top: 1rem;
    }
} */

/* Dark Mode Support for Form */
/* [data-bs-theme="dark"] {
    @media (max-width: 991.98px) {
        .mad-libs-input {
            background: #1a1a1a !important;
            border-color: #333 !important;
            color: #fff !important;
        }

        .mad-libs-input::placeholder {
            color: #666;
        }

        .mad-libs-input:focus {
            border-color: var(--routas-neon) !important;
            box-shadow: 0 0 0 3px rgba(192, 254, 0, 0.1);
        }

        .form-label-inline {
            color: #fff;
        }

        .mad-libs-select {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        }
    }
} */

/* Touch Device Optimizations */
/* @media (max-width: 991.98px) and (hover: none) and (pointer: coarse) {
    .mad-libs-input,
    .mad-libs-select,
    .mad-libs-textarea {
        font-size: 16px !important; 
        min-height: 44px;
    }

    .btn-submit-form {
        min-height: 48px;
    }
} */

/* Landscape Mode Adjustments */
/* @media (max-width: 991.98px) and (orientation: landscape) and (max-height: 500px) {
    .mad-libs-title {
        font-size: 1.5rem !important;
        margin-bottom: 1rem;
    }

    .form-row-wrapper {
        margin-bottom: 0.5rem;
    }

    .mad-libs-input,
    .mad-libs-select {
        padding: 8px 12px !important;
    }

    .btn-submit-form {
        margin-top: 1rem;
        padding: 10px 24px;
    }

    .line-2 {
        margin: 0.25rem 0;
    }
} */
