/* 
 * Prism Certified Translations - Premium Design System v2.0
 * Theme: Midnight Navy + Golden Elegance
 */

:root {
    --navy-dark: #00152B;
    --navy-base: #001F3F;
    --navy-light: #003366;
    --gold: #D4AF37;
    --gold-bright: #F1D592;
    --gold-muted: #B8860B;
    --white: #FFFFFF;
    --off-white: #fafafa;
    --glass-white: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: clip;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--navy-dark);
    background-color: var(--off-white);
    overflow-x: clip;
    max-width: 100%;
}

@media (max-width: 1023px) {
    [data-aos] {
        transform: none !important;
    }
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

.hero-text-shadow {
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.text-glow {
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* Glassmorphism */
.glass {
    background: var(--glass-white);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2.5rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 40px 80px rgba(0, 31, 63, 0.15);
    border-color: var(--gold);
}

/* Premium Buttons */
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-bright));
    color: var(--navy-dark);
    font-weight: 800;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-gold::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
    z-index: -1;
}

.btn-gold:hover::before {
    left: 100%;
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.5);
    background: linear-gradient(135deg, var(--white), var(--gold-bright));
}

.btn-outline-gold {
    border: 2px solid var(--gold);
    color: var(--gold);
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-outline-gold:hover {
    background: var(--gold);
    color: var(--navy-dark);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--off-white);
}

::-webkit-scrollbar-thumb {
    background: var(--navy-base);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* ── Dashboard Premium Components ────────────────────────────────────────── */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 31, 63, 0.05);
}

