:root {
    --primary: #034f5c;
    --primary-dark: #023a44;
    --secondary: #1698a5;
    --text: #1d2327;
    --light: #f8f9fa;
    --gray: #adb5bd;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--text);
    background-color: var(--light);
}

a { text-decoration: none; color: inherit; }

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

/* Header */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
}
.brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.brand i { color: var(--secondary); }
.site-nav a {
    margin-left: 1.5rem;
    font-weight: 500;
    color: var(--text);
}
.site-nav a:hover { color: var(--primary); }

/* Hero */
.hero {
    text-align: center;
    padding: 4rem 1rem 3rem;
    background: linear-gradient(165deg, var(--primary), var(--primary-dark));
    color: var(--white);
}
.hero h1 {
    font-size: 2.6rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}
.hero p.subtitle {
    font-size: 1.1rem;
    color: #d7ecef;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Search bar */
.search-container {
    position: relative;
    width: 480px;
    max-width: 100%;
    margin: 0 auto;
    z-index: 100;
    text-align: left;
}
.search-input {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    border: 2px solid transparent;
    border-radius: var(--radius);
    background-color: var(--white);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}
.search-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(22, 152, 165, 0.3);
}
.results-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 320px;
    overflow-y: auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 101;
    display: none;
    margin-top: 8px;
    border: 1px solid #e9ecef;
    color: var(--text);
}
.result-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
}
.result-item:hover { background-color: var(--light); }
.result-item img {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}
.result-item span { font-size: 0.95rem; }

/* Top countries grid */
.section {
    padding: 3rem 1rem;
}
.section h2 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.section .section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 2rem;
}
.country-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
}
.country-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.country-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.country-card img {
    width: 36px;
    height: 27px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.country-card span {
    font-weight: 600;
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .country-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    .country-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
    .search-container { width: 100%; }
}

/* Country page */
.country-hero {
    background: linear-gradient(165deg, var(--primary), var(--primary-dark));
    color: var(--white);
    text-align: center;
    padding: 2.5rem 1rem;
}
.country-hero img {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}
.country-hero h1 {
    margin: 0 0 0.5rem;
    font-size: 2rem;
}
.country-hero .country-hero-search {
    margin-top: 1.5rem;
}

#esim-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
@media (max-width: 1100px) {
    #esim-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
    #esim-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    #esim-list { grid-template-columns: 1fr; }
}

.esim-bundle {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.esim-bundle:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.esim-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.esim-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--primary);
}
.duration-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.duration-btn {
    border: 1px solid var(--gray);
    background: var(--white);
    color: var(--text);
    border-radius: 50px;
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.duration-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}
.price-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}
.price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}
.buy-now {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}
.buy-now:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
    transform: translateY(-2px);
}
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray);
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gray);
    font-size: 0.9rem;
}
