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

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover and touch effects */
.btn, .service-card, .about-card, .support-card {
    transition: all 0.3s ease;
}
.btn:hover, .btn:active {
    transform: translateY(-2px) scale(0.95);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.service-card:hover, .service-card:active,
.about-card:hover, .about-card:active,
.support-card:hover, .support-card:active {
    transform: translateY(-5px);
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

/* Member image */
.member-image {
    max-width: 50%;
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.member-image:hover, .member-image:active {
    transform: scale(1.05);
}
@media (max-width: 640px) {
    .member-image {
        max-width: 100%;
    }
}

/* Navbar logo */
.navbar-logo {
    width: 140px;
    height: 37.5px;
    object-fit: contain;
}
@media (min-width: 640px) {
    .navbar-logo {
        width: 234.375px;
        height: 62.5px;
    }
}

/* Navbar styling - Desktop */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

@media (min-width: 640px) {
    .navbar {
        padding: 1.5rem 0;
    }
}

/* Condensed navbar when scrolling - Desktop */
.navbar.condensed {
    padding: 0.75rem 0 !important;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.navbar.condensed .navbar-logo {
    width: 100px;
    height: 26.8px;
    transition: all 0.3s ease;
}

@media (min-width: 640px) {
    .navbar.condensed {
        padding: 1rem 0 !important;
    }
    
    .navbar.condensed .navbar-logo {
        width: 167.5px;
        height: 44.6px;
    }
}

/* Fixed navbar container - Desktop */
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.navbar-link {
    position: relative;
    padding-bottom: 0.25rem;
    transition: color 0.3s ease;
}
.navbar-link:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #2563eb;
}

/* Hamburger menu fixes */
.menu-toggle {
    display: none;
}

/* Mobile Navbar - Always Condensed Style */
@media (max-width: 639px) {
    .navbar {
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
        padding: 0.5rem 0;
        transition: all 0.3s ease;
    }
    
    .navbar.condensed {
        /* Same as default on mobile - no change when scrolling */
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
        padding: 0.5rem 0;
    }
    
    .navbar .container {
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        padding: 0 1rem;
    }
    
    .navbar-logo {
        width: 120px !important;
        height: 32px !important;
        transition: all 0.3s ease;
    }
    
    .navbar.condensed .navbar-logo {
        width: 120px !important;
        height: 32px !important;
    }
    
    /* Hamburger menu positioning */
    .menu-toggle + label {
        display: block !important;
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: #374151;
        font-size: 1.5rem;
        z-index: 60;
        cursor: pointer;
    }
    
    /* Full screen mobile menu */
    .menu {
        position: fixed !important;
        top: 0;
        left: -100%;
        width: 100vw;
        height: 100vh;
        background: white;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.3s ease;
        z-index: 55;
        gap: 2rem;
        box-shadow: none;
    }
    
    .menu-toggle:checked ~ .menu {
        left: 0 !important;
        display: flex !important;
    }
    
    .menu a {
        font-size: 1.25rem !important;
        padding: 1rem 2rem !important;
        border-bottom: 1px solid #e5e7eb !important;
        width: 80%;
        text-align: center !important;
        color: #4b5563 !important;
        border-radius: 0;
        background: none !important;
    }
    
    .menu a:hover, .menu a:active {
        background: #f3f4f6 !important;
        color: #2563eb !important;
    }
    
    .phone-link {
        background: #3b82f6 !important;
        color: white !important;
        border-radius: 50px !important;
        border: none !important;
        margin-top: 1rem;
    }
    
    .phone-link:hover, .phone-link:active {
        background: #2563eb !important;
        color: white !important;
    }
}

/* Desktop menu styling */
@media (min-width: 640px) {
    .navbar .container {
        display: flex;
        align-items: center;
        justify-content: space-between !important;
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1rem;
    }
    
    .menu {
        display: flex !important;
        align-items: center;
        gap: 1.5rem;
        position: static !important;
        background: none !important;
        box-shadow: none !important;
        width: auto !important;
        height: auto !important;
    }
    
    .menu a {
        display: inline-block !important;
        padding: 0 !important;
        text-align: left !important;
        color: #4b5563 !important;
        border: none !important;
        width: auto !important;
        font-size: 1rem !important;
    }
    
    .menu a:hover, .menu a:active {
        background: none !important;
        color: #2563eb !important;
    }
    
    /* Hide hamburger on desktop */
    .menu-toggle + label {
        display: none !important;
    }
}

/* Hero section */
.hero {
    position: relative;
    background: radial-gradient(circle at 50% 50%, #1e3a8a, #3b82f6, #5b21b6, #0891b2, #1e3a8a);
    background-size: 200% 200%;
    animation: gradientShift 25s ease infinite;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15) 50%,
        transparent
    );
    animation: shimmer 6s ease-in-out infinite;
    pointer-events: none;
}

/* Responsive font sizes */
h1, h2, h3 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
}
.hero h1 {
    font-size: clamp(2rem, 6vw, 3rem);
}
.hero p {
    font-size: clamp(1rem, 3.5vw, 1.5rem);
}
@media (max-width: 640px) {
    h2 {
        font-size: clamp(1.5rem, 5vw, 2.25rem);
    }
    h3 {
        font-size: clamp(1.25rem, 4vw, 1.75rem);
    }
    .hero h1 {
        font-size: clamp(1.75rem, 5.5vw, 2.5rem);
    }
    .hero p {
        font-size: clamp(1rem, 3.5vw, 1.25rem);
    }
}
@media (max-width: 400px) {
    h2 {
        font-size: clamp(1.25rem, 4.5vw, 2rem);
    }
    h3 {
        font-size: clamp(1rem, 3.5vw, 1.5rem);
    }
    .hero h1 {
        font-size: clamp(1.5rem, 5vw, 2.25rem);
    }
    .hero p {
        font-size: clamp(0.875rem, 3vw, 1.125rem);
    }
}

/* Animations */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes shimmer {
    0% { transform: translateX(0); }
    50% { transform: translateX(200%); }
    100% { transform: translateX(400%); }
}

/* Card styling */
.about-card, .support-card, .service-card {
    background-color: #f9fafb;
}

/* Phone link */
.phone-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}
.phone-link:hover, .phone-link:active {
    color: #2563eb;
}

