/* ===== CSS VARIABLES ===== */
:root {
    /* Premium Blue Color Palette - Streamlined & Professional */
    --c-deep: #0a1428;           /* Deepest navy - for backgrounds */
    --c-navy: #1e293b;           /* Rich navy - primary dark */
    --c-teal: #0891b2;           /* Premium teal - primary accent */
    --c-blue-light: #1e40af;     /* Royal blue - secondary accent */
    --c-blue-medium: #3b82f6;    /* Bright blue - highlights */
    --c-blue-dark: #1e3a8a;      /* Deep blue - depth */
    
    /* Neutral Palette */
    --white: #FFFFFF;
    --light-gray: #f8fafc;
    --medium-gray: #94a3b8;
    --dark-gray: #475569;
    --black: #000000;
    
    /* Legacy Support */
    --green: var(--c-teal);
    
    /* Typography System - Professional Landing Page */
    --font-size-xs: 0.8125rem;    /* ~13px */
    --font-size-sm: 0.9375rem;    /* ~15px */
    --font-size-base: 1.05rem;    /* ~16.8px */
    --font-size-lg: 1.125rem;     /* 18px */
    --font-size-xl: 1.35rem;      /* ~21.6px */
    --font-size-2xl: 1.8rem;      /* 28.8px */
    --font-size-3xl: 2.25rem;     /* 36px */
    --font-size-4xl: 2.7rem;      /* 43.2px */
    --font-size-5xl: 2.9rem;      /* 46.4px */
    
    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.7;
    --line-height-loose: 1.9;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* ===== BACKGROUND ===== */
.bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    background: linear-gradient(135deg, var(--c-deep) 0%, var(--c-navy) 50%, var(--c-blue-light) 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Dots overlay limited to top/bottom bands via mask */
.bg-dots {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0 1px, transparent 1.2px);
    background-size: 22px 22px;
    opacity: 0.9;
    transform: rotate(-12deg);
    /* Show only in top ~30% and bottom ~28% (tweak stops to taste) */
    -webkit-mask:
        linear-gradient(to bottom, black 0%, black 30%, transparent 48%),
        linear-gradient(to top, black 0%, black 28%, transparent 50%);
    mask:
        linear-gradient(to bottom, black 0%, black 30%, transparent 48%),
        linear-gradient(to top, black 0%, black 28%, transparent 50%);
}

/* Graceful fallback where mask isn't supported: soften dots in the centre */
@supports not ((-webkit-mask: none) or (mask: none)) {
    .bg-dots {
        background-image:
            radial-gradient(circle, rgba(74, 144, 226, 0.35) 0 1px, transparent 1.2px),
            /* centre fade reduces dot visibility */
            linear-gradient(to bottom, rgba(4, 26, 51, 0) 20%, rgba(4, 26, 51, 0.85) 55%, rgba(4, 26, 51, 0) 80%);
        background-size: 22px 22px, 100% 100%;
        background-blend-mode: normal, multiply;
        opacity: 0.8;
    }
}

/* ===== HERO SECTION ===== */
.contact-hero {
    background: rgba(4, 26, 51, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: var(--white);
    padding: 8rem 0 4rem;
    text-align: center;
}

.contact-hero h1 {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: 1rem;
    line-height: var(--line-height-tight);
}

.contact-hero p {
    font-size: var(--font-size-lg);
    color: var(--light-gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: var(--line-height-relaxed);
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    padding: 5rem 0;
    background: #f8fafc;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info {
    padding: 2rem;
}

.contact-info h2 {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--c-deep);
    margin-bottom: 2rem;
    line-height: var(--line-height-tight);
}

.contact-method {
    margin-bottom: 2.5rem;
}

.contact-method h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--c-deep);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-method h3 i {
    color: var(--c-deep);
    font-size: 1.2rem;
}

.contact-method strong {
    color: var(--c-deep);
}

.contact-link i {
    color: var(--c-deep);
}

.contact-method p {
    color: var(--dark-gray);
    margin-bottom: 1rem;
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
}

.contact-link {
    color: var(--c-teal);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.contact-link:hover {
    color: var(--c-teal);
    transform: translateX(5px);
}

.contact-link i {
    font-size: 0.9rem;
    color: var(--c-teal);
}

/* ===== CONSULTATION SECTION ===== */
.consultation-section {
    background: #ffffff;
    border: 1px solid #d1d5db;
    padding: 2rem;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.consultation-section h2 {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--c-deep);
    margin-bottom: 2rem;
    line-height: var(--line-height-tight);
}

.calendar-section h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--c-deep);
    margin-bottom: 1.5rem;
}

/* ===== MAP SECTION ===== */
.map-section {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.map-container {
    height: 400px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-placeholder {
    text-align: center;
    color: var(--medium-gray);
}

.map-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--c-deep);
}

