/* Civil Legal Services Center - Custom Styles */

:root {
    --clsc-blue: #1e40af;
    --clsc-light-blue: #3b82f6;
    --clsc-dark: #1e293b;
    --clsc-gold: #d97706;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease-out;
}

.loading-spinner.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner-icon {
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

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

/* Dark Mode Loading Spinner */
.dark .loading-spinner {
    background: rgba(30, 41, 59, 0.95);
}

/* Sticky Header */
.header-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-sticky .navbar-brand {
    margin-left: 0;
    margin-right: auto;
}

.header-sticky.scrolled {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Reduce navbar padding */
.header-sticky .navbar {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.header-sticky .navbar-brand {
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
}

/* Navigation link styling */
.nav-links {
    list-style: none;
    gap: 2rem;
}

.nav-links .nav-item {
    position: relative;
}

.nav-links .nav-link {
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    color: #212529;
    text-decoration: none;
    position: relative;
}

.nav-links .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--clsc-light-blue);
    transition: width 0.3s ease;
}

.nav-links .nav-link:hover {
    color: var(--clsc-light-blue) !important;
}

.nav-links .nav-link:hover::after,
.nav-links .nav-link.active::after {
    width: 100%;
}

.nav-links .nav-link.active {
    color: var(--clsc-blue) !important;
    font-weight: 600;
}

/* Language Selector Styles */
.language-selector {
    position: relative;
}

.language-icon {
    transition: transform 0.3s ease;
}

#language-toggle:hover .language-icon {
    transform: scale(1.1);
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

#language-toggle:hover .dropdown-arrow {
    transform: translateY(2px);
}

.language-dropdown {
    min-width: 200px;
}

.language-option:hover {
    background-color: var(--clsc-light-blue) !important;
    color: white !important;
}

.mobile-language-option:hover {
    background-color: var(--clsc-light-blue) !important;
    color: white !important;
}


/* Mobile Menu Toggle Button */
#mobile-menu-toggle {
    border: none;
    background: transparent;
    cursor: pointer;
}

#mobile-menu-toggle:focus {
    outline: none;
    box-shadow: none;
}

.mobile-menu-icon {
    transition: transform 0.3s ease;
}

/* Mobile Menu Container */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    background: white;
    border-top: 1px solid #e5e7eb;
}

.mobile-menu.show {
    max-height: 500px;
}

.mobile-menu-list {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}

.mobile-menu-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #212529;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f3f4f6;
}

.mobile-menu-link:hover {
    background-color: #f8f9fa;
    color: var(--clsc-light-blue);
    padding-left: 1.5rem;
}

.mobile-menu-link.active {
    color: var(--clsc-blue);
    font-weight: 600;
    background-color: #e3f2fd;
}

/* Ensure navbar items are visible on desktop */
@media (min-width: 992px) {
    .nav-links {
        display: flex !important;
    }
    
    .mobile-menu {
        display: none !important;
    }
}

/* Logo */
.logo {
    height: 97.5px;
    width: auto;
    transition: height 0.3s ease;
    display: block;
    margin: 0.125rem 0;
}

@media (max-width: 768px) {
    .logo {
        height: 78px;
    }
}

.footer-logo {
    height: 180px;
    width: auto;
    filter: brightness(0) invert(1);
}

/* Phone Number Styling */
.phone-number-large {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .phone-number-large {
        font-size: 1.75rem;
    }
}

.call-now-box {
    background: linear-gradient(135deg, var(--clsc-blue) 0%, var(--clsc-light-blue) 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: white;
}

.call-now-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(30, 64, 175, 0.4);
}

.call-now-box * {
    color: white !important;
}

/* Hover Cards */
.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Icon Box */
.icon-box {
    background: #f8fafc;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.icon-box:hover {
    background: #f1f5f9;
}

.dark .icon-box {
    background: #1e293b;
}

.dark .icon-box:hover {
    background: #334155;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--clsc-blue) 0%, var(--clsc-light-blue) 100%);
}

/* Back to Top Button */
.btn-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.btn-floating.show {
    display: flex;
}

.btn-floating:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .btn-floating {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Dark Mode Styles */
.dark {
    background-color: var(--clsc-dark);
    color: #f8fafc;
}

.dark .navbar {
    background-color: #0f172a !important;
    border-bottom: 1px solid #334155;
}

.dark .nav-link {
    color: #cbd5e1 !important;
}

.dark .nav-link:hover,
.dark .nav-link.active {
    color: var(--clsc-light-blue) !important;
}

.dark .card {
    background-color: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}

.dark .bg-light {
    background-color: #0f172a !important;
}

.dark .text-muted {
    color: #94a3b8 !important;
}

.dark .list-group-item {
    background-color: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}

.dark footer {
    background-color: #0f172a !important;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Responsive Typography */
@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--clsc-light-blue);
    outline-offset: 2px;
}

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--clsc-blue);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 0;
}

/* Language Selector Dropdown - Removed since language selector was stripped from header */

/* ElevenLabs ConvAI Chat Widget */
elevenlabs-convai {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 9998 !important;
}

/* Ensure widget floats above most content but below loading spinner */
elevenlabs-convai * {
    z-index: 9998 !important;
}

/* Responsive positioning for mobile devices */
@media (max-width: 768px) {
    elevenlabs-convai {
        bottom: 15px !important;
        right: 15px !important;
    }
}

/* Print Styles */
@media print {
    .header-sticky,
    .btn-floating,
    #loading-spinner,
    elevenlabs-convai,
    footer {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
