/* ============================================================
   FAQ AI Voice Page - Complete Stylesheet
   Ethics Fleet Serve
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
    --primary-deep: #0A1A2F;
    --primary-dark: #051120;
    --primary-section: #0F2A3F;
    --gold-primary: #D4AF37;
    --gold-dark: #B38F2A;
    --text-main: #F1F5F9;
    --text-muted: #94a3b8;
    --white: #FFFFFF;
    --radius-lg: 20px;
    --transition: all .3s ease;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--primary-deep);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container, .faq-container {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 32px;
}

.highlight {
    color: var(--gold-primary);
}

/* Header & Footer Placeholders */
#global-header-placeholder,
#global-footer-placeholder {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay, #faqLoadingOverlay {
    position: fixed;
    inset: 0;
    background: var(--primary-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.hide, 
.loading-overlay.fade-out, 
#faqLoadingOverlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-spinner, .faq-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(212, 175, 55, 0.15);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Content Wrapper Transition States */
.main-content-wrapper, .faq-main-wrapper {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.main-content-wrapper.visible, .faq-main-wrapper.visible {
    opacity: 1;
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    height: 80vh;
    min-height: 680px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    filter: brightness(0.65) contrast(1.05);
    transition: transform 0.8s ease;
    z-index: 0;
}

.hero:hover .hero-bg {
    transform: scale(1.06);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,14,23,0.75) 0%, rgba(0,18,41,0.85) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.hero h1 {
    color: var(--white);
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero p {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    margin: 20px auto;
    max-width: 1100px;
    opacity: 0.95;
    color: var(--white);
}

.hero-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 35px;
}

.hero-stat, .hero-stats div {
    text-align: center;
}

.hero-stat-number {
    font-size: clamp(2.4rem, 4.5vw, 3.8rem);
    font-weight: 800;
    color: var(--gold-primary);
    display: block;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
    margin-bottom: 4px;
}

.hero-stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.9);
}

/* Buttons */
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--primary-dark);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212,175,55,0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gold-primary);
    color: var(--gold-primary);
}

.btn-outline:hover {
    background: var(--gold-primary);
    color: var(--primary-dark);
    transform: translateY(-3px);
}

.btn-whatsapp {
    background: #25D366;
    color: var(--white);
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-3px);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    background: rgba(255, 255, 255, 0.95);
    padding: 16px 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 10;
}

.breadcrumb-container {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 2rem;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
    content: "→";
    margin-left: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.breadcrumb-list a {
    color: #0f3057;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
}

.breadcrumb-list a:hover {
    color: var(--gold-primary);
}

.breadcrumb-list li:last-child {
    color: #0e7490;
    font-weight: 700;
}

/* ===== SECTION HEADER ===== */
.section-header, .faq-section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-subtitle, .faq-section-subtitle {
    display: inline-block;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.section-title, .section-header h2, .faq-section-title {
    color: var(--white);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
}

.title-underline, .faq-title-underline {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-dark));
    margin: 16px auto 0;
    border-radius: 3px;
}

.section-header p, .faq-section-header p {
    color: var(--text-muted);
    max-width: 800px;
    margin: 20px auto 0;
    font-size: 1.05rem;
}

/* ===== FAQ CORE SECTIONS ===== */
.faq-section, .section-dark {
    padding: 80px 0;
    background: var(--primary-dark);
}

.section-dark {
    background: var(--primary-section);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Layout Style A: AI Voice Cards --- */
.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    padding: 28px 30px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.faq-item:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.25);
    background: rgba(212, 175, 55, 0.04);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.5);
}

.faq-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    opacity: 0.7;
}

.faq-image-link {
    display: block;
    text-decoration: none;
    width: 100%;
    margin-bottom: 16px;
}

.faq-image {
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    background: #1A3A4F;
    position: relative;
    width: 100%;
}

.faq-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.faq-item:hover .faq-image img { transform: scale(1.05); }

.image-fallback {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1A3A4F, var(--primary-deep));
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 20px;
    font-weight: 600;
}

.faq-image img.error + .image-fallback,
.faq-image img[src=""] + .image-fallback,
.faq-image img:not([src]) + .image-fallback {
    display: flex !important;
}

.faq-image img.error, .faq-image img[src=""], .faq-image img:not([src]) {
    display: none !important;
}

.voice-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 999px;
    font-size: 0.65rem;
    color: #60a5fa;
    margin-bottom: 12px;
    align-self: flex-start;
}