.map-placeholder p {
    color: var(--light-gray);
}

.map-info {
    padding: 1.5rem;
    background: #ffffff;
}

.map-info h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--c-deep);
    margin-bottom: 0.5rem;
}

.map-info p {
    color: var(--dark-gray);
    margin-bottom: 1rem;
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
}

.map-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.map-link {
    color: var(--c-deep);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.map-link:hover {
    color: var(--c-deep);
}

.btn-directions {
    background: linear-gradient(135deg, var(--c-deep) 0%, var(--c-navy) 100%);
    border: 2px solid var(--c-deep);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(10, 20, 40, 0.12);
}

.btn-directions:hover {
    background: linear-gradient(135deg, var(--c-navy) 0%, var(--c-deep) 100%);
    border-color: var(--c-navy);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(10, 20, 40, 0.4);
}

/* ===== MODAL STYLES ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Custom modal content for CV modal (still uses modal-overlay) */
.modal-overlay .modal-content {
    background: white;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    /* Align width with Bootstrap modal-xl used elsewhere */
    max-width: 1140px;
    width: min(95vw, 1140px);
    margin: 1rem;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
}

/* Bootstrap modal content for CV modal only (not contact form modal) */
#cv-modal .modal-content {
    background: white;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
}

/* Contact form modal uses shared fullscreen styles from shared-styles.css */
/* No additional overrides needed - shared-styles.css handles fullscreen layout */

/* Force Nunito Sans on all modal descendants to override any external styles */
.modal-content *,
.modal-header *,
.modal-body *,
.modal-footer * {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
}

/* Dark modal variant to ensure legibility on dark backgrounds */
.dark-modal {
    background: linear-gradient(135deg, var(--c-deep) 0%, var(--c-navy) 100%);
    color: var(--white);
}
.dark-modal .modal-header,
.dark-modal .modal-body,
.dark-modal .modal-footer {
    border-color: rgba(255, 255, 255, 0.12);
}
.dark-modal .modal-header h3,
.dark-modal .modal-body p,
.dark-modal .form-label {
    color: var(--white) !important;
}
.dark-modal a { color: var(--white); }
.dark-modal a:hover { color: var(--white); opacity: 0.9; }
.dark-modal i { color: var(--white); }
/* Keep inputs readable on dark modal */
.dark-modal .form-control,
.dark-modal select,
.dark-modal textarea {
    background: #ffffff;
    color: #111827;
    border-color: #d1d5db;
}
.dark-modal .form-control::placeholder { color: #6b7280; }

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Dark header variant for select modals */
.modal-header.dark-header {
    background: linear-gradient(135deg, var(--c-deep) 0%, var(--c-navy) 100%);
    color: var(--white);
    border-bottom-color: rgba(255, 255, 255, 0.2);
}
.modal-header.dark-header h3 { color: var(--white); }
.modal-header.dark-header .modal-close { color: var(--white); }
.modal-header.dark-header .modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
}

.modal-header h3 {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Ensure close button aligns and sizes correctly in headers */
.modal-header .modal-close {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.modal-header .modal-close i {
    font-size: 1rem;
    line-height: 1;
    color: inherit;
}
/* Support non-icon classic X */
.modal-header .modal-close .close-x {
    font-size: 1rem;
    line-height: 1;
    color: inherit;
    font-weight: 700;
}

.modal-body {
    padding: 1.5rem 2rem;
}

.modal-body p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 1rem;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-footer {
    padding: 1rem 2rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: right;
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: #374151;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0;
    padding: 0.75rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
    font-family: 'Nunito Sans', sans-serif;
}

.form-control:focus {
    border-color: var(--c-deep);
    box-shadow: 0 0 0 3px rgba(10, 20, 40, 0.1);
    outline: none;
}

.form-control.textarea {
    min-height: 120px;
    resize: vertical;
}

.btn-modal-submit {
    background: rgba(4, 26, 51, 0.8);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-modal-submit:hover {
    background: var(--c-navy);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    color: var(--white);
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 0.8s ease forwards;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 0.8s ease forwards;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .contact-hero h1 {
        font-size: 2rem;
    }

    .contact-hero p {
        font-size: 1rem;
    }

    .contact-info h2,
    .consultation-section h2 {
        font-size: 2rem;
    }

    .calendar {
        padding: 1rem;
    }

    .calendar-day {
        padding: 0.5rem 0.25rem;
        font-size: 0.9rem;
    }

    .map-container {
        height: 300px;
    }

    .footer-section {
        padding: 3rem 0 1.5rem;
    }

    .footer-content h5 {
        margin-top: 2rem;
    }

    .footer-bottom {
        text-align: center;
    }

    .social-links {
        justify-content: center;
        margin-top: 1rem;
    }
}
