/*
Theme Name: Saiber
Theme URI: https://saiber.ua
Author: Saiber Team
Author URI: https://saiber.ua
Description: Кастомна тема лендінгу для IT-курсів Saiber. Сучасний fluid-дизайн з високою конверсією. Створено на основі затвердженого HTML-макету.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: saiber
*/

/* Базові стилі теми */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #08142c;
    background-image: url('images/bg-waves.svg');
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.font-display {
    font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.03em;
}

/* Glassmorphism styling */
.glass {
    background: rgba(16, 40, 92, 0.2) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4),
                inset 0 1px 1px rgba(255, 255, 255, 0.08) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.glass:hover {
    background: rgba(16, 40, 92, 0.3) !important;
    border-color: rgba(103, 232, 249, 0.25) !important;
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.5),
                inset 0 1px 1px rgba(255, 255, 255, 0.12) !important;
    transform: translateY(-2px);
}

/* Popular pricing card style */
.pricing-card.popular.glass {
    background: rgba(20, 60, 140, 0.35) !important;
    border: 1px solid rgba(103, 232, 249, 0.4) !important;
    box-shadow: 0 0 30px rgba(103, 232, 249, 0.1),
                0 15px 35px -5px rgba(0, 0, 0, 0.5),
                inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
}

.pricing-card.popular.glass:hover {
    background: rgba(20, 60, 140, 0.45) !important;
    border-color: rgba(103, 232, 249, 0.6) !important;
    box-shadow: 0 0 45px rgba(103, 232, 249, 0.2),
                0 20px 40px -5px rgba(0, 0, 0, 0.6),
                inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
}

/* Custom Input and Form Styling */
.form-input {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border-radius: 1rem !important;
    padding: 0.875rem 1.25rem !important;
    font-size: 0.875rem !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(8px);
}

.form-input:focus {
    border-color: #00c3ff !important;
    outline: none !important;
    box-shadow: 0 0 15px rgba(0, 195, 255, 0.25) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Style for intl-tel-input to align with our dark glassmorphism theme */
.iti {
    width: 100% !important; /* Make container full width */
}

/* Force padding-left on inputs inside .iti to override .form-input shorthand and prevent text/placeholder overlapping flags */
.iti input[type="tel"] {
    padding-left: 56px !important;
}

/* Search input with left icon — override .form-input padding shorthand */
#course-search {
    padding-left: 3rem !important;
}

/* Glassmorphism theme style for the country dropdown list container */
.iti .iti__dropdown-content {
    background: rgba(10, 20, 41, 0.96) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(0, 195, 255, 0.25) !important;
    border-radius: 1rem !important;
    color: #ffffff !important;
    max-height: 280px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
    padding: 8px 0 !important;
    margin-top: 8px !important;
    z-index: 9999 !important;
}

/* Search input inside the country dropdown */
.iti .iti__search-input {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border-radius: 0.75rem !important;
    padding: 10px 14px !important;
    margin: 10px !important;
    width: calc(100% - 20px) !important;
    box-sizing: border-box !important;
    font-size: 0.85rem !important;
    outline: none !important;
    transition: all 0.3s ease !important;
}
.iti .iti__search-input:focus {
    border-color: #00c3ff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 0 15px rgba(0, 195, 255, 0.3) !important;
}

/* The list of countries */
.iti .iti__country-list {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Individual country list items */
.iti .iti__country {
    padding: 10px 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    transition: background 0.2s ease !important;
}
.iti .iti__country:hover, 
.iti .iti__country.iti__highlight {
    background: rgba(0, 195, 255, 0.12) !important;
}

/* Localized country name text */
.iti .iti__country-name {
    color: #ffffff !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
}

/* Dial code text next to country names */
.iti .iti__dial-code {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 0.8rem !important;
}

/* Styling for the flag wrapper inside the input */
.iti .iti__selected-country {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    padding: 0 10px 0 16px !important;
    border-radius: 1rem 0 0 1rem !important;
    transition: background 0.2s ease !important;
}
.iti .iti__selected-country:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Glowing spots ("переливы") */
.glow-bubble {
    position: absolute;
    border-radius: 9999px;
    filter: blur(120px);
    pointer-events: none;
    z-index: 1;
}

/* Navbar item links and active states */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #00c3ff;
    transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/*
 * Button hover animations (Tailwind classes in markup):
 * btn-primary  — gradient CTA
 * btn-outline  — cyan border CTA
 * btn-ghost    — subtle border secondary
 * btn-tab      — filter tabs
 * btn-icon     — social / icon buttons
 * btn-link     — text links with arrow
 * btn-close    — modal close
 */

/* Navbar logo underline (same as nav-link) */
.nav-logo-text {
    position: relative;
    padding-bottom: 4px;
}
.nav-logo-text::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #00c3ff;
    transition: width 0.3s ease;
}
.nav-logo:hover .nav-logo-text::after {
    width: 100%;
}

/* Icons container in services cards */
.icon-container {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 195, 255, 0.1);
    border: 1px solid rgba(0, 195, 255, 0.25);
    color: #00c3ff;
    box-shadow: 0 0 15px rgba(0, 195, 255, 0.1);
    transition: all 0.3s ease;
}

