* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Main page variables */
:root {
    --primary: #1e5eff;
    --primary-dark: #0a3d91;
    --secondary: #00c6ff;
    --accent: #7b61ff;
    --light: #f0f7ff;
    --dark: #2a303c;
    --gray: #5d6977;
    --border-radius: 20px;
    --shadow: 0 10px 30px rgba(30, 94, 255, 0.1);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Body styles for main page */
body {
    background: radial-gradient(circle at top right, #f0f7ff 0%, #e0edff 100%);
    color: var(--dark);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Body styles for numbers page */
body.esim-numbers {
    background: linear-gradient(135deg, #f5f9ff 0%, #e6f0ff 100%);
    padding: 40px 20px;
    color: #333;
}

/* Body styles for detail page */
body.esim-detail {
    background: #f5f7fa;
    padding: 20px;
    color: #333;
}

/* Common container styles */
.container {
    /*
    max-width: 1300px;
    */
    padding: 0 20px;
    margin: 0 auto;
}

/* Detail page container */
body.esim-detail .container {
    /*
    max-width: 400px;
    */
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Header Styles - Main Page */
header {
    padding: 8px 0;
    background: white;
    box-shadow: var(--shadow);
    position: relative;
    transition: var(--transition);
}

header.scrolled {
    padding: 15px 0;
    box-shadow: 0 5px 20px rgba(30, 94, 255, 0.15);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    color: #147fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
}

.logo i {
    margin-right: 10px;
    color: #1773ff;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    padding: 10px 0;
    text-align: center;
    position: relative;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="400" viewBox="0 0 1200 400"><path fill="%231e5eff" fill-opacity="0.03" d="M0,200 Q300,100 600,200 T1200,200 V400 H0 Z"/></svg>') no-repeat bottom/100% auto;
}

/*
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="800" height="600" viewBox="0 0 800 600"><path fill="%230070c0" fill-opacity="0.05" d="M400,100 Q550,50 700,200 T800,400 L400,400 Z"/></svg>') no-repeat center/contain;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30%;
    height: 60%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="600" height="400" viewBox="0 0 600 400"><path fill="%233a86ff" fill-opacity="0.03" d="M100,300 Q200,450 300,300 T500,300 L100,300 Z"/></svg>') no-repeat center/contain;
}
*/

/* Typography */
h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

/* Typography for numbers page */
body.esim-numbers h1 {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, #0070c0, #004080);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    /*
    max-width: 700px;
    */
    margin: 0 auto 10px;
    line-height: 1.6;
}

/* Common button styles */
.cta-button, .start-button {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover, .start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 112, 192, 0.3);
}

/* Tab Navigation - Common */
.tab-container {
    display: flex;
    background: white;
    border-radius: 50px;
    padding: 8px;
    margin: 0 auto 50px;
    box-shadow: var(--shadow);
    max-width: 700px;
    border: 1px solid rgba(30, 94, 255, 0.1);
}

/* Tab Navigation - Numbers page */
body.esim-numbers .tab-container {
    padding: 6px;
    max-width: 650px;
}

.tab {
    flex: 1;
    padding: 15px 25px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    font-size: 1.1rem;
    text-align: center;
    color: #555;
    position: relative;
}

.tab.active {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 5px 15px rgba(30, 94, 255, 0.3);
}

/* Tab active state for numbers page */
body.esim-numbers .tab.active {
    background: linear-gradient(90deg, #0070c0, #004080);
    box-shadow: 0 4px 10px rgba(0, 80, 180, 0.3);
}

/* Package Card Styles - Numbers page */
.packages-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    /*
    max-width: 1100px;
    */
    margin: 0 auto 50px;
}

.package-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 80, 160, 0.3);
    padding: 30px;
    color: #000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.package-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 80, 160, 0.4);
}

.card-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 25px;
}

.provider-logo {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #0070c0;
    font-weight: 700;
}

.global-badge {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.package-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: -0.5px;
    text-align: left;
}

.package-description {
    font-size: 1rem;
    margin-bottom: 25px;
    opacity: 0.9;
    line-height: 1.5;
}

.package-features {
    margin-bottom: 25px;
}

.feature-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 1.05rem;
    padding: 8px 0;
}

.feature-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 600;
}

