/* ==========================================
   SIGI COMMUNICATION CENTRE - MAIN STYLESHEET
   ========================================== */

:root {
    --sigi-navy: #0d1066;
    --sigi-blue: #1a2285;
    --sigi-accent: #3d4aef;
    --sigi-indigo: #2230a8;
    --sigi-sky: #4858d6;
    --sigi-teal: #14b8a6;
    --gradient-warm: linear-gradient(135deg, #0d1066 0%, #1a2285 35%, #2e3bc0 70%, #3d4aef 100%);
    --gradient-flow: linear-gradient(180deg, #f0f0ff 0%, #e5e6ff 50%, #f0f0ff 100%);
    --section-light: #f7f7ff;
    --section-soft: #f0f0ff;
}

* { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: hidden;
    background-color: var(--section-light);
}

/* ==========================================
   WCAG 2.1 ACCESSIBILITY
   ========================================== */
/* Skip to content link (visible on focus) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus-visible styles for keyboard users */
*:focus-visible {
    outline: 3px solid var(--sigi-accent);
    outline-offset: 2px;
}

/* Ensure minimum contrast for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--sigi-accent);
    outline-offset: 2px;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================
   SEAMLESS SECTION FLOW & TRANSITIONS
   ========================================== */
.section-divider {
    position: relative;
    z-index: 2;
    margin-top: -1px;
}
.section-divider svg {
    display: block;
    width: 100%;
    height: auto;
}

.section-flow-white {
    background: linear-gradient(180deg, #ffffff 0%, #f0f0ff 100%);
    position: relative;
}
.section-flow-soft {
    background: linear-gradient(180deg, #f0f0ff 0%, #e0e2ff 50%, #f0f0ff 100%);
    position: relative;
}
.section-flow-light {
    background: linear-gradient(180deg, #f0f0ff 0%, #ffffff 100%);
    position: relative;
}

.gradient-mesh {
    background:
        radial-gradient(ellipse at 10% 20%, rgba(61, 74, 239, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(34, 48, 168, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(72, 88, 214, 0.02) 0%, transparent 60%);
}

/* Custom Logo Styles */
.sigi-logo-wrapper { display: flex; align-items: center; justify-content: center; font-family: 'Plus Jakarta Sans', sans-serif; }
.sigi-pill { background-color: #ffffff; color: var(--sigi-navy); padding: 0.4rem 1.2rem; font-weight: 800; text-transform: uppercase; border: 2px solid var(--sigi-navy); z-index: 1; font-size: 0.9rem; }
.sigi-pill.left { border-radius: 50px 0 0 50px; margin-right: -15px; }
.sigi-pill.right { border-radius: 0 50px 50px 0; margin-left: -15px; }
.sigi-circle { background-color: #ffffff; color: var(--sigi-navy); border-radius: 50%; width: 100px; height: 100px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; z-index: 2; border: 4px solid #ffffff; outline: 2px solid var(--sigi-navy); box-shadow: 0 0 0 6px #ffffff; }
.sigi-circle .main-txt { font-size: 1.8rem; font-weight: 800; line-height: 1; margin-bottom: 2px; }
.sigi-circle .sub-txt { font-size: 0.45rem; font-weight: 700; text-transform: uppercase; line-height: 1.2; }

/* ==========================================
   NAVIGATION
   ========================================== */
.glass-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(61, 74, 239, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-nav.scrolled {
    box-shadow: 0 4px 30px rgba(13, 16, 102, 0.08), 0 1px 3px rgba(61, 74, 239, 0.06);
}

.nav-item-container:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    box-shadow: 0 25px 50px -12px rgba(13, 16, 102, 0.15);
}

.logo-link {
    transition: transform 0.3s ease, filter 0.3s ease;
}
.logo-link:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* ==========================================
   HERO
   ========================================== */
.hero-gradient {
    background: linear-gradient(135deg, #0d1066 0%, #111580 25%, #1a2285 50%, #2e3bc0 80%, #3d4aef 100%);
    position: relative;
    overflow: hidden;
}
.hero-gradient::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #ffffff 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}
.hero-pattern {
    position: absolute; top: 0; right: 0; width: 60%; height: 100%;
    background-image: radial-gradient(circle at 30% 40%, rgba(61, 74, 239, 0.08) 0%, transparent 50%),
                      radial-gradient(circle at 70% 80%, rgba(72, 88, 214, 0.05) 0%, transparent 40%);
    pointer-events: none;
}
.hero-dots {
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* Instant Upload CTA - High contrast, F-Pattern placement */
.instant-upload-cta {
    animation: ctaPulse 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
}
@keyframes ctaPulse {
    0%, 100% { box-shadow: 0 4px 30px rgba(251, 191, 36, 0.4); }
    50% { box-shadow: 0 8px 50px rgba(251, 191, 36, 0.7); }
}

/* ==========================================
   ANIMATIONS
   ========================================== */
.card-hover { transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.card-hover:hover { transform: translateY(-8px); box-shadow: 0 30px 40px -10px rgba(13, 16, 102, 0.12); }

.ai-pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fadeInUp { animation: fadeInUp 0.8s ease-out forwards; }

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}
.animate-slideInRight { animation: slideInRight 0.6s ease-out forwards; }

@keyframes revealUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   SCROLLBAR
   ========================================== */
.custom-scroll::-webkit-scrollbar { width: 5px; }
.custom-scroll::-webkit-scrollbar-track { background: #f1f1f1; }
.custom-scroll::-webkit-scrollbar-thumb { background: var(--sigi-navy); border-radius: 10px; }

/* Section Anchors */
.section-anchor { scroll-margin-top: 180px; }

/* ==========================================
   MOBILE NAV
   ========================================== */
.mobile-menu { transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
.mobile-menu.open { transform: translateX(0); }

/* Mobile menu backdrop */
#mobile-backdrop.active {
    display: block;
}

/* ==========================================
   WHATSAPP BUTTON
   ========================================== */
.whatsapp-glow { box-shadow: 0 0 20px rgba(37, 211, 102, 0.3); }
.whatsapp-glow:hover { box-shadow: 0 0 30px rgba(37, 211, 102, 0.5); }

/* ==========================================
   COUNTER
   ========================================== */
.counter-box { transition: all 0.3s ease; }
.counter-box:hover { transform: scale(1.05); }

/* ==========================================
   BOOKING FORM
   ========================================== */
.booking-form input,
.booking-form select,
.booking-form textarea,
.tracking-form input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all 0.3s ease;
    background: white;
    color: #1e293b;
    min-height: 48px; /* WCAG 2.1 - minimum 44px touch target */
}
.booking-form input:focus,
.booking-form select:focus,
.booking-form textarea:focus,
.tracking-form input:focus {
    outline: none;
    border-color: var(--sigi-accent);
    box-shadow: 0 0 0 4px rgba(61, 74, 239, 0.1);
}
.booking-form label {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #6b7280;
    margin-bottom: 8px;
}
.booking-success {
    display: none;
    animation: fadeInUp 0.5s ease;
}
.booking-success.show {
    display: flex;
}

/* ==========================================
   TERMS OF INVESTMENT MODAL
   ========================================== */
.terms-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(13, 16, 102, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.terms-modal-overlay.active {
    display: flex;
    opacity: 1;
}
.terms-modal-content {
    position: relative;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 25px 60px -12px rgba(13, 16, 102, 0.3);
    max-width: 720px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    margin: 1rem;
    padding: 2.5rem;
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.terms-modal-content::-webkit-scrollbar { width: 6px; }
.terms-modal-content::-webkit-scrollbar-track { background: transparent; }
.terms-modal-content::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.terms-modal-content::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.terms-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #2e3bc0 0%, #2230a8 100%);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(46, 59, 192, 0.3);
    min-height: 48px;
}
.terms-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 59, 192, 0.4);
}

/* ==========================================
   FOOTER GRADIENT
   ========================================== */
.footer-gradient {
    background: linear-gradient(180deg, #0d1066 0%, #0a0d55 50%, #0d1066 100%);
}
.footer-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(61, 74, 239, 0.3) 50%, transparent 100%);
}

/* ==========================================
   FILE UPLOAD PORTAL (WORKBOX)
   ========================================== */
.upload-drop-zone {
    position: relative;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.upload-drop-zone.drag-over {
    border-color: var(--sigi-accent);
    background: rgba(61, 74, 239, 0.04);
    transform: scale(1.01);
}
.upload-drop-zone.drag-over .upload-drop-icon i {
    color: var(--sigi-accent);
    transform: translateY(-4px);
}
.upload-drop-icon i {
    transition: all 0.3s ease;
}

/* File list items */
.upload-file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.8rem;
    animation: fadeInUp 0.3s ease;
}
.upload-file-item .file-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
}
.upload-file-item .file-icon.pdf { background: #fef2f2; color: #dc2626; }
.upload-file-item .file-icon.docx { background: #eff6ff; color: #2563eb; }
.upload-file-item .file-icon.jpg { background: #fefce8; color: #ca8a04; }
.upload-file-item .file-icon.png { background: #f0fdf4; color: #16a34a; }
.upload-file-item .file-info {
    flex: 1;
    min-width: 0;
}
.upload-file-item .file-name {
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.upload-file-item .file-size {
    color: #9ca3af;
    font-size: 0.7rem;
}
.upload-file-item .file-remove {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
    min-width: 44px;
    min-height: 44px;
}
.upload-file-item .file-remove:hover {
    background: #fca5a5;
}

/* Per-file progress bar */
.file-progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}
.file-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sigi-accent), #22c55e);
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%;
}
.file-progress-fill.uploading {
    transition: width 0.2s linear;
}

/* Overall upload progress bar */
.upload-progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sigi-accent), #22c55e);
    border-radius: inherit;
    transition: width 0.3s ease;
    width: 0%;
}

/* File validation error */
.file-validation-error {
    animation: fadeInUp 0.3s ease;
}

/* ==========================================
   PRICING CALCULATOR - Toggle Buttons
   ========================================== */
.calc-toggle-btn {
    border-color: #e5e7eb;
    background: #f9fafb;
    color: #6b7280;
    cursor: pointer;
}
.calc-toggle-btn:hover {
    border-color: #c5c8ff;
    background: #f0f0ff;
    color: var(--sigi-navy);
}
.calc-toggle-btn.active {
    border-color: var(--sigi-accent);
    background: linear-gradient(135deg, #f0f0ff 0%, #e0e2ff 100%);
    color: var(--sigi-navy);
    box-shadow: 0 0 0 3px rgba(61, 74, 239, 0.1);
}

/* Upload option toggle buttons */
.upload-option-btn {
    border-color: #e5e7eb;
    background: #f9fafb;
    color: #6b7280;
    cursor: pointer;
}
.upload-option-btn:hover {
    border-color: #c5c8ff;
    background: #f0f0ff;
    color: var(--sigi-navy);
}
.upload-option-btn.active {
    border-color: var(--sigi-accent);
    background: linear-gradient(135deg, #f0f0ff 0%, #e0e2ff 100%);
    color: var(--sigi-navy);
    box-shadow: 0 0 0 3px rgba(61, 74, 239, 0.1);
    font-weight: 800;
}

/* Price total animation */
@keyframes calcPop {
    0% { transform: scale(1); }
    30% { transform: scale(1.12); }
    100% { transform: scale(1); }
}
.calc-total-pop {
    animation: calcPop 0.4s ease-out;
}

/* ==========================================
   PAYMENT METHOD BUTTONS
   ========================================== */
.pay-method-btn {
    cursor: pointer;
    transition: all 0.2s ease;
}
.pay-method-btn:hover {
    border-color: #22c55e;
    background: #f0fdf4;
}

/* ==========================================
   ORDER TRACKING TIMELINE
   ========================================== */
.timeline-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.5rem;
    position: relative;
}
.timeline-item:last-child {
    padding-bottom: 0;
}
.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 36px;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}
.timeline-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.75rem;
    z-index: 1;
}
.timeline-dot.active {
    background: var(--sigi-navy);
    color: white;
}
.timeline-dot.completed {
    background: #dcfce7;
    color: #16a34a;
}
.timeline-dot.pending {
    background: #f3f4f6;
    color: #9ca3af;
}
.timeline-content {
    flex: 1;
    padding-top: 4px;
}
.timeline-content .timeline-title {
    font-weight: 800;
    font-size: 0.85rem;
    color: #1e293b;
}
.timeline-content .timeline-time {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 2px;
}
.timeline-content .timeline-message {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 4px;
}

/* Status badge colors */
.status-received { background: #dbeafe; color: #1d4ed8; }
.status-processing { background: #fef3c7; color: #92400e; }
.status-ready { background: #f3e8ff; color: #6b21a8; }
.status-collected { background: #dcfce7; color: #166534; }
.status-delivered { background: #dcfce7; color: #166534; }

/* ==========================================
   DYNAMIC FAQ ACCORDION
   ========================================== */
.faq-item {
    transition: all 0.3s ease;
}
.faq-trigger {
    cursor: pointer;
}
.faq-trigger:hover {
    background: #fafbff;
}
.faq-trigger[aria-expanded="true"] {
    background: #fafbff;
    border-color: #c5c8ff;
    border-radius: 1rem 1rem 0 0;
}
.faq-content {
    background: #fafbff;
    border: 1px solid #c5c8ff;
    border-top: none;
    border-radius: 0 0 1rem 1rem;
    animation: faqSlideDown 0.3s ease;
}
@keyframes faqSlideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 500px; }
}
.faq-chevron {
    transition: transform 0.3s ease;
}

/* ==========================================
   RESPONSIVE - THUMB-FRIENDLY MOBILE
   ========================================== */
@media (max-width: 768px) {
    .nav-dropdown { position: fixed; left: 5%; width: 90%; top: 80px; }
    .hero-title { font-size: 2.5rem !important; }
    .sigi-circle { width: 70px; height: 70px; }
    .sigi-circle .main-txt { font-size: 1.3rem; }
    .sigi-circle .sub-txt { font-size: 0.35rem; }
    .sigi-pill { font-size: 0.7rem; padding: 0.3rem 0.8rem; }
    .terms-modal-content { padding: 1.5rem; border-radius: 1rem; }
    .terms-btn { padding: 0.75rem 1.5rem; font-size: 0.8rem; }

    /* Upload Workbox */
    .upload-drop-zone {
        padding: 1.5rem 1rem;
        min-height: 130px;
    }
    .upload-drop-zone i.fa-cloud-arrow-up {
        font-size: 2rem;
    }

    /* File remove buttons - 44px min */
    .upload-file-item .file-remove {
        width: 44px;
        height: 44px;
    }

    /* Order tracking */
    #order-ref-input {
        font-size: 0.875rem;
    }

    /* Calculator toggle buttons stack better on small screens */
    .calc-toggle-btn {
        min-height: 52px;
    }

    /* FAQ items */
    .faq-trigger {
        padding: 1rem 1.25rem;
    }

    /* Instant Upload CTA */
    .instant-upload-cta {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .terms-modal-content { padding: 1.25rem; }

    .upload-drop-zone {
        padding: 1.25rem 0.75rem;
        min-height: 110px;
    }
    .upload-file-item {
        padding: 0.5rem 0.75rem;
    }
    .timeline-item {
        gap: 0.75rem;
    }

    /* Binding buttons stack to 2-col on very small screens */
    .calc-toggle-btn {
        min-height: 48px;
        font-size: 0.75rem;
    }
}

/* No scrollbar utility */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
