/* ============================================
   CardOpz V3 Shared Styles
   Applied across ALL marketing pages for consistency.
   Loaded AFTER design-system.css and animations.css.
   ============================================ */

/* --- Font Override (Plus Jakarta Sans for headings) --- */
h1, h2, h3, h4,
.feature-text__title,
.nav__logo {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    letter-spacing: -0.03em;
}

/* --- Scroll Fade-In (IntersectionObserver driven) --- */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* --- Gradient Text --- */
.gradient-text {
    background: linear-gradient(135deg, #2563eb, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Hero Pattern (shared across all pages) --- */
.v3-hero {
    background: linear-gradient(180deg, #f0f5ff 0%, #fafafa 100%);
    padding: calc(var(--nav-height) + 5rem) 0 5rem;
    text-align: center;
}
.v3-hero h1 {
    font-weight: 800 !important;
    font-size: clamp(2.5rem, 5vw, 3.75rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.035em !important;
    margin-bottom: var(--space-4);
}
.v3-hero .hero-subtitle,
.v3-hero .hero-sub {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    max-width: 52ch;
    margin: 0 auto var(--space-8);
    line-height: 1.6;
}

/* --- Glow Spots --- */
.section--glow {
    position: relative;
    overflow: hidden;
}
.section--glow::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.section--glow-left::before { top: -100px; left: -150px; }
.section--glow-right::before { top: -100px; right: -150px; left: auto; }
.section--glow > .container { position: relative; z-index: 1; }

/* --- CTA Button Glow --- */
.btn--primary {
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
    transition: all 0.2s ease !important;
}
.btn--primary:hover {
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35) !important;
    transform: translateY(-1px);
}

/* --- Browser Frame Enhancements --- */
.browser-frame {
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    overflow: hidden;
}
.browser-frame:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
}
.browser-frame__bar {
    background: #1a1a2e !important;
    border-radius: 16px 16px 0 0 !important;
}
.browser-frame__dots span:nth-child(1) { background: #ff5f57; }
.browser-frame__dots span:nth-child(2) { background: #febc2e; }
.browser-frame__dots span:nth-child(3) { background: #28c840; }
.browser-frame__url {
    color: rgba(255, 255, 255, 0.5) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* --- Animation videos in browser frames --- */
.browser-frame__body video {
    display: block;
    width: 100%;
    height: auto;
}

/* --- Display Frame (TV screens, not browser windows) --- */
.display-frame {
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.display-frame:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.display-frame img,
.display-frame video {
    display: block;
    width: 100%;
    height: auto;
}

/* --- Hover GIF (shows animated version on hover) --- */
.browser-frame__body .hover-gif {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.browser-frame:hover .browser-frame__body .hover-gif {
    opacity: 1;
}

/* --- Eyebrow with Icon (pill badge) --- */
.feature-text__eyebrow {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
    padding: 0.35rem 0.75rem 0.35rem 0.5rem !important;
    border-radius: 100px !important;
    background: rgba(37, 99, 235, 0.06) !important;
    color: #2563eb !important;
    border: none !important;
}
.eyebrow-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.eyebrow-icon img {
    width: 14px;
    height: 14px;
}

/* --- Feature Split (two-column layout) --- */
.feature-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
}
.feature-split--reverse {
    direction: rtl;
}
.feature-split--reverse > * {
    direction: ltr;
}
.feature-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}
.feature-text__title {
    font-weight: 700 !important;
    font-size: clamp(1.75rem, 3vw, 2.25rem) !important;
    line-height: 1.15 !important;
}
.feature-text__desc {
    max-width: 540px;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}
.feature-text__list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.feature-text__list li {
    padding: var(--space-2) 0;
    padding-left: var(--space-6);
    position: relative;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: 1.6;
}
.feature-text__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: var(--color-brand-primary);
    border-radius: 50%;
    opacity: 0.15;
}
.feature-text__list li::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--color-brand-primary);
    border-radius: 50%;
}
.feature-demo-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--color-brand-primary);
    text-decoration: none;
    cursor: pointer;
}
.feature-demo-link:hover {
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .feature-split,
    .feature-split--reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }
}

/* --- Section Header (centered) --- */
.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}
.section-header__sub {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 56ch;
    margin: var(--space-4) auto 0;
}

/* --- FAQ Accordion --- */
.faq-item {
    border-bottom: 1px solid var(--color-border-light);
}
.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-5) 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text-primary);
    text-align: left;
}
.faq-question:hover {
    color: var(--color-brand-primary);
}
.faq-chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: var(--space-4);
}
.faq-item.open .faq-chevron,
.faq-item.active .faq-chevron {
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease-out), padding 0.3s;
}
.faq-item.open .faq-answer,
.faq-item.active .faq-answer {
    max-height: 300px;
}
.faq-answer p {
    padding: 0 var(--space-6) var(--space-6);
    font-size: var(--text-sm);
    line-height: 1.7;
    color: var(--color-text-secondary);
    max-width: none;
}

/* --- Module Card (used in grids) --- */
.module-card__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
}
.module-card__title {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    font-weight: 600;
    font-size: var(--text-lg);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}