.dark-glass-card {
    background: rgba(0, 31, 63, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.glow-mesh {
    background-image: 
        radial-gradient(at 0% 0%, rgba(212, 175, 55, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(0, 31, 63, 0.03) 0px, transparent 50%);
}

.nav-link-active {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    border-left: 4px solid var(--gold);
    color: var(--gold);
}

.premium-input {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-input:focus {
    background: #ffffff;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

.order-step-active {
    background: var(--gold);
    color: var(--navy);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

.hero-text-shadow {
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.text-glow {
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* Glassmorphism */
.glass {
    background: var(--glass-white);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2.5rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 40px 80px rgba(0, 31, 63, 0.15);
    border-color: var(--gold);
}

/* Premium Buttons */
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-bright));
    color: var(--navy-dark);
    font-weight: 800;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-gold::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
    z-index: -1;
}

.btn-gold:hover::before {
    left: 100%;
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.5);
    background: linear-gradient(135deg, var(--white), var(--gold-bright));
}

.btn-outline-gold {
    border: 2px solid var(--gold);
    color: var(--gold);
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-outline-gold:hover {
    background: var(--gold);
    color: var(--navy-dark);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--off-white);
}

::-webkit-scrollbar-thumb {
    background: var(--navy-base);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* ── Dashboard Premium Components ────────────────────────────────────────── */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 31, 63, 0.05);
}

.dark-glass-card {
    background: rgba(0, 31, 63, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.glow-mesh {
    background-image: 
        radial-gradient(at 0% 0%, rgba(212, 175, 55, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(0, 31, 63, 0.03) 0px, transparent 50%);
}

.nav-link-active {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    border-left: 4px solid var(--gold);
    color: var(--gold);
}

.premium-input {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-input:focus {
    background: #ffffff;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

.order-step-active {
    background: var(--gold);
    color: var(--navy);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.order-step-pending {
    background: #e2e8f0;
    color: #94a3b8;
}

/* Autofill Overrides: Light Theme (Default) */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 60px #ffffff inset !important;
    -webkit-text-fill-color: var(--navy-dark) !important;
    caret-color: var(--navy-dark);
}

/* Autofill Overrides: Dark Theme / Backgrounds */
.bg-navy-dark input:-webkit-autofill,
.bg-navy-dark input:-webkit-autofill:hover, 
.bg-navy-dark input:-webkit-autofill:focus, 
.bg-navy-dark input:-webkit-autofill:active,
.bg-navy input:-webkit-autofill,
.bg-navy input:-webkit-autofill:hover, 
.bg-navy input:-webkit-autofill:focus, 
.bg-navy input:-webkit-autofill:active,
.dark-glass-card input:-webkit-autofill,
.dark-glass-card input:-webkit-autofill:hover, 
.dark-glass-card input:-webkit-autofill:focus, 
.dark-glass-card input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 60px var(--navy-dark) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: white;
}

/* Layout Utilities */
.section-padding {
    padding: 120px 0;
}

.premium-gradient-bg {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-base) 100%);
}

/* Form Styles */
input, select, textarea {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
    background: white;
}

/* FAQ Accordion Custom */
.accordion-item {
    transition: all 0.4s ease;
}

.accordion-item.active {
    border-color: var(--gold);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.active .accordion-content {
    max-height: 500px;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .section-padding {
        padding: 80px 0;
    }
    
    h1 {
        font-size: 2.5rem !important;
        line-height: 1.1 !important;
    }
    h2 {
        font-size: 2rem !important;
    }
}

@media (max-width: 575px) {
    .section-padding {
        padding: 60px 0;
    }
    
    h1 {
        font-size: 2rem !important;
        line-height: 1.15 !important;
    }
    h2 {
        font-size: 1.75rem !important;
    }
    h3 {
        font-size: 1.5rem !important;
    }
}

/* Premium Responsive Padding & Rounding Utilities */
.card-padding-premium {
    padding: 1.25rem;
}
@media (min-width: 400px) {
    .card-padding-premium {
        padding: 1.5rem;
    }
}
.card-rounded-premium {
    border-radius: 1.5rem;
}

@media (min-width: 640px) {
    .card-padding-premium {
        padding: 2rem;
    }
    .card-rounded-premium {
        border-radius: 2rem;
    }
}

@media (min-width: 768px) {
    .card-padding-premium {
        padding: 2.5rem;
    }
    .card-rounded-premium {
        border-radius: 3rem;
    }
}

@media (min-width: 1024px) {
    .card-padding-premium {
        padding: 3rem;
    }
    .card-rounded-premium {
        border-radius: 3.5rem;
    }
}

@media (min-width: 1280px) {
    .card-padding-premium {
        padding: 4rem;
    }
    .card-rounded-premium {
        border-radius: 4rem;
    }
}

/* Table Responsive Helper */
.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Order Progress Step Line Helper */
.progress-line-filled {
    height: var(--pct);
    width: 100%;
}
@media (min-width: 768px) {
    .progress-line-filled {
        width: var(--pct);
        height: 100%;
    }
}

/* 3D & Animation Utilities */
.perspective-1000 {
    perspective: 1000px;
}

.transform-gpu {
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-30px) rotate(2deg); }
}

.animate-float-slow {
    animation: float-slow 8s ease-in-out infinite;
}

.shadow-3xl {
    box-shadow: 0 30px 60px -15px rgba(0, 31, 63, 0.08), 0 20px 40px -20px rgba(0, 31, 63, 0.1);
}

.shadow-4xl {
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.4), 0 30px 60px -30px rgba(0, 0, 0, 0.4);
}

/* ── Country Flags Marquee Animation ─────────────────────────────────────── */
@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 28s linear infinite;
    will-change: transform;
}

/* ── Desktop Content Side Padding (Task #10) ─────────────────────────────── */
/* Prevents content from touching screen edges on large screens */
@media (min-width: 1024px) {
    .max-w-7xl, .max-w-5xl, .max-w-4xl {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}
@media (min-width: 1280px) {
    .max-w-7xl, .max-w-5xl, .max-w-4xl {
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }
}

/* Ensure wizard/step panels never bleed to viewport edge on desktops */
.wizard-outer-container,
.quote-wizard-wrap {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 1024px) {
    .wizard-outer-container,
    .quote-wizard-wrap {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

/* ── Mobile Form Box-Sizing Safety Net ───────────────────────────────────── */
@media (max-width: 767px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        box-sizing: border-box;
        max-width: 100%;
    }

    form {
        box-sizing: border-box;
        max-width: 100%;
        overflow: hidden;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMPREHENSIVE MOBILE RESPONSIVE FIXES — All Service Pages & Wizard
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Global overflow containment ─────────────────────────────────────────── */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* ── Wizard card — proper breathing room on every screen size ────────────── */
#quote {
    overflow: hidden;
}

/* ── Glass-card hover lift: disable on touch devices (causes jump) ────────── */
@media (max-width: 1023px) {
    .glass-card:hover {
        transform: none;
        box-shadow: 0 20px 40px rgba(0, 31, 63, 0.05);
    }
}

/* ── Hero section — mobile typography & padding ──────────────────────────── */
@media (max-width: 575px) {
    /* Hero headings */
    section h1.text-5xl,
    section h1.text-7xl,
    .hero h1 {
        font-size: 2.2rem !important;
        line-height: 1.15 !important;
    }

    /* Reduce huge hero top padding on mobile */
    section.relative.pt-48 {
        padding-top: 7rem !important;
        padding-bottom: 3rem !important;
    }

    /* Section horizontal padding */
    .max-w-7xl,
    .max-w-5xl,
    .max-w-4xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    section.relative.pt-48 {
        padding-top: 8rem !important;
        padding-bottom: 3.5rem !important;
    }
}

/* ── Service page — quote-section wrapper ────────────────────────────────── */
@media (max-width: 767px) {
    #quote-section.relative {
        border-radius: 2rem 2rem 0 0 !important;
        padding-top: 2.5rem !important;
        margin-top: -1.5rem !important;
        overflow-x: hidden;
    }
}

/* ── Wizard inner card — section padding on tiny screens ────────────────── */
@media (max-width: 400px) {
    .card-padding-premium {
        padding: 1rem !important;
    }
    .card-rounded-premium {
        border-radius: 1.25rem !important;
    }
    /* Make the wizard progress bar dots a bit smaller */
    #quote > .mb-6 .step-dot {
        height: 4px;
    }
    /* Wizard title */
    #wizard-title {
        font-size: 1.1rem !important;
    }
}

/* ── Coupon row: always fits on any screen ───────────────────────────────── */
@media (max-width: 639px) {
    /* Stack input and apply button vertically on xs */
    #quote .flex.flex-col.xs\:flex-row,
    #quote .flex.flex-col.sm\:flex-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    #quote #calc-coupon {
        width: 100% !important;
        border-bottom: 1px solid #f3f4f6;
    }
    /* Apply button goes full-width below input on xs */
    #quote button[onclick="validateCoupon()"] {
        width: 100% !important;
        margin-top: 0.25rem;
    }
}