.feature-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.feature i {
    margin-right: 10px;
    color: #ffd700;
    font-size: 1.1rem;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

.buy-button {
    background: #a0d2fa;
    color: #0070c0;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.free-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid white;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.buy-button:hover {
    background: #004080;
    color: white;
    transform: translateY(-2px);
}

.free-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Filter Bar - Numbers page */
.filter-bar {
    display: flex;
    justify-content: space-between;
    margin: 0 auto 10px;
    max-width: 1100px;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.country-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 25px;
    padding: 12px 20px;
    box-shadow: 0 2px 8px rgba(0, 60, 140, 0.1);
    cursor: pointer;
    max-width: 80%;
}

.country-flag {
    width: 40px !important;
    height: 40px !important;
    border-radius: 3px;
    margin-right: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative;
    background-color: white;
}

.country-flag .flag-icon {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: transparent !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

.country-name {
    font-weight: 600;
    color: #004080;
}

.sort-selector {
    background: white;
    border-radius: 25px;
    padding: 8px 16px;
    box-shadow: 0 2px 8px rgba(0, 60, 140, 0.1);
    cursor: pointer;
}

.sort-dropdown {
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #0070c0;
    cursor: pointer;
    outline: none;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230070c0' d='M6 8L0 0h12L6 8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 12px 8px;
    padding-right: 25px;
}

.sort-dropdown:focus {
    outline: none;
}

.sort-dropdown option {
    background: white;
    color: #0070c0;
    padding: 10px;
}

/* Featured Section - Main page */
.featured-section {
    padding: 80px 0;
    background: white;
}

.featured-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--dark);
}

.featured-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    /*
    max-width: 1200px;
    */
    margin: 0 auto;
}

.featured-card {
    text-align: center;
    padding: 40px 20px;
    background: var(--light);
    border-radius: var(--border-radius);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.featured-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.featured-icon i {
    font-size: 2.5rem;
    color: var(--primary);
}

.featured-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark);
}

.featured-card-text {
    color: var(--gray);
    line-height: 1.6;
}

/* Testimonials - Main page */
.testimonials-section {
    padding: 80px 0;
    background: var(--light);
}

.testimonials-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--dark);
}

.testimonials-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    /*
    max-width: 1200px;
    */
    margin: 0 auto;
}

.testimonial-card {
    background: white;
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.testimonial-icon {
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.2;
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--dark);
    margin-bottom: 30px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.author-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    text-align: left;
}

.author-name {
    font-weight: 700;
    color: var(--dark);
}

.author-location {
    color: var(--gray);
    font-size: 0.9rem;
}

/* FAQ Section - Main page */
.faq-section {
    padding: 80px 0;
    background: white;
}

.faq-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--dark);
}

.faq-accordion {
    /*
    max-width: 800px;
    */
    margin: 0 auto;
}

.accordion-item {
    margin-bottom: 20px;
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.accordion-header {
    background: var(--light);
    padding: 15px 20px;
}

.accordion-button {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    background: transparent;
    border: none;
    outline: none;
    text-align: left;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.accordion-body {
    padding: 20px;
    color: var(--gray);
    line-height: 1.6;
}

/* Footer Styles - Enhanced & aligned layout */
footer {
    background: linear-gradient(135deg, #1a2a4f 0%, #0c1425 100%);
    padding: 60px 0 30px;
    color: white;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* 主容器：限制宽度 + 顶部对齐 + 等间距 */
.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0;     /* 这里去掉左右 padding，避免看起来“不对齐” */
}

/* 左侧 logo 栏稍宽，右侧三栏等宽 */
.footer-column:first-child {
    flex: 1.6;
    min-width: 260px;
}

.footer-column {
    flex: 1;
    min-width: 190px;
    display: flex;
    flex-direction: column;
}

/* 标题和下划线 */
.footer-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 8px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary);
    border-radius: 3px;
}

/* 列表链接 */
.footer-links {
    display: flex;
    flex-direction: column;
    list-style: none;
    gap: 10px;
    padding-left: 0 !important;
    margin: 0;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--secondary);
    transform: translateX(5px);
}

.footer-links a::before {
    content: '\276F';
    margin-right: 10px;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateX(-5px);
}

.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Footer links: remove arrow & left-align ===== */

.footer-links a {
    display: inline-block;   /* 不再用 flex，对齐更自然 */
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary);
    transform: none;         /* 去掉横向移动也可以保留，看你喜好 */
}

/* 覆盖掉之前加的 “>” 箭头 */
.footer-links a::before {
    content: none !important;
    display: none !important;
}

