/* --- Global Utilities --- */
.mt-10 { margin-top: 10px; }
.muted { color: rgba(255,255,255, 0.45); }

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Prevent page-level horizontal scrollbar on homepage */
html {
    overflow-x: clip;
    max-width: 100%;
}

body {
    overflow-x: clip;
    max-width: 100%;
}

/* --- Hero Section --- */
.hero {
    background: radial-gradient(circle at top, rgba(124, 92, 255, 0.18) 0%, rgba(0, 0, 0, 0) 70%);
    padding: 100px 20px 60px 20px;
    text-align: center;
    position: relative;
    z-index: 50;
}

/* Lock page scroll while country dropdown is open */
body.iti-dropdown-open {
    overflow: hidden !important;
    overflow-x: hidden !important;
    touch-action: none;
}

.hero-container { max-width: 800px; margin: 0 auto; }
.hero h1 {
    font-size: 56px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.96);
    margin-bottom: 20px;
    letter-spacing: -1.5px;
    line-height: 1.15;
    position: relative;
}

/* Letter animation */
.letter {
    display: inline-block;
    color: rgba(255, 255, 255, 0.96);
    animation: letterJump 0.6s ease-in-out 1 forwards;
}

/* Space letters keep the gap but don't jump */
.letter.space {
    animation: none;
}

@keyframes letterJump {
    0% {
        color: rgba(255, 255, 255, 0.96);
        transform: translateY(0) scale(1);
    }
    25% {
        color: #a78bfa; /* soft purple */
        transform: translateY(-12px) scale(1.1);
    }
    50% {
        transform: translateY(-8px) scale(1.05);
    }
    100% {
        color: rgba(255, 255, 255, 0.96);
        transform: translateY(0) scale(1);
    }
}

.hero p { font-size: 19px; color: rgba(255, 255, 255, 0.75); margin-bottom: 40px; line-height: 1.6; }

/* --- Modern Search Bar (Enhanced) --- */
.search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.055);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 6px;
    border-radius: 50px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    max-width: 650px;
    margin: 0 auto 25px auto;
    transition: all 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    z-index: 2;
}

.search-form:focus-within {
    border-color: rgba(124, 92, 255, 0.6);
    box-shadow: 0 20px 50px rgba(124, 92, 255, 0.25), 0 0 30px rgba(124, 92, 255, 0.1);
}

.search-input-group {
    display: flex;
    align-items: center;
    flex-grow: 1;
    position: relative;
    height: 50px;
}

/* --- Phone input loader --- */
.phone-loading-spinner {
    position: absolute;
    left: 22px;
    top: 50%;
    width: 22px;
    height: 22px;
    margin-top: -11px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.12);
    border-top: 2px solid rgba(124, 92, 255, 0.95);
    animation: phoneLoaderSpin .7s linear infinite;
    z-index: 5;
    transition: opacity .25s ease, visibility .25s ease;
}

.phone-loading-spinner.hidden {
    opacity: 0;
    visibility: hidden;
}

