/* ========================================
   Compatible eSIM - French Microsite
   Modern CSS with Glassmorphism
   ======================================== */

/* ---- CSS Variables ---- */
:root {
    /* Colors */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    
    --bg-dark: #0f0f1a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-glass: rgba(255, 255, 255, 0.1);
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    
    /* Spacing */
    --container-max: 1200px;
    --section-padding: 80px 0;
    --card-radius: 20px;
    --button-radius: 12px;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Shadows */
    --shadow-soft: 0 4px 30px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.4);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ---- Container ---- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Typography ---- */
h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 16px;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Hero Section ---- */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(102, 126, 234, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(118, 75, 162, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(79, 172, 254, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ---- Navigation ---- */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-weight: 400;
}

.logo-text strong {
    font-weight: 700;
}

.nav-cta {
    padding: 12px 24px;
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--button-radius);
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-cta:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ---- Hero Content ---- */
.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 0;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 40px;
}

/* ---- Search Box ---- */
.search-container {
    width: 100%;
    max-width: 600px;
    position: relative;
    margin-bottom: 24px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 8px 20px;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.search-box:focus-within {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: var(--shadow-glow);
}

.search-icon {
    font-size: 1.25rem;
    margin-right: 12px;
    opacity: 0.7;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.125rem;
    padding: 16px 0;
    font-family: inherit;
}

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

.clear-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

/* ---- Search Results ---- */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(20, 20, 35, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-soft);
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.search-result-item:hover {
    background: rgba(102, 126, 234, 0.2);
}

.result-brand {
    font-size: 0.875rem;
    color: var(--text-muted);
    min-width: 80px;
}

.result-name {
    font-weight: 500;
}

.result-compatible {
    margin-left: auto;
    font-size: 1.25rem;
}

/* ---- Result Container ---- */
.result-container {
    width: 100%;
    max-width: 600px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--card-radius);
    padding: 32px;
    backdrop-filter: blur(20px);
    text-align: center;
}

.result-card.compatible {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.1);
}

.result-card.not-compatible {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.result-device {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.result-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: var(--primary-gradient);
    border-radius: var(--button-radius);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    color: white;
    text-decoration: none;
}

.result-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.device-count {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.count-number {
    font-weight: 700;
    color: var(--text-secondary);
}

/* ---- Scroll Indicator ---- */
.scroll-indicator {
    text-align: center;
    padding: 24px 0 40px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.scroll-arrow {
    animation: bounce 2s infinite;
    font-size: 1.5rem;
    margin-top: 8px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(10px);
    }
    60% {
        transform: translateY(5px);
    }
}

/* ---- Brands Section ---- */
.brands-section {
    padding: var(--section-padding);
    background: linear-gradient(180deg, var(--bg-dark) 0%, rgba(15, 15, 26, 0.8) 100%);
}

.brands-section h2,
.devices-section h2,
.faq-section h2 {
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 48px;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.brand-card {
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.brand-card:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-4px);
}

.brand-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.brand-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.brand-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ---- Devices Section ---- */
.devices-section {
    padding: var(--section-padding);
}

.devices-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.back-btn {
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: var(--button-radius);
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.device-card {
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.device-card:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateX(4px);
}

.device-check {
    color: var(--success);
    font-size: 1.5rem;
}

.device-info {
    flex: 1;
}

.device-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.device-brand {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.device-arrow {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.device-card:hover .device-arrow {
    transform: translateX(4px);
    color: var(--text-primary);
}

/* ---- FAQ Section ---- */
.faq-section {
    padding: var(--section-padding);
    background: linear-gradient(180deg, rgba(15, 15, 26, 0.8) 0%, var(--bg-dark) 100%);
}

.faq-section h2 {
    margin-bottom: 48px;
}

.faq-grid {
    display: grid;
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item[open] {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

.faq-item summary {
    padding: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 600;
    font-size: 1.0625rem;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    margin-left: auto;
    font-size: 1.5rem;
    font-weight: 400;
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-icon {
    font-size: 1.5rem;
}

.faq-answer {
    padding: 0 24px 24px;
    color: var(--text-secondary);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.faq-answer p {
    margin-bottom: 16px;
}

.faq-answer ul,
.faq-answer ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

.faq-answer li {
    margin-bottom: 8px;
    list-style: disc;
}

.faq-answer ol li {
    list-style: decimal;
}

.faq-answer a {
    color: #667eea;
    text-decoration: underline;
}

/* ---- CTA Section ---- */
.cta-section {
    padding: var(--section-padding);
}

.cta-card {
    background: var(--primary-gradient);
    border-radius: var(--card-radius);
    padding: 48px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 48px;
}

.cta-content {
    flex: 1;
    min-width: 300px;
}

.cta-content h2 {
    margin-bottom: 16px;
}

.cta-content p {
    opacity: 0.9;
    margin-bottom: 24px;
}

.cta-features {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.cta-feature {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
}

.cta-action {
    text-align: center;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: white;
    color: #764ba2;
    padding: 20px 40px;
    border-radius: var(--button-radius);
    font-size: 1.125rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.button-arrow {
    transition: transform 0.3s ease;
}

.cta-button:hover .button-arrow {
    transform: translateX(4px);
}

.cta-trust {
    margin-top: 16px;
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ---- Footer ---- */
.footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 64px 0 32px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--text-secondary);
    max-width: 300px;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-bottom a {
    color: var(--text-secondary);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .nav-cta {
        padding: 10px 16px;
        font-size: 0.875rem;
    }
    
    .search-box input {
        font-size: 1rem;
    }
    
    .cta-card {
        padding: 32px;
        flex-direction: column;
        text-align: center;
    }
    
    .cta-features {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    
    .footer-brand p {
        max-width: none;
    }
    
    .devices-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .devices-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-button {
        padding: 16px 32px;
        font-size: 1rem;
    }
}