.faq-question {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--white);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.faq-question i {
    color: var(--gold-primary);
    font-size: 1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

/* --- Layout Style B: Collapsible Accordion Cards --- */
.faq-card {
    background: linear-gradient(135deg, #0f2f3f 0%, #071a24 100%);
    border-radius: 24px;
    padding: 24px 28px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(212, 175, 55, 0.12);
    position: relative;
    overflow: hidden;
}

.faq-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--gold-primary), var(--gold-dark));
    transition: height 0.35s ease;
}

.faq-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.4);
}

.faq-card:hover::before, .faq-card.active::before {
    height: 100%;
}

.faq-card.active {
    border-color: rgba(212, 175, 55, 0.5);
    background: linear-gradient(135deg, #123544 0%, #09202e 100%);
}

.faq-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    color: var(--white);
    margin: 0;
}

.faq-toggle-icon, .toggle-icon {
    width: 30px;
    height: 30px;
    background: rgba(212, 175, 55, 0.12);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold-primary);
    transition: var(--transition);
    flex-shrink: 0;
}

.faq-card.active .faq-toggle-icon, .faq-card.active .toggle-icon {
    background: var(--gold-primary);
    color: var(--primary-deep);
    transform: rotate(180deg);
}

/* Shared Answers and Tag Components */
.faq-answer, .faq-card .faq-answer p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.faq-answer strong {
    color: var(--white);
    font-weight: 600;
}

.faq-answer a {
    color: var(--gold-primary);
    text-decoration: none;
    font-weight: 500;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* Animation for collapsing */
.faq-card .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin-top 0.4s ease;
    margin-top: 0;
}

.faq-card.active .faq-answer {
    max-height: 500px;
    margin-top: 18px;
}

.faq-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.faq-tags span {
    font-size: 0.65rem;
    padding: 4px 12px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 999px;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== PORT AVAILABILITY GRID SECTION ===== */
.section-mid {
    background: var(--primary-deep);
    padding: 70px 0;
}

.port-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.port-card {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.02);
    transition: var(--transition);
}

.port-card:hover {
    background: rgba(212, 175, 55, 0.04);
    border-color: rgba(212, 175, 55, 0.15);
}

.port-card i {
    font-size: 2rem;
    color: var(--gold-primary);
    margin-bottom: 12px;
    display: block;
}

.port-card h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
    color: var(--white);
}

.port-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===== CTA SECTION ===== */
.faq-cta-section {
    background: linear-gradient(135deg, var(--primary-deep), var(--primary-dark));
    padding: 80px 20px;
}

.faq-cta-container {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(8, 18, 28, 0.95));
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 32px;
    padding: 50px 40px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.cta-title, .faq-cta-title {
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    margin-bottom: 16px;
    color: var(--white);
    font-weight: 800;
}

.cta-description, .faq-cta-description {
    font-size: 1rem;
    max-width: 650px;
    margin: 0 auto 28px;
    color: rgba(255, 255, 255, 0.75);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.cta-btn-primary {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--primary-deep);
}

.cta-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
}

.cta-btn-outline {
    background: transparent;
    border: 2px solid var(--gold-primary);
    color: var(--gold-primary);
}

.cta-btn-outline:hover {
    background: var(--gold-primary);
    color: var(--primary-deep);
    transform: translateY(-3px);
}

/* ===== RUNTIME SCROLL ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== CORE LAYOUT RESPONSIVENESS ===== */
@media (max-width: 992px) {
    .faq-grid { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
    .hero { height: auto; min-height: 600px; padding: 80px 0; }
    .hero-stats { gap: 20px; }
}

@media (max-width: 768px) {
    .container, .faq-container { padding: 0 20px; }
    .faq-grid { grid-template-columns: 1fr; gap: 20px; }
    .faq-item, .faq-card { padding: 22px 24px; }
    .faq-image { height: 160px; }
    .hero h1 { font-size: 2rem; }
    .hero-stats { gap: 16px; margin-bottom: 25px; }
    .hero-stat-number { font-size: 1.8rem; }
    .breadcrumb { padding: 12px 20px; }
    .breadcrumb-container { padding-left: 1rem; }
    .faq-cta-container { padding: 35px 20px; }
    .btn, .cta-btn { padding: 12px 24px; font-size: 0.9rem; }
}

@media (max-width: 480px) {
    .hero-stats { gap: 20px; }
    .hero-stat-number { font-size: 1.5rem; }
    .hero-buttons, .cta-buttons { flex-direction: column; align-items: center; }
    .btn, .cta-btn { width: 100%; justify-content: center; }
    .faq-image { height: 140px; }
}