/* 左侧 logo 文案 */
.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* 底部版权行 */
.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Responsive Footer Improvements */
@media (max-width: 768px) {
    footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        flex-direction: column;
        gap: 32px;
        text-align: center;
        align-items: center;
    }

    .footer-column,
    .footer-column:first-child {
        min-width: 0;
        width: 100%;
    }

    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links {
        align-items: center;
    }

    .footer-links a::before {
        display: none;
    }

    .footer-links a:hover {
        transform: none;
    }
}

.header {
    background: linear-gradient(135deg, #0070c0 0%, #0059a0 100%);
    padding: 20px;
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.plan-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
}

/* Override provider logo for detail page */
.header .provider-logo {
    width: auto;
    height: auto;
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 700;
    color: #0070c0;
    font-size: 0.9rem;
}

.plan-info {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.info-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.info-value {
    font-size: 1rem;
    font-weight: 600;
}

.section {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #004080;
    margin-bottom: 15px;
}

.topup-packages {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.topup-card {
    flex: 1;
    background: linear-gradient(135deg, #0070c0 0%, #0059a0 100%);
    padding: 15px;
    border-radius: 12px;
    color: white;
}

.topup-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.topup-feature {
    font-size: 0.8rem;
    margin-bottom: 4px;
    opacity: 0.9;
}

.supported-countries {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Country Grid Styles */
#local-esims {
    margin-bottom: 80px;
}

.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;                          /* 横向 + 纵向间距 */
    margin-top: 10px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    align-items: stretch;
}
.country-option {
    background-color: #fff;
    width: 200px;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.country-option:hover{
    background-color:#9bc9f8 ;
}
@media (min-width: 769px) {
    .country-option {
        width: 200px;
    }
}

.country-item {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #004080;
    cursor: pointer;
    transition: all 0.3s ease;
}

.country-item:hover {
    background: #e0edff;
    transform: translateY(-2px);
}

.flag-icon {
    width: 24px;
    height: 18px;
    /*margin-right: 8px;*/
    border-radius: 3px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.info-box {
    background: #f5f7fa;
    padding: 15px;
    border-radius: 12px;
}

.info-box-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #004080;
    margin-bottom: 8px;
}

.info-box-content {
    font-size: 0.8rem;
    color: #555;
    line-height: 1.4;
}

.bottom {
    padding: 20px;
    background: white;
}

.price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.total-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #004080;
}

.buttons {
    display: flex;
    gap: 10px;
}

/* Loading and Error states */
.loading, .error {
    text-align: center;
    padding: 50px;
    color: #0070c0;
    font-size: 1.2rem;
}

.error {
    color: #ff4d4f;
}

.featured-description{
    text-align: center;
    margin-bottom: 40px;
}

/* Country Search Styles */
.country-search-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto 30px;
}

.country-search-input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border: 2px solid #e0edff;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    background: white;
}

.country-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 94, 255, 0.1);
}

.country-search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1.1rem;
}

/* Show More Button */
.show-more-container {
    text-align: center;
    margin-top: 10px;
}

.show-more-btn {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.show-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 94, 255, 0.3);
}

.show-more-icon {
    transition: transform 0.3s ease;
}

.show-more-btn.expanded .show-more-icon {
    transform: rotate(180deg);
}

/* Hidden Countries */
.country-hidden {
    display: none;
}

.country-hidden.show {
    display: flex;
}


/* mobile nav */

/* Header layout common tweaks */
.header-inner {
    min-height: 64px;
}

.header-right {
    gap: 10px;
}

/* 手机端 header 样式 */
.navbar-toggler {
    border: none;
    background: transparent;
    padding: 4px 8px;
    font-size: 1.4rem;
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: none;
}

/* 手机端下拉菜单 */
.mobile-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    padding: 10px 16px 16px;
    z-index: 1000;
}

