/* ============================================
   eSIM Morocco - Styles
   Pure CSS, system fonts, mobile-first
   ============================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Design System Colors: Deep Blue, Yellow, Navy */
    --primary: #1E3A8A;        /* Deep Blue */
    --primary-dark: #1E293B;   /* Navy */
    --accent: #FBBF24;         /* Yellow */
    --accent-dark: #F59E0B;    /* Darker Yellow */
    --success: #10B981;
    --text: #0F172A;           /* Navy for text */
    --text-muted: #64748B;
    --bg: #FFFFFF;
    --bg-light: #F8FAFC;
    --border: #E2E8F0;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background-color: var(--bg);


/* Skip to main content link for keyboard navigation */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1rem 1.5rem;
    background-color: var(--accent);
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 0.5rem 0;
}

.skip-to-main:focus {
    left: 0;
    top: 0;
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

    line-height: 1.6;
    font-size: 16px;
    /* Large x-height for legibility */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* PWA safe area support for notched devices */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    /* Smooth scrolling */
    scroll-behavior: smooth;
    /* Prevent text size adjustment on orientation change */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* PWA fullscreen mode adjustments */
@media (display-mode: standalone) {
    body {
        overscroll-behavior-y: contain;
    }

    header {
        padding-top: max(1rem, env(safe-area-inset-top));
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
header {
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.lang-toggle {
    display: flex;
    gap: 0.25rem;
    background-color: var(--bg-light);
    padding: 0.25rem;
    border-radius: 0.5rem;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: none;
    background-color: transparent;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.lang-btn:hover {
    background-color: var(--bg);
    color: var(--text);
}

.lang-btn.active {
    background-color: var(--primary);
    color: white;
}

.lang-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.device-compatibility {
    animation: fadeIn 0.5s ease-in;
}

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

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.affiliate-disclosure {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin: 1.5rem auto;
    max-width: 600px;
    backdrop-filter: blur(10px);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-cta-whatsapp {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* Buttons */
.btn {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    /* Mobile touch optimization */
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
    user-select: none;
    min-height: 44px;
    min-width: 44px;
}

/* WCAG 2.1 AA Focus Indicators */
.btn:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 0.25rem;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-color: var(--primary);
}

button:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--primary-dark);
    font-weight: 700;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
    background-color: var(--accent-dark);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background-color: var(--accent);
    color: var(--primary-dark);
}

.btn-buy {
    background-color: var(--success);
    color: white;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    white-space: nowrap;
    min-width: fit-content;
}

.btn-buy:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

.btn-buy.non-affiliate {
    background-color: var(--text-muted);
}

.btn-buy.non-affiliate:hover {
    background-color: #475569;
}

@media (prefers-reduced-motion: reduce) {
    .btn:hover {
        transform: none;
    }
}

/* Global Country Selector Section */
.country-selector-section {
    padding: 3rem 0;
    background-color: var(--bg-light);
    border-bottom: 2px solid var(--border);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.global-country-search-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.global-country-search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    transition: all 0.2s;
    background-color: white;
}

.global-country-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.global-country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 2px solid var(--border);
    border-top: none;
    border-radius: 0 0 0.75rem 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 25px var(--shadow);
    z-index: 50;
    margin-top: -0.5rem;
}

.global-country-dropdown-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.15s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--bg-light);
}

.global-country-dropdown-item:last-child {
    border-bottom: none;
}

.global-country-dropdown-item:hover {
    background-color: var(--bg-light);
}

.global-country-dropdown-item.selected {
    background-color: rgba(79, 70, 229, 0.1);
}

.country-item-flag {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.country-item-text {
    flex-grow: 1;
}

.country-item-name {
    font-weight: 600;
    color: var(--text);
}

.country-item-code {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.selected-country-display {
    max-width: 600px;
    margin: 2rem auto 0;
}

.selected-country-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 4px 12px var(--shadow);
}

.selected-country-flag {
    font-size: 3rem;
}

.selected-country-name {
    flex-grow: 1;
    font-size: 1.5rem;
    font-weight: 700;
}

.btn-change-country {
    padding: 0.75rem 1.5rem;
    background-color: white;
    color: var(--primary);
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-change-country:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Comparison Section */
.comparison {
    padding: 4rem 0;
    background-color: var(--bg);
}

.comparison h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text);
}

.comparison-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05) 0%, rgba(30, 41, 59, 0.05) 100%);
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 180px;
}

.control-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.control-group select {
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    background-color: white;
    transition: border-color 0.2s;
}