/* Asterisk link */
.asterisk-link {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Password overlay */
#password-overlay {
    z-index: 1000;
}
#password-input {
    transition: border-color 0.3s ease;
}
#password-input:focus {
    border-color: #2563eb;
    outline: none;
}

/* Improved Logo Scroll - Fixed Animation */
.logo-scroll-container {
    margin: 1rem 0;
    overflow: hidden;
    position: relative;
}

.logo-scroll {
    display: flex;
    animation: scrollInfinite 20s linear infinite;
    width: calc(30vw * 10 + 60rem);
}

.logo-scroll img {
    min-width: 30vw;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    padding: 0 6rem;
    flex-shrink: 0;
    box-sizing: border-box;
}

@keyframes scrollInfinite {
    0% { 
        transform: translateX(0); 
    }
    100% { 
        transform: translateX(calc(-30vw * 5 - 30rem)); 
    }
}

/* Mobile carousel fixes */
@media (max-width: 640px) {
    .logo-scroll {
        animation: scrollInfiniteMobile 15s linear infinite;
        width: calc(45vw * 10 + 40rem);
    }
    
    .logo-scroll img {
        max-height: 100px;
        min-width: 45vw;
        padding: 0 4rem;
    }
    
    @keyframes scrollInfiniteMobile {
        0% { 
            transform: translateX(0); 
        }
        100% { 
            transform: translateX(calc(-45vw * 5 - 20rem)); 
        }
    }
}

@media (max-width: 480px) {
    .logo-scroll {
        animation: scrollInfiniteSmall 12s linear infinite;
        width: calc(60vw * 10 + 30rem);
    }
    
    .logo-scroll img {
        max-height: 80px;
        min-width: 60vw;
        padding: 0 3rem;
    }
    
    @keyframes scrollInfiniteSmall {
        0% { 
            transform: translateX(0); 
        }
        100% { 
            transform: translateX(calc(-60vw * 5 - 15rem)); 
        }
    }
}

img {
    user-drag: none;
    -webkit-user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

/* Active/current page styling */
.navbar-link.active {
    font-weight: bold;
    text-decoration: underline;
    color: #2563eb;
}

.navbar-link.active:hover::after {
    display: none;
}