.glass:hover .icon-container {
    background: rgba(0, 195, 255, 0.2);
    border-color: rgba(0, 195, 255, 0.5);
    box-shadow: 0 0 25px rgba(0, 195, 255, 0.3);
    color: #ffffff;
}

/* Custom Scrollbar for premium feel */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #08142c;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 195, 255, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 195, 255, 0.5);
}

/* ==========================================
   Vibrant Keyframe Animations & Glow Effects
   ========================================== */

/* Floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Slow pulsing glow element */
@keyframes pulseGlow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}
.animate-pulse-glow {
    animation: pulseGlow 8s ease-in-out infinite;
}

/* Vibrant shining text gradient animation */
@keyframes textShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.vibrant-glow-text {
    background: linear-gradient(-45deg, #00c3ff, #00ffc4, #3b82f6, #00c3ff);
    background-size: 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 6s ease infinite;
}

/* Glowing rotating card border effect */
.glowing-card {
    position: relative;
    z-index: 10;
}
.glowing-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 24px; /* Matches rounded-3xl (approx 24px) */
    background: linear-gradient(90deg, #00c3ff, #00ffc4, #3b82f6, #00c3ff);
    background-size: 400% 400%;
    animation: borderGlow 4s ease infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.glowing-card:hover::before {
    opacity: 1;
}

@keyframes borderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Timed promo modal */
@keyframes modalTimedFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes modalTimedSlideUp {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.modal-timed-overlay:not(.hidden) {
    animation: modalTimedFadeIn 0.35s ease forwards;
}
.modal-timed-panel {
    animation: modalTimedSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* FAQ accordion — avoid .glass transition:all on <details> (breaks native toggle) */
.faq-item {
    background: rgba(16, 40, 92, 0.2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4),
                inset 0 1px 1px rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    background: rgba(16, 40, 92, 0.3);
    border-color: rgba(103, 232, 249, 0.25);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.5),
                inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

.faq-item > summary {
    list-style: none;
    cursor: pointer;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    user-select: none;
    -webkit-user-select: none;
}

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

.faq-item > summary::marker {
    content: '';
    display: none;
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 2rem 1.5rem;
}

.faq-item--nested {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 1rem;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

.faq-item--nested:hover {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    box-shadow: none;
}

.faq-item--nested > summary {
    padding: 1.25rem 1.5rem;
}

.faq-item--nested .faq-answer {
    padding: 0 1.5rem 1.25rem;
}

/* Language switcher */
.lang-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.9rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.25s ease;
    cursor: pointer;
}

.lang-switcher-btn:hover,
.lang-switcher-btn:focus {
    border-color: rgba(0, 195, 255, 0.45);
    color: #fff;
    background: rgba(0, 195, 255, 0.08);
    outline: none;
}

.lang-switcher-btn::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(103, 232, 249, 0.8);
    margin-top: 2px;
}

.lang-switcher-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    padding: 6px;
    border-radius: 1rem;
    background: rgba(10, 20, 41, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 195, 255, 0.2);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    z-index: 120;
}

.lang-switcher-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.65rem 0.85rem;
    border: none;
    border-radius: 0.65rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-switcher-option:hover,
.lang-switcher-option.is-active {
    background: rgba(0, 195, 255, 0.12);
    color: #67e8f9;
}

@keyframes coolTitleAnimation {
    0% {
        text-shadow: 0 0 10px rgba(0, 195, 255, 0.2), 0 0 20px rgba(0, 195, 255, 0.1);
        transform: translateY(5px) scale(0.99);
    }
    50% {
        text-shadow: 0 0 25px rgba(0, 195, 255, 0.7), 0 0 35px rgba(0, 255, 196, 0.5), 0 0 50px rgba(59, 130, 246, 0.3);
        transform: translateY(0px) scale(1);
    }
    100% {
        text-shadow: 0 0 10px rgba(0, 195, 255, 0.2), 0 0 20px rgba(0, 195, 255, 0.1);
        transform: translateY(5px) scale(0.99);
    }
}

.cool-title-animated {
    animation: coolTitleAnimation 6s ease-in-out infinite;
    display: inline-block;
    will-change: transform, text-shadow;
}

/* Hero main title animation */
@keyframes heroTitleReveal {
    0% {
        opacity: 0;
        transform: translateY(28px) scale(0.96);
        filter: blur(6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes heroTitleGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(103, 232, 249, 0.15), 0 0 40px rgba(0, 195, 255, 0.08);
    }
    50% {
        text-shadow: 0 0 30px rgba(103, 232, 249, 0.5), 0 0 60px rgba(0, 195, 255, 0.3), 0 0 90px rgba(56, 189, 248, 0.15);
    }
}

@keyframes heroGradientShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-title-line {
    display: inline-block;
    opacity: 0;
    will-change: transform, opacity, filter;
}

.hero-title-line-1 {
    animation: heroTitleReveal 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards,
               heroTitleGlow 5s ease-in-out 1.25s infinite;
}

.hero-title-line-2.hero-title-gradient {
    background: linear-gradient(90deg, #67e8f9, #a5f3fc, #38bdf8, #bae6fd, #22d3ee, #67e8f9);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: heroTitleReveal 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards,
               heroGradientShine 5s ease-in-out 1.45s infinite;
}