.control-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-reset {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.recommended-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.table-container {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px var(--shadow);
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.table-container::after {
    content: '→';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(to left, white 50%, transparent);
    padding: 1rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

@media (max-width: 767px) {
    .table-container::after {
        opacity: 1;
    }
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg);
    font-size: 0.9rem;
    table-layout: fixed;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Column widths for consistent layout - Desktop only */
@media (min-width: 768px) {
    .comparison-table th:nth-child(1),
    .comparison-table td:nth-child(1) {
        width: 12% !important;
    }

    .comparison-table th:nth-child(2),
    .comparison-table td:nth-child(2) {
        width: 10% !important;
    }

    .comparison-table th:nth-child(3),
    .comparison-table td:nth-child(3) {
        width: 10% !important;
    }

    .comparison-table th:nth-child(4),
    .comparison-table td:nth-child(4) {
        width: 8% !important;
    }

    .comparison-table th:nth-child(5),
    .comparison-table td:nth-child(5) {
        width: 10% !important;
    }

    .comparison-table th:nth-child(6),
    .comparison-table td:nth-child(6) {
        width: 8% !important;
    }

    .comparison-table th:nth-child(7),
    .comparison-table td:nth-child(7) {
        width: 22% !important;
    }

    .comparison-table th:nth-child(8),
    .comparison-table td:nth-child(8) {
        width: 20% !important;
        text-align: center;
    }
}

.comparison-table th {
    background-color: var(--bg-light);
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

/* Desktop table layout - ensure proper alignment */
@media (min-width: 768px) {
    .comparison-table {
        table-layout: fixed !important;
    }
    
    .comparison-table,
    .comparison-table tbody,
    .comparison-table tr,
    .comparison-table thead,
    .comparison-table th,
    .comparison-table td {
        display: table !important;
    }
    
    .comparison-table tbody {
        display: table-row-group !important;
    }
    
    .comparison-table thead {
        display: table-header-group !important;
    }
    
    .comparison-table tr {
        display: table-row !important;
    }
    
    .comparison-table th,
    .comparison-table td {
        display: table-cell !important;
    }
    
    .comparison-table thead.sticky-header {
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .comparison-table thead.sticky-header th {
        box-shadow: 0 2px 4px var(--shadow);
    }
}

.comparison-table tbody tr:hover {
    background-color: var(--bg-light);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary);
    color: white;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

.table-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-style: italic;
}

/* Concierge Section */
.concierge {
    background-color: var(--bg-light);
    padding: 4rem 0;
    transition: background-color 0.3s ease;
}

/* WhatsApp hook styling - keep WhatsApp brand colors */
.concierge.whatsapp-hook {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.concierge.whatsapp-hook .btn-primary {
    background-color: var(--accent);
    color: var(--primary-dark);
}

.concierge-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.concierge h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.concierge.whatsapp-hook h2 {
    color: white;
}

.concierge p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.concierge.whatsapp-hook p {
    color: rgba(255, 255, 255, 0.95);
}

.concierge.whatsapp-hook .btn-primary:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
}

/* FAQ Section */
.faq {
    padding: 4rem 0;
    background-color: var(--bg);
}

.faq h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.faq-item p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Footer */
footer {
    background-color: var(--text);
    color: white;
    padding: 3rem 0 2rem;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    text-decoration: underline;
}

.affiliate-disclosure-footer {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.disclaimer {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    font-style: italic;
}

.copyright {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Recommender Section */
.recommender {
    background-color: #F1F5F9;
    padding: 4rem 0;
}

.recommender h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--text);
}

.recommender-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.recommender-form {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--bg);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px var(--shadow);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 0.875rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Country Search Styles */
.country-search-wrapper {
    position: relative;
}

.country-search-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.country-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.country-search-input::placeholder {
    color: var(--text-muted);
}

.country-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.2s ease;
}

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

.country-dropdown::-webkit-scrollbar {
    width: 8px;
}

.country-dropdown::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 0 0.75rem 0.75rem 0;
}

.country-dropdown::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.country-option {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--bg-light);
}

.country-option:last-child {
    border-bottom: none;
}

.country-option:hover {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.08) 0%, rgba(79, 70, 229, 0.03) 100%);
}

.country-option.selected {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.15) 0%, rgba(79, 70, 229, 0.08) 100%);
}

.country-flag {
    font-size: 1.75rem;
    line-height: 1;
    min-width: 2rem;
    text-align: center;
}

.country-name {
    font-weight: 500;
    color: var(--text);
    flex: 1;
}

.country-code {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-light);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.no-countries {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.country-label-flag {
    font-size: 1.25rem;
    margin-left: 0.5rem;
    display: inline-block;
    vertical-align: middle;
}

.form-filters {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
}

.checkbox-label input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
}