.module-card__desc {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* --- Feature Icon Card (SEO pages) --- */
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: var(--color-bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
}
.feature-title {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    font-weight: 600;
    font-size: var(--text-base);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}
.feature-desc {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* --- CTA Section (dark) --- */
.cta-phone {
    margin-top: var(--space-4);
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--text-sm);
}
.cta-phone a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

/* --- Badge --- */
.badge {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
    font-size: 0.75rem !important;
    padding: 0.4rem 1rem !important;
    border-radius: 100px !important;
    background: rgba(37, 99, 235, 0.08) !important;
    color: #2563eb !important;
    border: 1px solid rgba(37, 99, 235, 0.12) !important;
    display: inline-block;
    margin-bottom: var(--space-4);
    text-transform: uppercase;
}

/* --- Centered paragraph alignment fix --- */
/* Prevent max-width: 65ch from left-aligning paragraphs inside centered containers */
.v3-hero p,
.section-header p,
.section-header__sub,
.section--dark p,
[style*="text-align: center"] > p {
    margin-left: auto;
    margin-right: auto;
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
    text-align: center;
}
.stat__value {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1;
    margin-bottom: var(--space-2);
}
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Booking Modal (shared) --- */
.booking-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.booking-overlay.show {
    opacity: 1;
    visibility: visible;
}
.booking-modal {
    background: white;
    border-radius: var(--radius-xl, 16px);
    max-width: 560px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}
.booking-modal-header {
    padding: var(--space-8, 1.5rem);
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    position: relative;
}
.booking-modal-body {
    padding: var(--space-8, 1.5rem);
}
.modal-title {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    color: var(--color-text-primary);
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-1);
}
.modal-subtitle {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}
.modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-tertiary);
    padding: 8px;
}
.modal-close:hover {
    color: var(--color-text-primary);
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-6);
    margin-bottom: var(--space-8);
    position: relative;
}
.progress-line {
    position: absolute;
    top: 20px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--color-border);
    z-index: 0;
}
.progress-line-fill {
    height: 100%;
    background: #2563eb;
    transition: width 0.3s;
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    position: relative;
    z-index: 1;
}
.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--color-text-tertiary);
    transition: all 0.3s;
}
.step.active .step-circle {
    border-color: #2563eb;
    color: #2563eb;
}
.step.completed .step-circle {
    border-color: #2563eb;
    background: #2563eb;
    color: white;
}
.step-label {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--color-text-tertiary);
}
.step.active .step-label { color: #2563eb; }
.step.completed .step-label { color: var(--color-text-primary); }

/* Date pills */
.date-selector {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}
.date-pill {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    text-align: center;
    font-size: var(--text-xs);
    color: var(--color-text-primary);
    transition: all 0.2s;
    min-width: 80px;
}
.date-pill:hover { border-color: #2563eb; }
.date-pill.selected {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
}

/* Time slots */
.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}
.time-slot {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    transition: all 0.2s;
}
.time-slot:hover:not(.booked) { border-color: #2563eb; }
.time-slot.selected {
    border-color: #2563eb;
    background: #2563eb;
    color: white;
}
.time-slot.booked {
    border-color: var(--color-border);
    background: #f3f4f6;
    color: #9ca3af;
    cursor: default;
    opacity: 0.7;
    pointer-events: none;
}

/* Form inputs in booking modal */
.booking-modal-body .form-group { margin-bottom: var(--space-4); }
.booking-modal-body .form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
}
.booking-modal-body .form-input,
.booking-modal-body .form-textarea {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    background: white;
    transition: border-color 0.2s;
}
.booking-modal-body .form-input:focus,
.booking-modal-body .form-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.booking-modal-body .form-textarea {
    min-height: 80px;
    resize: vertical;
}

/* Button group in modal */
.button-group {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-6);
}
.button-group .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    background: #2563eb;
    color: white;
}
.button-group .btn:hover { background: #1d4ed8; }
.button-group .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.button-group .btn-back {
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}
.button-group .btn-back:hover { background: var(--color-bg-secondary); }

/* Summary card */
.summary-card {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) 0;
}
.summary-row + .summary-row {
    border-top: 1px solid var(--color-border-light);
}
.summary-label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}
.summary-value {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-primary);
}

/* Content sections in modal */
.content-section { display: none; }
.content-section.active { display: block; }

/* Success state */
.success-content {
    text-align: center;
    padding: var(--space-6) 0;
}
.success-icon {
    width: 64px;
    height: 64px;
    color: #10b981;
    margin-bottom: var(--space-4);
}
.success-title {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}
.success-message {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
}
.meeting-details {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-6);
    text-align: left;
}

/* Loading spinner */
.booking-loading {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: booking-spin 0.6s linear infinite;
    display: inline-block;
}
@keyframes booking-spin { to { transform: rotate(360deg); } }

/* Booking heading styles */
.booking-modal-body h3 {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-text-primary);
}
.booking-modal-body p {
    color: var(--color-text-secondary);
}

/* --- Responsive: Global --- */
@media (max-width: 768px) {
    .v3-hero h1 {
        font-size: clamp(2rem, 8vw, 2.75rem) !important;
    }
}
