/* Quadrante USA Website Styles */

/* --- Font Face Declarations --- */
@font-face {
    font-family: 'Archivo';
    src: url('../assets/Fonts/Archivo-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Archivo';
    src: url('../assets/Fonts/Archivo-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Archivo';
    src: url('../assets/Fonts/Archivo-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Archivo';
    src: url('../assets/Fonts/Archivo-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Archivo';
    src: url('../assets/Fonts/Archivo-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* --- Typography Styles (Archivo Font Family) --- */
/* Headings - Large, bold, well-spaced with strong contrast */
h1, .heading-1 {
    font-family: 'Archivo', Helvetica, Arial, sans-serif;
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

h2, .heading-2 {
    font-family: 'Archivo', Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.2;
    letter-spacing: -0.015em;
    margin-bottom: 1.25rem;
    color: #1f2937;
}

h3, .heading-3 {
    font-family: 'Archivo', Helvetica, Arial, sans-serif;
    font-weight: 600;
    font-size: clamp(1.25rem, 3vw, 2rem);
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
    color: #1f2937;
}

h4, .heading-4 {
    font-family: 'Archivo', Helvetica, Arial, sans-serif;
    font-weight: 500;
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: #374151;
}

/* Body Text - Regular/medium weight with generous line height */
body, p, .body-text {
    font-family: 'Archivo', Helvetica, Arial, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #4b5563;
}

.body-medium {
    font-weight: 500;
}

/* Navigation & Menu - Sans-serif, regular/medium with clear spacing */
.nav-text {
    font-family: 'Archivo', Helvetica, Arial, sans-serif;
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* Links & CTAs - Distinct color with hover states */
a, .link {
    font-family: 'Archivo', Helvetica, Arial, sans-serif;
    color: #2563eb;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

a:hover, .link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* CTA Buttons */
.cta-button {
    font-family: 'Archivo', Helvetica, Arial, sans-serif;
    font-weight: 500;
    background-color: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cta-button:hover {
    background-color: #1d4ed8;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Professional layout spacing */
.section-spacing {
    padding: 4rem 0;
}

@media (min-width: 768px) {
    .section-spacing {
        padding: 6rem 0;
    }
}

/* Responsive Typography Enhancements */
@media (max-width: 640px) {
    h1, .heading-1 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    h2, .heading-2 {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 0.875rem;
    }

    .cta-button {
        padding: 0.625rem 1.25rem;
        font-size: 0.75rem;
    }

    .nav-text {
        font-size: 0.875rem;
    }
}

/* Enhanced Link Hover States */
.link-arrow {
    transition: transform 0.2s ease-in-out;
}

.link-arrow:hover {
    transform: translateX(4px);
}

/* Focus States for Accessibility */
a:focus, button:focus, .cta-button:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Ensure proper contrast on white backgrounds */
.bg-white .text-brand-dark {
    color: #1A2B4C;
}

.bg-white .text-brand-gray-600 {
    color: #475569;
}

/* --- Modal Styles --- */
.modal-hidden {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.modal-show {
    opacity: 1;
}

.modal-content {
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s ease-out;
}

/* --- Mobile Menu Styles --- */
#mobile-menu {
    transition: transform 0.3s ease-out;
    transform: translateX(100%) !important;
    -webkit-transform: translateX(100%) !important;
    will-change: transform;
    visibility: hidden;
}
#mobile-menu.active {
    transform: translateX(0) !important;
    -webkit-transform: translateX(0) !important;
    visibility: visible;
}

/* Safari Mobile Menu Button Fix */
#mobile-menu-btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    cursor: pointer;
    pointer-events: auto !important;
    position: relative;
    z-index: 60 !important;
}

#mobile-menu-btn:active {
    background-color: rgba(0, 0, 0, 0.1);
}

/* --- Slider Styles --- */
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 0;
}
.slide.active {
    opacity: 1;
    z-index: 10;
}

.slide-content {
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease-out 0.5s;
}
.slide.active .slide-content {
    opacity: 1;
    transform: translateY(0);
}

/* --- Utility Styles --- */
.hover-pause:hover .animate-marquee,
.hover-pause:hover .animate-marquee-reverse {
    animation-play-state: paused;
}

.mask-gradient {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(30, 64, 175, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(30, 64, 175, 0); }
}

@keyframes blinkPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}
.ai-pulse {
    animation: pulse-glow 2s infinite;
}

/* Background Pattern */
.bg-dot-pattern {
    background-color: #f8fafc;
    background-image: radial-gradient(#cbd5e1 1.5px, transparent 1.5px);
    background-size: 24px 24px;
}

/* Section Separator Background */
.bg-section-separator {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Brand Color Classes - Updated for Modern Typography */
.text-brand-primary { color: #1f2937; }
.text-brand-secondary { color: #4b5563; }
.text-brand-accent { color: #2563eb; }
.text-brand-dark { color: #1f2937; }
.text-brand-light { color: #FFFFFF; }

.bg-brand-primary { background-color: #1f2937; }
.bg-brand-secondary { background-color: #4b5563; }
.bg-brand-accent { background-color: #2563eb; }
.bg-brand-dark { background-color: #1f2937; }
.bg-brand-light { background-color: #FFFFFF; }

.border-brand-primary { border-color: #1f2937; }
.border-brand-secondary { border-color: #4b5563; }
.border-brand-accent { border-color: #2563eb; }

/* Brand Gray Color Classes - Updated */
.text-brand-gray-900 { color: #1f2937; }
.text-brand-gray-800 { color: #374151; }
.text-brand-gray-700 { color: #4b5563; }
.text-brand-gray-600 { color: #6b7280; }
.text-brand-gray-500 { color: #64748b; }
.text-brand-gray-400 { color: #94a3b8; }
.text-brand-gray-300 { color: #cbd5e1; }
.text-brand-gray-200 { color: #e2e8f0; }
.text-brand-gray-100 { color: #f1f5f9; }
.text-brand-gray-50 { color: #f8fafc; }

.bg-brand-gray-900 { background-color: #1f2937; }
.bg-brand-gray-800 { background-color: #374151; }
.bg-brand-gray-700 { background-color: #4b5563; }
.bg-brand-gray-600 { background-color: #6b7280; }
.bg-brand-gray-500 { background-color: #64748b; }
.bg-brand-gray-400 { background-color: #94a3b8; }
.bg-brand-gray-300 { background-color: #cbd5e1; }
.bg-brand-gray-200 { background-color: #e2e8f0; }
.bg-brand-gray-100 { background-color: #f1f5f9; }
.bg-brand-gray-50 { background-color: #f8fafc; }

.border-brand-gray-900 { border-color: #1f2937; }
.border-brand-gray-800 { border-color: #374151; }
.border-brand-gray-700 { border-color: #4b5563; }
.border-brand-gray-600 { border-color: #6b7280; }
.border-brand-gray-500 { border-color: #64748b; }
.border-brand-gray-400 { border-color: #94a3b8; }
.border-brand-gray-300 { border-color: #cbd5e1; }
.border-brand-gray-200 { border-color: #e2e8f0; }
.border-brand-gray-100 { border-color: #f1f5f9; }
.border-brand-gray-50 { border-color: #f8fafc; }

/* Modal Styles */
.modal-backdrop {
    transition: opacity 0.3s ease-out;
}
.modal-content {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}
.modal-hidden .modal-backdrop {
    opacity: 0;
    pointer-events: none;
}
.modal-hidden .modal-content {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}
#universal-modal .modal-content {
    transform: translateX(0);
    opacity: 1;
}
#universal-modal.modal-hidden .modal-content {
    transform: translateX(100%);
    opacity: 0;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Dark Scrollbar for the sidebar */
.dark-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.dark-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.dark-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

/* Hide scrollbars on mobile devices */
@media (max-width: 768px) {
    .custom-scrollbar::-webkit-scrollbar,
    .dark-scrollbar::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }

    .custom-scrollbar,
    .dark-scrollbar {
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
        overflow: hidden !important;
    }

    /* Allow vertical scrolling in modal content on mobile */
    #universal-modal .overflow-y-auto {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Ensure modal content can scroll on mobile */
    #universal-modal .flex-grow {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        height: auto;
        min-height: 0;
    }

    #universal-modal .overflow-x-auto:not(#mobile-nav-list) {
        overflow-x: hidden !important;
    }

    /* Force hide sidebar menu on mobile */
    #sidebar-menu-container {
        display: none !important;
    }

    #sidebar-gradient {
        display: none !important;
    }

    /* Keep only image visible on mobile */
    #universal-modal .bg-slate-900 {
        position: relative;
    }
}

/* Specific Fix for Quadrante Principles Spacing */
#quadrante-principles-list p {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Map Icon Styling */
.custom-div-icon {
    background: transparent;
    border: none;
}

/* Enhanced Blinking Animation for Map Markers */
@keyframes blinkPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(30, 64, 175, 0.8), 0 0 0 4px rgba(0,0,0,0.15);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
        box-shadow: 0 0 0 10px rgba(30, 64, 175, 0), 0 0 0 4px rgba(0,0,0,0.15);
    }
}

/* Leaflet Popup Override */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}
.leaflet-popup-content {
    margin: 0;
    width: 260px !important;
}

/* Line Clamp Utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Enhanced Map Marker Hover Effects */
.custom-div-icon div:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(0,0,0,0.2);
}

/* Project Showcase Animations */
#project-showcase {
    will-change: transform, opacity;
}

/* Mobile Project Cards */
.mobile-project-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Services Dropdown Styles */
.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

.group:hover .group-hover\:visible {
    visibility: visible;
}

.group:hover .group-hover\:rotate-180 {
    transform: rotate(180deg);
}

/* Ensure dropdown stays visible when hovering over it */
.group .absolute {
    pointer-events: auto;
}

/* Scrollable Cards Container - NOW WITH VISIBLE SCROLLBARS */
.scrollbar-show {
    -ms-overflow-style: auto;
    scrollbar-width: thin;
    scroll-behavior: smooth;
}

.scrollbar-show::-webkit-scrollbar {
    height: 8px;
    display: block;
}

.scrollbar-show::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.scrollbar-show::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.scrollbar-show::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Drag cursor states */
.scrollbar-show {
    cursor: grab;
}

.scrollbar-show.grabbing {
    cursor: grabbing;
    user-select: none;
}

.scrollbar-show.grabbing * {
    pointer-events: none;
}

/* Smooth scrolling for capability cards */
.scrollbar-show {
    scroll-behavior: smooth;
}

/* Enhanced Arrow Shadows */
.arrow-shadow {
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.3),
        0 20px 40px -10px rgba(59, 130, 246, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.arrow-shadow:hover {
    box-shadow:
        0 15px 35px -5px rgba(0, 0, 0, 0.4),
        0 25px 50px -12px rgba(59, 130, 246, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Mobile Arrow Styles */
@media (max-width: 768px) {
    .arrow-shadow {
        /* Smaller arrows on mobile but still visible */
        width: 40px !important;
        height: 48px !important;
        box-shadow:
            0 6px 15px -3px rgba(0, 0, 0, 0.3),
            0 10px 25px -5px rgba(59, 130, 246, 0.2),
            0 0 0 1px rgba(255, 255, 255, 0.1);
    }

    .arrow-shadow:active {
        transform: scale(0.95);
        box-shadow:
            0 4px 10px -2px rgba(0, 0, 0, 0.4),
            0 8px 20px -4px rgba(59, 130, 246, 0.3),
            0 0 0 1px rgba(255, 255, 255, 0.2);
    }

    /* Adjust right arrow position on mobile */
    .arrow-right-mobile {
        right: -40px !important;
    }

    /* Ensure arrows stay above touch interactions */
    .arrow-shadow {
        z-index: 60 !important;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}

/* Scroll Indication Gradients */
.scroll-gradient-container {
    position: relative;
}

/* Right side gradient - shows when right arrow is present */
.scroll-gradient-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.9), transparent);
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scroll-gradient-container.show-right-gradient::after {
    opacity: 1;
}

/* Left side gradient - shows when left arrow is present */
.scroll-gradient-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.9), transparent);
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scroll-gradient-container.show-left-gradient::before {
    opacity: 1;
}

/* --- Loading Animation Styles --- */
.loading-logo-enter {
    animation: logoSlideIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.loading-plus-enter {
    animation: plusAppear 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s forwards;
}

.loading-screen-exit {
    animation: loadingFadeOut 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes logoSlideIn {
    0% {
        opacity: 0;
        transform: translateX(var(--start-position));
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes plusAppear {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-90deg);
    }
    60% {
        opacity: 1;
        transform: scale(1.2) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes loadingFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.05);
        visibility: hidden;
    }
}

/* Simple bounce animation for map hint */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0,-30px,0);
    }
    70% {
        transform: translate3d(0,-15px,0);
    }
    90% {
        transform: translate3d(0,-4px,0);
    }
}