/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    background-color: white;
}

/* Sticky Navigation */
.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.2rem 0;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-desktop {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-mobile {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

.logo-image {
    height: 3rem;
    width: auto;
    object-fit: contain;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
}

.logo-icon {
    height: 2.8rem;
    max-width: 4rem;
}

.logo-text {
    height: 2.8rem !important;
    max-width: 144px;
}

.logo-divider {
    width: 1px;
    height: 2.5rem;
    background-color: #1e3a8a;
    margin: 0 0.25rem;
}

.logo-subtext {
    height: 3.5rem;
    max-width: 150px;
}

.logo-mobile-icon {
    height: 2.5rem;
    max-width: 3rem;
}

.logo-mobile-text {
    height: 2.5rem;
    max-width: 120px;
}

.mobile-menu-header {
    display: flex;
    justify-content: center;
    padding: 0;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-menu-subtext {
    height: 4rem;
    max-width: 160px;
    object-fit: contain;
}

.logo-divider-mobile {
    width: 1px;
    height: 2rem;
    background-color: #1e3a8a;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    background: none;
    border: none;
    color: #1e3a8a;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
    font-size: 1.125rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #172554;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #172554;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Navigation */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #1e3a8a;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background-color: #eff6ff;
    color: #172554;
}

.mobile-menu {
    display: none;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    padding: 0.25rem 0;
}

.mobile-menu.active {
    display: block;
}

@media (max-width: 767px) {
    .mobile-menu.active ~ .nav-content .logo-divider-mobile {
        display: none !important;
    }
}

.mobile-menu .nav-link {
    display: block;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-radius: 0.375rem;
    font-size: 1.125rem;
    text-align: left;
}

.mobile-menu .nav-link:hover {
    background-color: #eff6ff;
}

.mobile-menu .nav-link::after {
    display: none;
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, rgba(30,58,138,0.4) 0%, rgba(30,64,175,0.7) 25%, rgba(29,78,216,0.95) 50%, rgba(30,64,175,0.7) 75%, rgba(30,58,138,0.4) 100%), url('/images/car-in-rain.png') center center/cover no-repeat;
    background-blend-mode: multiply;
    overflow: hidden;
    padding-top: 9rem;
    padding-bottom: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 35vh;
}

/* Add a loading state for the background image */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30,58,138,0.95) 0%, rgba(30,64,175,0.95) 50%, rgba(29,78,216,0.95) 100%);
    z-index: 1;
    transition: opacity 0.3s ease;
    opacity: 0; /* Start transparent */
}

/* Only show overlay if image fails to load */
.hero-section.error::before {
    opacity: 1;
}

.hero-background {
    position: absolute;
    inset: 0;
    opacity: 0.1;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
    transform: skewY(-12deg);
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: 0 2rem;
    width: 100%;
    height: 100%;
}

.hero-text {
    text-align: center;
    max-width: 64rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.hero-row {
    color: #ffeec9;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,0.45), 0 1px 1px rgba(0,0,0,0.25);
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 1.2s ease-out forwards;
}

.hero-row-1 {
    font-family: 'Quattrocento', serif;
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
    line-height: 1;
    animation-delay: 0.1s;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.7), 0 8px 16px rgba(0, 0, 0, 0.5);
}

.hero-row-2 {
    font-family: 'Quattrocento', serif;
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0;
    line-height: 1;
    animation-delay: 0.2s;
    text-shadow: 0 6px 12px rgba(0, 0, 0, 0.8), 0 12px 24px rgba(0, 0, 0, 0.6);
}

.hero-row-3 {
    font-family: 'Raleway', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0 0 0.1em 0;
    line-height: 1.2;
    animation-delay: 0.3s;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7), 0 4px 8px rgba(0, 0, 0, 0.5);
}

.hero-row-4 {
    font-family: 'Raleway', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    margin: 0;
    line-height: 1.3;
    animation-delay: 0.4s;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), 0 4px 6px rgba(0, 0, 0, 0.4);
}