.mobile-nav a {
    display: block;
    padding: 10px 4px;
    color: var(--dark);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid #f0f2f5;
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.mobile-nav a:hover {
    color: var(--primary);
}

/* 展开状态 */
.mobile-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* 小屏时 header 更紧凑一点 */
@media (max-width: 768px) {
    header {
        padding: 10px 0;
    }

    .nav-logo-text {
        font-size: 18px;
    }

    .btn-group.menu-btn,
    .cta-button.d-none.d-md-block {
        /* 手机端看不到桌面按钮，只用下拉菜单 */
        display: none !important;
    }
}


/* Responsive Design */
@media (max-width: 768px) {
    /* Main page responsiveness */
    h1 {
        font-size: 2.5rem;
    }
    
    .tab-container {
        flex-direction: column;
        border-radius: 20px;
    }
    
    .tab {
        margin-bottom: 5px;
    }
    
    .featured-cards, .testimonials-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* Numbers page responsiveness */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .packages-container {
        grid-template-columns: 1fr;
    }
    
    /* Detail page responsiveness */
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .topup-packages {
        flex-direction: column;
    }
    
    /* Country option responsive */
    .country-option {
        width: auto;
        max-width: 100%;
        padding: 8px 16px;
    }
    
    .country-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
}

@media (max-width: 576px) {
    body {
        padding: 10px;
    }
    
    .hero-section {
        padding: 40px 0;
    }
    
    .cta-button, .start-button {
        width: 100%;
    }
    
    .packages-container {
        padding: 0 10px;
    }
}

@media (max-width: 576px) {
    body {
        padding: 10px;
    }
    
    .hero-section {
        padding: 40px 0;
    }
    
    .cta-button, .start-button {
        width: 100%;
    }
    
    .packages-container {
        padding: 0 10px;
    }
}

.nav-logo-text {
    font-size: 24px;
}

/* nav logo */
.logo-container .navbar-brand {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-logo {
    width: 48px;
    height: 48px;
    display: block;
}

.nav-logo-text {
    line-height: 1;
    position: relative;
    top: -3px;
}

.country-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 14px;
    line-height: 1.2;
}

.country-line-1 {
    font-size: 15px;
    font-weight: 600;
}

.country-line-2 {
    margin-top: 4px;
    font-size: 13px;
    color: #2388ff;
}

.country-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 280px;
    padding: 6px 6px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e3e9f5;
    box-shadow: 0 4px 10px rgba(30, 94, 255, 0.05);
    transition: all 0.25s ease;
    font-size: 0.95rem;
}

.country-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(30, 94, 255, 0.12);
    border-color: #d4e3ff;
    background: #f9fbff;
}

.country-option {
    width: 100%;
    background: none !important;
    text-align: left;
    border: none;
    padding: 0;
}

.country-line-1 {
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 700;
    color: #1a2e66;
}

.country-line-1 .flag-icon {
    width: 28px;
    height: 20px;
    margin-right: 10px;
}

.country-line-2 {
    margin-top: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2388ff;
}

.country-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.country-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1f3556;
}

.country-price {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1476ff;
}

.flag-icon {
    width: 32px;
    height: 22px;
    border-radius: 5px;
}

/* Country Grid Styles */
#local-esims {
    margin-bottom: 80px;
}

.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
    gap: 24px;                 /* 卡片之间的间距 */
    margin-top: 10px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;   /* 整体居中 */
    align-items: stretch;
}

/* 外层只做布局，不再是卡片 */
.country-item {
    display: flex;
    align-items: stretch;
    width: 100%;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* 真正的卡片，只保留这一层的圆角 + 阴影 */
.country-card {
    width: 100%;
    padding: 25px 15px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e6eaf0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all .25s ease;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.04);
}

.country-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 80, 180, 0.18);
    border-color: #d7e4ff;
    background: #f9fbff;
}

/* 左侧：旗帜 + 国家名，限制最大宽度，给右侧价格留空间 */
.country-left {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 70%;
}

/* 长名字自动换行，不溢出 */
.country-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1f3556;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.25;
}

/* 价格保持一行显示，右侧对齐 */
.country-price {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1476ff;
    white-space: nowrap;
}

/* 统一 flag 大小，并防止被压缩 */
.flag-icon {
    width: 32px;
    height: 22px;
    border-radius: 5px;
    flex-shrink: 0;
}

/* 小屏时改为一列（保持你原来的逻辑） */
@media (max-width: 768px) {
    .country-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
}

.country-hidden {
    display: none;
}

.country-hidden.show {
    display: flex;
}

/* -------- Regional eSIM cards (Airalo style) -------- */

.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 10px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    align-items: stretch;
}

.region-card-wrapper {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.region-card {
    all: unset; /* 去掉 button 默认样式 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 70px;
    padding: 6px 22px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e6eaf0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: all 0.25s ease;
}

.region-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 80, 160, 0.20);
    border-color: #d4e6ff;
    background: #f9fbff;
}

.region-left {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 70%; /* 预留右侧价格空间 */
}

.region-icon {
    font-size: 1.3rem;
    color: #1e5eff;
    flex-shrink: 0;
}

.region-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f3556;
    white-space: normal;      /* 允许换行 */
    word-wrap: break-word;    /* 超长的组合名自动换行 */
    line-height: 1.3;
}

.region-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1476ff;
    white-space: nowrap;
}

/* 小屏幕下单列展示 */
@media (max-width: 768px) {
    .region-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
}