/* ── Grid collapses ──────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    /* Two-column grids → single column */
    .grid.md\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
    .grid.md\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
    .grid.md\:grid-cols-5 {
        grid-template-columns: 1fr !important;
    }

    /* Delivery section: remove left border divider on mobile */
    .border-l-0.md\:border-l {
        border-left: none !important;
        padding-left: 0 !important;
    }

    /* Step 2 additional services top border spacing */
    .grid.md\:grid-cols-2.gap-6.md\:gap-12.border-b {
        gap: 1.5rem !important;
    }
}

/* ── Wizard buttons — prevent overflow on narrow screens ─────────────────── */
@media (max-width: 639px) {
    /* Navigation buttons row: stack vertically */
    .wizard-step .flex.flex-col.sm\:flex-row {
        flex-direction: column-reverse !important;
        gap: 0.75rem;
    }
    /* Back + Reset row: side by side */
    .wizard-step .flex.gap-4.w-full.sm\:w-auto {
        width: 100% !important;
    }
    .wizard-step .flex.gap-4.w-full.sm\:w-auto button {
        flex: 1;
    }
    /* Primary action button — full width on mobile */
    .wizard-step button.w-full.sm\:flex-1 {
        width: 100% !important;
        order: 0 !important;
    }
}

/* ── Wizard Step 5 review summary grid ──────────────────────────────────── */
@media (max-width: 767px) {
    .grid.md\:grid-cols-5 {
        grid-template-columns: 1fr;
    }
    /* Price card stacks below summary on mobile */
    .md\:col-span-3,
    .md\:col-span-2 {
        grid-column: span 1 !important;
    }
}

/* ── Service page section grids ─────────────────────────────────────────── */
@media (max-width: 1023px) {
    .grid.lg\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
    .lg\:col-span-2 {
        grid-column: span 1 !important;
    }
}

/* ── Tab buttons (sworn-translation page) — wrap nicely on mobile ─────────── */
@media (max-width: 639px) {
    .flex.flex-wrap.justify-center.gap-4 button.sworn-tab-btn,
    .flex.flex-wrap.justify-center.gap-4 button {
        padding: 0.65rem 1.25rem !important;
        font-size: 0.65rem !important;
    }
}

/* ── Large absolute decorative blobs — contain on mobile ─────────────────── */
@media (max-width: 767px) {
    .w-\[800px\], .h-\[800px\] {
        width: 300px !important;
        height: 300px !important;
    }
    .w-\[600px\], .h-\[600px\] {
        width: 200px !important;
        height: 200px !important;
    }
}

/* ── wizard section-padding override for mobile ──────────────────────────── */
@media (max-width: 575px) {
    #quote-section .section-padding,
    section#quote-section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
}

/* ── Tooltip popups: don't bleed off-screen on mobile ───────────────────── */
@media (max-width: 639px) {
    .group\/tooltip .absolute.w-72 {
        width: calc(100vw - 2rem) !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