.hero-office {
    font-family: 'Georgia', 'Times New Roman', Times, serif;
    font-size: 2rem;
    font-weight: 400;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.hero-name {
    font-family: 'Georgia', 'Times New Roman', Times, serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffd166;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.hero-role {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffd166;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.hero-address {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    font-size: 1rem;
    font-style: italic;
    color: #fff;
    opacity: 0.9;
    margin-bottom: 0;
}

/* About Section */
.about-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, #f8fafc 0%, white 100%);
}

.about-container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: left;
}

.about-title {
    font-family: 'Quattrocento', serif;
    font-size: 2.5rem;
    font-weight: bold;
    color: #1e3a8a;
    margin-bottom: 2rem;
    text-align: left;
}

.about-description {
    font-family: 'Raleway', sans-serif;
    font-size: 1.25rem;
    color: #334155;
    line-height: 1.75;
    text-align: left;
    max-width: 64rem;
    margin: 0 0 2.5rem 0;
}

.about-intro {
    margin-bottom: 2.5rem;
}

.about-card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2rem;
    border: 1px solid #e2e8f0;
}

/* Team Section */
.team-section {
    position: relative;
    padding: 3rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.team-section.animate {
    opacity: 1;
    transform: translateY(0);
}

.team-section::before {
    content: '';
    position: absolute;
    top: 13%;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffeec9;
    z-index: -1;
}

.team-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 2rem;
}

