:root {
    color-scheme: light;
}

html[data-theme='dark'] {
    color-scheme: dark;
}

html[data-theme='dark'] body,
html[data-theme='dark'] .bg-gray-50,
html[data-theme='dark'] .bg-gray-100,
html[data-theme='dark'] .bg-gray-200,
html[data-theme='dark'] .bg-gray-300,
html[data-theme='dark'] .bg-white {
    background-color: #0B1120 !important;
    color: #E2E8F0 !important;
}

html[data-theme='dark'] header,
html[data-theme='dark'] header.nav-blur {
    background-color: rgba(15, 23, 42, 0.92) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-theme='dark'] .card,
html[data-theme='dark'] .testimonial-card,
html[data-theme='dark'] #mobileMenu,
html[data-theme='dark'] .bg-white:not(img) {
    background-color: #111B2E !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: none !important;
}

html[data-theme='dark'] .text-gray-800,
html[data-theme='dark'] .text-gray-700,
html[data-theme='dark'] .text-gray-600,
html[data-theme='dark'] .text-gray-500,
html[data-theme='dark'] .text-gray-400,
html[data-theme='dark'] .section-title,
html[data-theme='dark'] .nav-link {
    color: #E2E8F0 !important;
}

html[data-theme='dark'] .section-subtitle,
html[data-theme='dark'] .text-gray-500 {
    color: #A5B4FC !important;
}

html[data-theme='dark'] .btn-primary {
    background: linear-gradient(135deg, #1E293B, #14B8A6) !important;
    color: #F8FAFC !important;
}

html[data-theme='dark'] .btn-secondary {
    border-color: #2DD4BF !important;
    color: #2DD4BF !important;
}

html[data-theme='dark'] .btn-secondary:hover {
    background-color: #2DD4BF !important;
    color: #0B1120 !important;
}

html[data-theme='dark'] footer,
html[data-theme='dark'] .bg-[#1A237E] {
    background-color: #0F172A !important;
}

html[data-theme='dark'] .bg-\[\#F0FDFA\] {
    background-color: #14203E !important;
    color: #E2E8F0 !important;
}

html[data-theme='dark'] .article-content blockquote {
    background-color: #14203E !important;
    color: #E2E8F0 !important;
    border-left-color: #2DD4BF !important;
}

html[data-theme='dark'] #cta-bar {
    background-color: rgba(2, 6, 23, 0.92) !important;
}

.theme-toggle {
    border: 1px solid rgba(15, 23, 42, 0.2);
    border-radius: 9999px;
    padding: 0.35rem 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    background-color: transparent;
    cursor: pointer;
}

.theme-toggle i {
    font-size: 0.9rem;
}

html[data-theme='dark'] .theme-toggle {
    border-color: rgba(148, 163, 184, 0.4);
    color: #E2E8F0;
}

/* Nav bar styling */
header.nav-blur {
    background-color: rgba(10, 12, 26, 0.9) !important;
    backdrop-filter: blur(14px);
    color: #E2E8F0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

/* Global nav hover underline */
.nav-link {
    position: relative;
    transition: color 0.2s ease;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.25rem;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #1A237E, #0D9488);
    transition: width 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: #ffffff !important;
    text-shadow: 0 0 12px rgba(13, 148, 136, 0.6), 0 0 4px rgba(26, 35, 126, 0.4);
}

header.nav-blur .nav-link {
    color: #E2E8F0 !important;
}

header.nav-blur .nav-link:hover {
    color: #FFFFFF !important;
}

header.nav-blur .theme-toggle,
header.nav-blur .text-gray-700,
header.nav-blur .text-slate-200 {
    color: #E2E8F0 !important;
}

/* Hero overlay for better contrast on text */
.hero-bg {
    position: relative;
    isolation: isolate;
}

.hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 12, 26, 0.6), rgba(10, 12, 26, 0.35));
    z-index: 0;
}

.hero-bg > * {
    position: relative;
    z-index: 1;
}

/* Payment method icon grid + tooltip styling */
.payment-icon {
    position: relative;
    display: inline-block;
    cursor: help;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.payment-icon:hover {
    transform: scale(1.08);
    opacity: 0.92;
}

.payment-icon svg {
    display: block;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.payment-icon::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.payment-icon::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.payment-icon:hover::before,
.payment-icon:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Card polish */
.card {
    border-radius: 1rem !important;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 16px 40px -18px rgba(15, 23, 42, 0.35), 0 6px 18px -12px rgba(15, 23, 42, 0.25) !important;
}

/* Button refinement */
.btn-primary {
    box-shadow: 0 10px 25px -8px rgba(13, 148, 136, 0.45);
}

.btn-primary:hover {
    box-shadow: 0 18px 35px -12px rgba(13, 148, 136, 0.55);
}
