/* Ecuador eVisa Website - Responsive Styles */
/* Mobile-first approach with minimal scrolling and compact design */

/* Extra Large Devices (1400px and up) */
@media (min-width: 1400px) {
    .container-fluid {
        max-width: 100%;
        padding: 0 2rem;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .hero .lead {
        font-size: 1.4rem;
    }
    
    .section {
        padding: 100px 0;
    }
}

/* Large Devices (1200px and up) */
@media (min-width: 1200px) {
    .container-fluid {
        max-width: 100%;
        padding: 0 1.5rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1.2rem !important;
    }
    
    .hero {
        padding: 100px 0;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .feature-box {
        padding: 2.5rem;
    }
    
    .process-step {
        padding: 2.5rem 1.5rem;
    }
}

/* Medium Devices (992px and up) */
@media (min-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero .lead {
        font-size: 1.3rem;
    }
    
    .navbar-expand-lg .navbar-nav {
        gap: 0.5rem;
    }
    
    .process-step::after {
        display: block;
    }
    
    .stats-number {
        font-size: 3.5rem;
    }
}

/* Small Devices (768px and up) */
@media (min-width: 768px) {
    .hero {
        padding: 80px 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .feature-box {
        padding: 2rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .testimonial {
        padding: 2rem;
    }
}

/* Extra Small Devices (576px and up) */
@media (min-width: 576px) {
    .container-fluid {
        padding: 0 1rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .btn {
        padding: 12px 20px;
    }
    
    .btn-lg {
        padding: 14px 28px;
    }
}

/* Mobile Devices (575px and down) */
@media (max-width: 575.98px) {
    /* Reduce overall spacing for mobile */
    :root {
        --section-padding: 30px 0;
        --container-padding: 0 10px;
    }
    
    body {
        font-size: 14px;
    }
    
    /* Typography adjustments */
    h1 {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 0.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }
    
    h3 {
        font-size: 1.3rem;
        margin-bottom: 0.6rem;
    }
    
    h4 {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }
    
    p {
        margin-bottom: 0.8rem;
    }
    
    /* Header adjustments */
    .navbar {
        padding: 0.3rem 0;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-brand img {
        height: 30px;
    }
    
    .navbar-toggler {
        padding: 0.2rem 0.5rem;
        font-size: 1rem;
        border: none;
    }
    
    .navbar-collapse {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0 !important;
        font-size: 0.9rem;
    }
    
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none;
        border: 1px solid var(--border-color);
        margin-top: 0.5rem;
    }
    
    /* Hero section mobile */
    .hero {
        padding: 40px 0;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .hero .lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* Button adjustments */
    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-lg {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    /* Card adjustments */
    .card {
        margin-bottom: 1rem;
        border-radius: 8px;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-footer {
        padding: 0.8rem 1rem;
    }
    
    /* Feature boxes mobile */
    .feature-box {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    /* Process steps mobile */
    .process-step {
        padding: 1.5rem 0.5rem;
        margin-bottom: 1rem;
    }
    
    .process-step::after {
        display: none;
    }
    
    .process-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }
    
    /* Statistics mobile */
    .stats-box {
        padding: 1.5rem 0.5rem;
        margin-bottom: 1rem;
    }
    
    .stats-number {
        font-size: 2rem;
    }
    
    .stats-label {
        font-size: 0.8rem;
    }
    
    /* Testimonials mobile */
    .testimonial {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .testimonial::before {
        font-size: 3rem;
        top: -5px;
        left: 15px;
    }
    
    /* FAQ mobile */
    .faq-question {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .faq-answer {
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
    }
    
    /* Form adjustments */
    .form-control {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    /* Table mobile */
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.5rem;
    }
    
    /* Footer mobile */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer h5 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .footer .col-md-3 {
        margin-bottom: 1.5rem;
    }
    
    .footer-bottom {
        margin-top: 1.5rem;
        padding-top: 1rem;
        font-size: 0.8rem;
    }
    
    /* Utility adjustments */
    .mb-4 {
        margin-bottom: 1rem !important;
    }
    
    .mb-5 {
        margin-bottom: 1.5rem !important;
    }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Scroll to top mobile */
    .scroll-to-top {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
    
    /* Hide elements on mobile */
    .d-none-mobile {
        display: none !important;
    }
    
    /* Show only on mobile */
    .d-mobile-only {
        display: block !important;
    }
    
    /* Compact spacing */
    .section-sm {
        padding: 20px 0;
    }
    
    .section {
        padding: 30px 0;
    }
    
    .section-lg {
        padding: 40px 0;
    }
    
    /* Image adjustments */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Breadcrumb mobile */
    .breadcrumb {
        padding: 0.8rem 1rem;
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    
    /* Alert mobile */
    .alert {
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    /* Navigation improvements for touch */
    .navbar-nav .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Improve touch targets */
    .faq-question {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Reduce animation on mobile for performance */
    .card:hover {
        transform: none;
    }
    
    .feature-box:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Very Small Devices (480px and down) */
@media (max-width: 479.98px) {
    :root {
        --container-padding: 0 8px;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .hero .lead {
        font-size: 0.95rem;
    }
    
    .feature-box {
        padding: 1rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .stats-number {
        font-size: 1.8rem;
    }
    
    .testimonial {
        padding: 1rem;
    }
    
    .card-body {
        padding: 0.8rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.3rem;
        font-size: 0.75rem;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 20px 0;
    }
    
    .section {
        padding: 20px 0;
    }
    
    .navbar {
        padding: 0.2rem 0;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .navbar-brand img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .scroll-to-top,
    .btn {
        display: none !important;
    }
    
    .hero {
        padding: 1rem 0;
    }
    
    .section {
        padding: 1rem 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
}


/* Enhanced Mobile Optimization */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero .lead {
        font-size: 1rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .feature-box {
        margin-bottom: 1.5rem;
    }
    
    .stats-box {
        margin-bottom: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .process-step {
        margin-bottom: 2rem;
    }
    
    .testimonial {
        margin-bottom: 1.5rem;
    }
    
    .form-control {
        padding: 0.75rem;
    }
    
    .input-group-lg .form-control {
        padding: 0.75rem 1rem;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero {
        padding: 3rem 0;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .card-columns {
        column-count: 1;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero {
        padding: 4rem 0;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .card-columns {
        column-count: 2;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .hero {
        padding: 5rem 0;
    }
    
    .section {
        padding: 5rem 0;
    }
    
    .card-columns {
        column-count: 3;
    }
    
    .container-fluid {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container-fluid {
        padding-left: 3rem;
        padding-right: 3rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .section h2 {
        font-size: 2.5rem;
    }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
    .container-fluid {
        padding-left: 4rem;
        padding-right: 4rem;
    }
    
    .hero {
        padding: 6rem 0;
    }
    
    .section {
        padding: 6rem 0;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .form-control {
        min-height: 44px;
    }
    
    .card {
        transition: none;
    }
    
    .card:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .alert {
        display: none !important;
    }
    
    .section {
        padding: 1rem 0;
    }
    
    .card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
    
    .bg-primary,
    .bg-secondary,
    .bg-info,
    .bg-success,
    .bg-warning,
    .bg-danger {
        background: #f8f9fa !important;
        color: #333 !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #333;
    }
    
    .btn-outline-primary {
        border-width: 2px;
    }
    
    .text-muted {
        color: #666 !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .counter {
        animation: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .bg-light-blue {
        background-color: #1a1a2e !important;
        color: #fff;
    }
    
    .bg-light-yellow {
        background-color: #16213e !important;
        color: #fff;
    }
    
    /* .card {
        background-color: #2a2a3e;
        border-color: #444;
        color: #fff;
    } */
    
    .text-muted {
        color: #ccc !important;
    }
}

/* Landscape Orientation for Mobile */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .hero {
        padding: 1rem 0;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero .lead {
        font-size: 0.9rem;
    }
    
    .section {
        padding: 1.5rem 0;
    }
    
    .navbar {
        padding: 0.25rem 1rem;
    }
}

/* Specific Mobile Navigation Improvements */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.98);
        border-radius: 0.5rem;
        margin-top: 0.5rem;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav .nav-link {
        border-bottom: 1px solid #eee;
        margin-bottom: 0.25rem;
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        border: none;
        box-shadow: none;
        background: transparent;
    }
    
    .dropdown-item {
        padding: 0.5rem 1rem;
        border-bottom: 1px solid #f0f0f0;
    }
}

/* Form Improvements for Mobile */
@media (max-width: 767.98px) {
    .form-row .col-md-6,
    .form-row .col-md-4,
    .form-row .col-md-3 {
        margin-bottom: 1rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group .btn {
        border-radius: 0.375rem;
        margin-top: 0.5rem;
    }
    
    .input-group .form-control {
        border-radius: 0.375rem;
    }
}

/* Table Improvements for Mobile */
@media (max-width: 767.98px) {
    .table-responsive table {
        font-size: 0.8rem;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 0.5rem 0.25rem;
    }
    
    .table-responsive .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Card Layout Improvements */
@media (max-width: 575.98px) {
    .card.shadow-medium {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .card-footer {
        padding: 0.75rem 1rem;
    }
    
    .card-img-top {
        height: 200px;
        object-fit: cover;
    }
}

/* Stats and Counter Improvements */
@media (max-width: 575.98px) {
    .stats-number {
        font-size: 2rem;
    }
    
    .stats-label {
        font-size: 0.85rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .process-number {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Accessibility Improvements */
@media (max-width: 767.98px) {
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .form-control {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