.team-title {
    font-family: 'Quattrocento', serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: #1e3a8a;
    margin-bottom: 3rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.team-title::before,
.team-title::after {
    content: '';
    height: 2px;
    background: linear-gradient(90deg, transparent, #1e3a8a, transparent);
    flex: 1;
    max-width: 150px;
    border-radius: 1px;
}

.team-title::before {
    background: linear-gradient(90deg, transparent, #1e3a8a);
}

.team-title::after {
    background: linear-gradient(90deg, #1e3a8a, transparent);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Team Member Wrapper */
.team-member-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.team-section.animate .team-member-wrapper {
    opacity: 1;
    transform: translateY(0);
}

.team-member {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    width: 100%;
}

.team-member:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(-0.25rem);
}

.member-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/5;
}

.image-loading-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.image-loading-placeholder.loaded {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e0e0e0;
    border-top: 3px solid #2c3e50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.member-image {
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-member:hover .member-image {
    transform: scale(1.05);
}

.member-image-container.loaded .member-image {
    opacity: 1;
}

/* Image Error Fallback */
.member-image.error {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.member-image.error::before {
    content: "👤";
    font-size: 48px;
}

/* Progressive Image Loading */
.member-image-container {
    background: #f8f9fa;
    transition: background-color 0.3s ease;
}

.member-image-container.loaded {
    background: transparent;
}

/* Loading Performance Optimizations */
.team-grid {
    contain: layout style paint;
}

.member-image {
    will-change: opacity;
    backface-visibility: hidden;
}

/* Responsive Image Loading */
@media (max-width: 768px) {
    .loading-spinner {
        width: 24px;
        height: 24px;
        border-width: 2px;
    }
    
    .loading-text {
        font-size: 10px;
    }
}

/* High DPI Display Optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .member-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

.member-name-container {
    text-align: center;
    margin-bottom: 1.5rem;
    width: 100%;
}

.member-name {
    font-weight: 600;
    color: #1e3a8a;
    margin: 0;
    font-size: 1.1rem;
}

.member-name.placeholder {
    color: #1e3a8a;
}

/* Team Member Overlay */
.member-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 58, 138, 0.92);
    color: #fffbe9;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.team-member:hover .member-overlay {
    opacity: 1;
    pointer-events: auto;
}

.overlay-content {
    text-align: left;
    padding: 0.75rem 0.25rem;
    width: 100%;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.overlay-bio {
    color: #ffe066;
    font-size: 0.75rem;
    line-height: 1.3;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.overlay-links {
    margin-top: auto;
}

.overlay-link {
    color: #ffe066;
    font-size: 0.75rem;
    text-decoration: underline;
    word-break: break-all;
    display: block;
    margin: 0.5rem 0;
    transition: color 0.2s;
    line-height: 1.3;
}

.overlay-link:hover {
    color: #fff;
    text-decoration: underline;
}

.email-link::before {
    content: "✉ ";
    font-size: 0.8rem;
}

.phone-link::before {
    content: "☎ ";
    font-size: 0.8rem;
}

/* Footer */
.footer {
    background-color: #0f172a;
    color: white;
    padding: 3rem 0;
}

.footer-container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-copyright {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-address {
    color: #cbd5e1;
}

.footer-address p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 767px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-container {
        padding: 0 0.75rem;
    }
    
    .nav-content {
        padding: 0.5rem 0;
    }
    
    .nav-logo {
        display: flex;
        align-items: center;
    }
    
    .logo-desktop {
        display: none;
    }
    
    .logo-mobile {
        display: flex;
    }
    
    .logo-image {
        height: 2.5rem;
        max-width: 150px;
    }
    
    .hero-section {
        padding-top: 6rem;
        padding-bottom: 3rem;
        min-height: 25vh;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-row-1 {
        font-size: 2rem;
    }
    
    .hero-row-2 {
        font-size: 2.5rem;
    }
    
    .hero-row-3 {
        font-size: 1rem;
    }
    
    .hero-row-4 {
        font-size: 1.1rem;
    }
    
    .hero-office {
        font-size: 1.75rem;
    }
    
    .hero-name {
        font-size: 2.25rem;
    }
    
    .hero-role {
        font-size: 1rem;
    }
    
    .hero-address {
        font-size: 0.9rem;
    }
    
    .about-section {
        padding: 3rem 0;
    }
    
    .about-container {
        padding: 0 1rem;
    }
    
    .about-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    .about-description {
        font-size: 1rem;
    }
    
    .about-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
        border-radius: 0.75rem;
    }
    
    .team-section {
        padding: 3rem 0;
    }
    
    .team-section::before {
        top: 3%;
    }
    
    .team-container {
        padding: 0 1rem;
    }
    
    .team-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
        gap: 1rem;
    }
    
    .team-title::before,
    .team-title::after {
        max-width: 80px;
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .footer {
        padding: 2rem 0;
    }
    
    .footer-container {
        padding: 0 1rem;
    }
    
    .footer-copyright {
        font-size: 1rem;
    }
    
    .footer-address p {
        font-size: 0.9rem;
    }
}

@media (min-width: 768px) {
    .hero-row-1 {
        font-size: 3rem;
    }
    .hero-row-2 {
        font-size: 4.5rem;
    }
    .hero-row-3 {
        font-size: 1.25rem;
    }
    .hero-row-4 {
        font-size: 1.4rem;
    }
    .hero-office {
        font-size: 2.5rem;
    }
    .hero-name {
        font-size: 3.5rem;
    }
    .hero-role {
        font-size: 1.25rem;
    }
    .hero-address {
        font-size: 1.1rem;
    }
    
    .about-title {
        font-size: 3rem;
    }
    
    .about-description {
        font-size: 1.25rem;
    }
    
    .about-card {
        padding: 3rem;
    }
    
    .team-title {
        font-size: 3rem;
    }
    
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1280px) {
    .team-grid {
        grid-template-columns: repeat(7, 1fr);
    }
}

/* JavaScript functionality for smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Member icons in bottom right */
.member-icons {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    display: none;
    gap: 0.4rem;
    z-index: 3;
}
.icon-link {
    background: rgba(30,58,138,0.85);
    color: #ffe066;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    transition: background 0.2s, color 0.2s;
}
.icon-link:hover:not(.info-button) {
    background: #ffe066;
    color: #1e3a8a;
}
.icon-mail, .icon-phone {
    pointer-events: none;
}

.icon-info {
    font-size: 14px;
    color: #ffe066;
}

/* Show icons on mobile devices */
@media (max-width: 767px) {
    .member-icons {
        display: flex !important;
    }
    
    /* Ensure team section and members are always visible on mobile */
    .team-section {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
    
    .team-member-wrapper {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

/* Modal for team member info */
.team-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.team-modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease-out;
}

.team-modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.team-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #1e3a8a;
}

.team-modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1e3a8a;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: #f3f4f6;
    color: #1e3a8a;
}

.team-modal-bio {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.team-modal-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.team-modal-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #1e3a8a;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.team-modal-link:hover {
    background: #172554;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.team-modal-link i {
    font-size: 1.1rem;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Hide desktop overlay on mobile */
@media (max-width: 767px) {
    .member-overlay {
        display: none;
    }
    
    .info-button {
        display: flex;
    }
}

@media (min-width: 768px) {
    .team-modal {
        display: none;
    }
    
    .info-button {
        display: none;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Extra small screens - keep hero text on one line */
@media (max-width: 436px) {
    .hero-row-1 {
        font-size: 1.5rem;
    }
    
    .hero-row-2 {
        font-size: 1.8rem;
    }
    
    .hero-row-3 {
        font-size: 0.9rem;
    }
    
    .hero-row-4 {
        font-size: 0.95rem;
    }
    
    .hero-content {
        padding: 0 0.5rem;
    }
}

@media (min-width: 768px) {
} 