@keyframes phoneLoaderSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Intl‑Tel‑Input integration --- */
.iti { width: 100%; display: flex; align-items: center; height: 100%; }
.iti__selected-flag {
    background-color: transparent !important;
    padding: 0 10px 0 20px !important;
    z-index: 2;
    display: flex;
    align-items: center;
}
.iti__selected-dial-code { color: #ffffff !important; font-size: 16px; font-weight: 500; margin-left: 5px; }
.iti__arrow { border-top: 4px solid #fff !important; margin-left: 6px; }
.iti__arrow--up { border-top: none !important; border-bottom: 4px solid #fff !important; }

#phoneInput {
    opacity: 0;
    transition: opacity .25s ease;
    background: transparent !important;
    color: #ffffff !important;
    border: none !important;
    outline: none !important;
    font-size: 16px;
    padding: 10px 20px 10px 118px !important;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}
#phoneInput::placeholder { color: rgba(255, 255, 255, 0.4); }

.iti__country-list {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 10050 !important;
    max-height: 260px;
    white-space: normal !important;
    overflow: hidden auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 92, 255, 0.45) transparent;
}

.iti__country-list::-webkit-scrollbar {
    width: 6px;
}

.iti__country-list::-webkit-scrollbar:horizontal {
    display: none;
    height: 0;
}

.iti__country-list::-webkit-scrollbar-track {
    background: transparent;
}

.iti__country-list::-webkit-scrollbar-thumb {
    background: rgba(124, 92, 255, 0.45);
    border-radius: 999px;
}

.iti__country {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.iti__country-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.iti__dial-code {
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 8px;
}

.iti__country:hover { background-color: #3b82f6 !important; }
.iti__country-name, .iti__dial-code { color: #ffffff !important; }
.iti__highlight { background-color: #3b82f6 !important; }

/* --- Button --- */
.btn-primary {
    background: linear-gradient(180deg, rgba(124, 92, 255, 0.95), rgba(91, 62, 255, 0.85));
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(91, 62, 255, 0.3);
    white-space: nowrap;
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease, background 0.3s ease, color 0.3s ease;
}

.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.1); }

.btn-primary.loading {
    background: rgba(255,255,255,0.12) !important;
    color: rgba(255,255,255,0.5) !important;
    cursor: not-allowed !important;
    pointer-events: none;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
}

.btn-primary.ready {
    animation: buttonGlow 2s ease-in-out infinite;
}

@keyframes buttonGlow {
    0%, 100% { box-shadow: 0 4px 15px rgba(91, 62, 255, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(124, 92, 255, 0.6); }
}

/* --- New info sections (text + image rows) --- */
.info-section {
    padding: 80px 20px;
    position: relative;
    z-index: 1;
}
.info-section.alt-bg {
    background: rgba(255, 255, 255, 0.02);
}

.info-row {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto;
}

/* This class is now only used on the second section (desktop: text left, image right) */
.info-row.reverse {
    flex-direction: row-reverse;
}

.info-text {
    flex: 1;
    min-width: 0;
}

.info-text h2 {
    font-size: 32px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 18px;
    line-height: 1.25;
}

.info-text p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.info-image {
    flex: 1;
    text-align: center;
}

.info-image-frame {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 520px;
    min-height: 120px;
    border-radius: 20px;
}

.info-image-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(
        110deg,
        rgba(255, 255, 255, 0.04) 8%,
        rgba(124, 92, 255, 0.12) 18%,
        rgba(255, 255, 255, 0.04) 33%
    );
    background-size: 200% 100%;
    animation: imageShimmer 1.4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.info-image-frame.is-loaded::before {
    display: none;
}

.info-image-frame .info-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.35s ease;
    -webkit-user-drag: none;
    user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.info-image-frame.is-loaded .info-img {
    opacity: 1;
}

@keyframes imageShimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* --- Features Section --- */
.features { padding: 80px 20px; }
.features h2 { text-align: center; font-size: 32px; font-weight: 800; color: rgba(255, 255, 255, 0.95); margin-bottom: 50px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1100px; margin: 0 auto; }

.feature-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 35px 30px;
    border-radius: 20px;
    transition: all 0.3s;

    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s ease, transform 0.6s ease, background 0.3s, border-color 0.3s;
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.07);
}

.card-icon { font-size: 36px; margin-bottom: 20px; display: inline-block; }
.feature-card h3 { font-size: 21px; font-weight: 700; color: rgba(255, 255, 255, 0.95); margin-bottom: 12px; }
.feature-card p { color: rgba(255, 255, 255, 0.65); font-size: 15px; line-height: 1.6; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .search-form { flex-direction: column; border-radius: 20px; padding: 10px; }
    .btn-primary { width: 100%; border-radius: 14px; }
    .hero h1 { font-size: 36px; }

    /* Stack vertically and force image first for both sections */
    .info-row,
    .info-row.reverse {
        flex-direction: column;
        gap: 40px;
    }

    /* Move image above text, regardless of HTML order */
    .info-image {
        order: -1;
    }

    .info-text h2 {
        font-size: 26px;
    }

    .features-grid { grid-template-columns: 1fr; }

    #phoneInput {
        padding-left: 118px !important;
    }
}

/* Better mobile native feeling for country dropdown */
@media (max-width: 768px) {
        .iti__country-list {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        max-height: 60vh !important;
        border-radius: 22px 22px 0 0 !important;
        background: rgba(28, 28, 30, 0.96) !important;
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border: none !important;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden !important;
        z-index: 10050 !important;
        animation: slideUp 0.25s ease;
        padding-bottom: env(safe-area-inset-bottom);
    }
    
        .iti--container {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .iti__country { padding: 14px 20px !important; font-size: 17px !important; }
    .iti__country-name, .iti__dial-code { font-size: 17px !important; }
    .iti__highlight { background: rgba(124, 92, 255, 0.18) !important; }
    .iti__selected-flag { -webkit-tap-highlight-color: transparent; }
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}