#findPlanBtn {
    width: 100%;
    background-color: var(--primary);
    color: white;
}

#findPlanBtn:hover {
    background-color: var(--primary-dark);
}

.recommender-results {
    max-width: 1200px;
    margin: 3rem auto 0;
}

.top-rec-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px var(--shadow);
}

.top-rec-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
}

.top-rec-details {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
}

.top-rec-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
}

.top-rec-provider {
    font-size: 1.25rem;
    font-weight: 700;
}

.top-rec-name {
    font-size: 0.9375rem;
    opacity: 0.9;
}

.top-rec-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.top-rec-explanation {
    font-size: 0.9375rem;
    line-height: 1.6;
    opacity: 0.95;
    margin: 0;
}

.results-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: flex-end;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05) 0%, rgba(30, 41, 59, 0.05) 100%);
    border-radius: 1rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.08);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    flex: 1;
    min-width: 160px;
}

.filter-group label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select {
    padding: 0.75rem 1rem;
    border: 2px solid transparent;
    border-radius: 0.625rem;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, var(--primary), var(--primary-dark)) border-box;
    color: var(--text);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-group select:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.filter-group select:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.btn-reset-filters {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-reset-filters:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-reset-filters:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-load-more {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 2rem auto;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, #6366F1 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-load-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.btn-load-more:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

@media (max-width: 768px) {
    .results-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        min-width: unset;
    }

    .btn-reset-filters {
        width: 100%;
    }
}

.results-table-container {
    overflow-x: auto;
    background-color: var(--bg);
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px var(--shadow);
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
    .results-table-container {
        margin: 0;
        padding: 0 1rem;
        border-radius: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .results-table {
        min-width: unset;
        width: 100%;
    }
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.results-table th,
.results-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.results-table td:last-child {
    white-space: nowrap;
    min-width: fit-content;
}

.results-table th {
    background-color: var(--bg-light);
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.results-table tbody tr:hover {
    background-color: var(--bg-light);
}

/* Top 3 Result Styling */
.results-table tr.rank-1 {
    background: linear-gradient(90deg, #FEF3C7 0%, #FDE68A 100%);
    border-left: 4px solid #F59E0B;
}

.results-table tr.rank-1:hover {
    background: linear-gradient(90deg, #FDE68A 0%, #FCD34D 100%);
}

.results-table tr.rank-2 {
    background-color: #F3F4F6;
    border-left: 4px solid #9CA3AF;
}

.results-table tr.rank-2:hover {
    background-color: #E5E7EB;
}

.results-table tr.rank-3 {
    background-color: #FEF2F2;
    border-left: 4px solid #F87171;
}

.results-table tr.rank-3:hover {
    background-color: #FEE2E2;
}

/* Keep legacy top-result class for backwards compatibility */
.results-table tr.top-result {
    background: linear-gradient(90deg, #FEF3C7 0%, #FDE68A 100%);
    border-left: 4px solid #F59E0B;
}

.results-table tr.top-result:hover {
    background: linear-gradient(90deg, #FDE68A 0%, #FCD34D 100%);
}

.type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.type-badge.type-fixed {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.type-badge.type-unlimited {
    background-color: #F3E8FF;
    color: #6B21A8;
}

.feature-yes {
    color: #047857;
    font-weight: 600;
    font-size: 1.125rem;
}

.feature-no {
    color: #DC2626;
    font-weight: 600;
    font-size: 1.125rem;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* Responsive */
@media (min-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .comparison-table {
        font-size: 1rem;
    }

    .form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    /* Typography */
    .hero-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* Comparison controls */
    .comparison-controls {
        flex-direction: column;
        padding: 1rem;
    }

    .control-group {
        width: 100%;
        min-width: unset;
    }

    .btn-reset {
        width: 100%;
    }

    .recommended-badge {
        display: block;
        margin-left: 0;
        margin-top: 0.5rem;
        text-align: center;
    }

    /* Mobile Card Layout for Comparison Table - Perfect Edition */
    .comparison-table {
        table-layout: auto;
    }
    
    .comparison-table thead {
        display: none;
    }

    .comparison-table,
    .comparison-table tbody,
    .comparison-table tr {
        display: block;
        width: 100%;
    }
    
    /* Override desktop column widths on mobile */
    .comparison-table th,
    .comparison-table td {
        width: 100% !important;
    }

    .comparison-table tr {
        margin-bottom: 1.75rem;
        background: white;
        border-radius: 1.5rem;
        padding: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(0, 0, 0, 0.1);
        border-bottom: none;
        border: 2px solid var(--border);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
    }

    .comparison-table tr:active {
        transform: translateY(2px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 6px 16px rgba(0, 0, 0, 0.1);
    }

    /* Provider name header - more prominent */
    .comparison-table td:first-child {
        font-size: 1.25rem;
        font-weight: 800;
        color: white;
        padding: 1.25rem 1.5rem;
        margin-bottom: 0;
        border-bottom: none;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        letter-spacing: -0.02em;
    }

    .comparison-table td:first-child::before {
        display: none;
    }

    /* Data rows with better spacing and alignment */
    .comparison-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.875rem 1.25rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        font-size: 0.9375rem;
        line-height: 1.4;
        color: var(--text);
        gap: 0.75rem;
        min-height: 3rem;
    }

    .comparison-table td:last-child {
        border-bottom: none;
        padding: 1.5rem 1.25rem;
        background: linear-gradient(135deg, rgba(79, 70, 229, 0.03) 0%, rgba(79, 70, 229, 0.01) 100%);
        display: flex;
        justify-content: stretch;
    }

    .comparison-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
        font-size: 0.6875rem;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        line-height: 1.3;
        text-align: left;
        white-space: nowrap;
        flex: 0 0 auto;
        max-width: 35%;
    }

    .comparison-table .td-value {
        text-align: right;
        font-weight: 600;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1 1 auto;
        min-width: 0;
    }

    /* Style 5G, Hotspot, eKYC cells on mobile */
    .comparison-table td:nth-child(4),
    .comparison-table td:nth-child(5),
    .comparison-table td:nth-child(6) {
        font-size: 0.875rem;
        padding: 0.75rem 1.25rem;
    }

    /* Hide Best For column on mobile - not essential */
    .comparison-table td:nth-child(7) {
        display: none;
    }

    /* Buy button styling - prominent CTA */
    .comparison-table td:last-child .btn-buy {
        width: 100%;
        padding: 1.25rem 2rem;
        font-size: 1.125rem;
        font-weight: 800;
        border-radius: 1rem;
        box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .comparison-table td:last-child .btn-buy:active {
        transform: translateY(2px);
        box-shadow: 0 3px 8px rgba(16, 185, 129, 0.25);
    }

    /* Badge styling in cards - enhanced visibility */
    .comparison-table .badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
        display: inline-block;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: white;
        border-radius: 1rem;
        font-weight: 700;
        line-height: 1.3;
        box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
        white-space: nowrap;
        text-align: center;
    }

    .comparison-table .recommended-badge {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
        margin-top: 0.5rem;
        display: inline-block;
        box-shadow: 0 3px 8px rgba(255, 215, 0, 0.4);
        font-weight: 800;
    }

    /* Mobile Card Layout for Results Table (Find Your Perfect Plan) */
    .results-table-container {
        margin: 0;
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        position: relative;
        box-sizing: border-box;
    }
    
    .results-table {
        table-layout: auto;
    }

    .results-table thead {
        display: none;
    }

    .results-table,
    .results-table tbody,
    .results-table tr {
        display: block;
        width: 100%;
        max-width: 100%;
    }
    
    /* Override desktop column widths on mobile */
    .results-table th,
    .results-table td {
        width: 100% !important;
    }

    .results-table tr {
        margin-bottom: 1.5rem;
        background: white;
        border-radius: 1.25rem;
        padding: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.08);
        border-bottom: none;
        border-left: none !important;
        border: 1px solid var(--border);
        transition: transform 0.2s, box-shadow 0.2s;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .results-table tr:active {
        transform: scale(0.98);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    /* Preserve rank styling on mobile with enhanced visuals */
    .results-table tr.rank-1 {
        background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
        border-left: 6px solid #F59E0B !important;
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2), 0 8px 24px rgba(245, 158, 11, 0.15);
    }

    .results-table tr.rank-2 {
        background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
        border-left: 6px solid #9CA3AF !important;
        box-shadow: 0 2px 8px rgba(156, 163, 175, 0.15), 0 6px 20px rgba(156, 163, 175, 0.1);
    }

    .results-table tr.rank-3 {
        background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
        border-left: 6px solid #F87171 !important;
        box-shadow: 0 2px 8px rgba(248, 113, 113, 0.15), 0 6px 20px rgba(248, 113, 113, 0.1);
    }

    .results-table tr.top-result {
        background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
        border-left: 6px solid #F59E0B !important;
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2), 0 8px 24px rgba(245, 158, 11, 0.15);
    }

    .results-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        padding: 0.875rem 1.25rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
        font-size: 0.9375rem;
        line-height: 1.4;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }

    .results-table td:last-child {
        border-bottom: none;
        display: flex;
        justify-content: stretch;
        padding: 1.25rem;
        background: var(--bg-light);
    }

    .results-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        text-align: left;
        font-size: 0.6875rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        line-height: 1.3;
        white-space: nowrap;
        flex: 0 0 auto;
        max-width: 45%;
    }
    
    .results-table .td-value {
        text-align: right;
        font-weight: 600;
        flex: 1 1 auto;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Rank badge styling */
    .results-table td:first-child {
        display: flex;
        padding: 1rem;
        margin-bottom: 0;
        border-bottom: 2px solid rgba(79, 70, 229, 0.12);
        justify-content: center;
        background: linear-gradient(135deg, rgba(79, 70, 229, 0.06) 0%, rgba(79, 70, 229, 0.02) 100%);
    }

    .results-table td:first-child::before {
        display: none;
    }

    /* Plan name styling - improved hierarchy */
    .results-table td:nth-child(2) {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
        padding: 1rem 1.25rem;
        border-bottom: 2px solid rgba(0, 0, 0, 0.06);
    }

    .results-table td:nth-child(2)::before {
        font-size: 0.6875rem;
        margin-bottom: 0.125rem;
    }

    .results-table td:nth-child(2) strong {
        font-size: 1.125rem;
        color: var(--primary);
        font-weight: 700;
        line-height: 1.3;
    }

    .results-table td:nth-child(2) span {
        display: block;
        line-height: 1.4;
    }

    /* Type badge - better sizing and alignment */
    .results-table td:nth-child(3) {
        grid-template-columns: 45% 55%;
        align-items: center;
    }

    .results-table .type-badge {
        font-size: 0.75rem;
        padding: 0.3125rem 0.75rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        white-space: nowrap;
        text-align: center;
        justify-self: start;
    }

    /* Data values alignment - right-align values for better readability */
    .results-table td:not(:first-child):not(:nth-child(2)):not(:last-child) {
        font-weight: 600;
        color: var(--text);
    }

    .results-table td:not(:first-child):not(:nth-child(2)):not(:last-child) strong,
    .results-table td:not(:first-child):not(:nth-child(2)):not(:last-child) span {
        text-align: right;
        justify-self: end;
    }

    /* Trip cost emphasis - key decision metric */
    .results-table td:nth-child(8) {
        background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%);
        padding: 1rem 1.25rem;
        margin: 0.5rem 0;
        border-radius: 0.75rem;
        border: 1px solid rgba(79, 70, 229, 0.2);
        box-shadow: 0 2px 6px rgba(79, 70, 229, 0.15);
        grid-template-columns: 45% 55%;
    }

    .results-table td:nth-child(8) strong {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--primary);
        text-align: right;
        justify-self: end;
    }

    /* Feature icons better alignment */
    .results-table .feature-yes,
    .results-table .feature-no {
        text-align: right;
        justify-self: end;
    }

    /* Buy button - make it stand out */
    .results-table td:last-child .btn-buy {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        font-weight: 700;
        border-radius: 0.75rem;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
        transition: all 0.2s;
    }

    .results-table td:last-child .btn-buy:active {
        transform: scale(0.97);
        box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    .btn-buy {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    /* Cards */
    .top-rec-card {
        padding: 1.75rem 1.5rem;
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    }

    .top-rec-card h3 {
        font-size: 1.375rem;
        margin-bottom: 1.25rem;
    }

    .top-rec-stats {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }

    .top-rec-stats .stat-label {
        font-size: 0.8125rem;
    }

    .top-rec-stats .stat-value {
        font-size: 1.625rem;
    }

    .top-rec-explanation {
        font-size: 1rem;
        line-height: 1.65;
    }

    .selected-country-card {
        flex-direction: column;
        text-align: center;
    }

    .selected-country-flag {
        font-size: 2rem;
    }

    .selected-country-name {
        font-size: 1.25rem;
    }

    /* Forms */
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-filters {
        flex-direction: column;
        gap: 1rem;
    }

    /* Hero CTA */
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .hero-cta-whatsapp {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta-whatsapp .btn {
        width: 100%;
    }

    /* Results filters */
    .results-filters {
        padding: 1rem;
    }

    /* Footer */
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .container {
        padding: 0 0.75rem;
    }

    .hero {
        padding: 2rem 0;
    }

    section {
        padding: 2rem 0;
    }

    .comparison,
    .recommender,
    .faq {
        padding: 2rem 0;
    }

    .badge {
        font-size: 0.625rem;
        padding: 0.125rem 0.5rem;
    }

    .type-badge {
        font-size: 0.625rem;
        padding: 0.125rem 0.5rem;
    }
}