/* ================================
   CSS VARIABLES & RESET
   ================================ */
:root {
    --coral: #D4A574;
    --coral-hover: #C49564;
    --dark-green: #2C3E2D;
    --light-bg: #F8F6F3;
    --text-gray: #6B7280;
    
    /* Typography */
    --font-heading: 'Crimson Text', serif;
    --font-body: 'Pontano Sans', sans-serif;
    
    /* Spacing */
    --section-padding: 5rem 3rem;
    --section-padding-mobile: 3rem 1rem;
    
    /* Transitions */
    --transition-smooth: all 0.3s ease;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--dark-green);
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading) !important;
    font-weight: normal;
}

/* ================================
   LAYOUT COMPONENTS
   ================================ */
.section {
    padding: var(--section-padding);
}

/* Navbar is now absolute positioned, no extra padding needed */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ================================
   HERO SECTION
   ================================ */
.hero {
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: white;
    position: relative;
    overflow: hidden;
}

/* Hero Background Images - Responsive Loading */
.hero.home {
    background: 
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        url('../images/hero-home.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: 0;
    position: relative;
}

/* WebP support for better performance */
@supports (background-image: url('data:image/webp;base64,UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==')) {
    .hero.home {
        background-image: 
            linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
            url('../images/hero-home.webp');
    }
}

.hero.services {
    background: 
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        url('../images/hero-services.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: 0;
    position: relative;
}

@supports (background-image: url('data:image/webp;base64,UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==')) {
    .hero.services {
        background-image: 
            linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
            url('../images/hero-services.webp');
    }
}

.hero.team {
    background: 
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        url('../images/hero-about.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: 0;
    position: relative;
}

@supports (background-image: url('data:image/webp;base64,UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==')) {
    .hero.team {
        background-image: 
            linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
            url('../images/hero-about.webp');
    }
}

/* Hero Content Styles */
.hero-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 800px;
    margin: 0 auto;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin: 0;
    font-weight: normal;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Image optimization - prevent layout shift */
img {
    max-width: 100%;
    height: auto;
    /* Optimize image rendering */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
    /* Prevent layout shifts */
    display: block;
}

/* Ensure consistent aspect ratios */
.member-photo {
    aspect-ratio: 1;
    overflow: hidden;
    width: 100%;
    max-width: 300px;
    height: auto;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1;
}

/* Lazy loaded images */
img[loading="lazy"] {
    /* Add a subtle fade-in effect for lazy loaded images */
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

/* Only apply fade effect if JavaScript is enabled */
.js img[loading="lazy"] {
    opacity: 0;
}

.js img[loading="lazy"].loaded {
    opacity: 1;
}

/* Prevent layout shifts with consistent sizing */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-member {
    text-align: center;
    min-height: 350px; /* Prevent content jumping */
}

.approach-section,
.section {
    min-height: 300px; /* Prevent content jumping during load */
}

/* Map placeholder styles */
.map-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--light-bg) 0%, #f0f0f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.map-placeholder:hover {
    border-color: var(--coral);
    background: linear-gradient(135deg, #f8f8f8 0%, var(--light-bg) 100%);
}

.map-placeholder-content {
    text-align: center;
    color: var(--dark-green);
}

.map-placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.map-placeholder-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.map-placeholder-content p {
    margin: 0 0 1rem 0;
    color: var(--text-gray);
}

.map-load-button {
    background: var(--coral);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.map-load-button:hover {
    background: var(--coral-hover);
}

.map-loading, .map-error {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: var(--dark-green);
}

.map-error {
    color: #d32f2f;
}

/* Mobile optimizations - smaller images for mobile */
@media (max-width: 768px) {
    .hero.home,
    .hero.services,
    .hero.team {
        /* Use CSS fallback gradients on mobile to reduce image load */
        background: linear-gradient(135deg, #6B8E6B 0%, #4A6B4A 50%, #2C3E2D 100%);
    }
    
    /* Reduce hero height on mobile for faster perception */
    .hero {
        min-height: 70vh;
    }
    
    .team-member {
        min-height: 280px;
    }
    
    .member-photo {
        max-width: 200px;
        margin: 0 auto;
    }
}

/* Hero Fallback - temporarily removed to debug background images */
/* .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #6B8E6B 0%, #4A6B4A 50%, #2C3E2D 100%);
    z-index: -2;
} */

.hero-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 3rem;
}

.hero-text {
    max-width: 800px;
}

.hero-text h1 {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 2rem;
}

/* ================================
   NAVIGATION
   ================================ */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    border: none !important;
    box-shadow: none !important;
    transition: background-color 0.3s ease;
}

.logo {
    display: block;
    text-decoration: none;
}

.logo-image {
    height: 80px;
    width: auto;
    max-width: 250px;
    transition: var(--transition-smooth);
}

.logo:hover .logo-image {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: opacity 0.3s;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.nav-links a:hover {
    opacity: 0.8;
}

/* ================================
   SCROLL INDICATOR
   ================================ */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
    cursor: pointer;
}

.scroll-arrow {
    width: 2rem;
    height: 2rem;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
    margin: 0 auto 0.5rem;
    animation: bounce 2s infinite;
}

.scroll-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) rotate(45deg);
    }
    40% {
        transform: translateY(-10px) rotate(45deg);
    }
    60% {
        transform: translateY(-5px) rotate(45deg);
    }
}

/* ================================
   BUTTONS & INTERACTIVE ELEMENTS
   ================================ */
.primary-btn, .secondary-btn, .cta-button, .learn-more-btn, .learn-more-link {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
    display: inline-block;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.primary-btn, .cta-button, .learn-more-btn, .learn-more-link {
    background: var(--coral);
    color: white !important;
}

.primary-btn:hover, .cta-button:hover, .learn-more-btn:hover, .learn-more-link:hover {
    background: var(--coral-hover);
    color: white !important;
}

.secondary-btn {
    background-color: transparent;
    color: var(--dark-green) !important;
    border: 2px solid var(--dark-green);
}

.secondary-btn:hover {
    background-color: var(--dark-green);
    color: white !important;
}

/* Enhanced button styles */
.cta-button {
    padding: 1rem 2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.learn-more-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.learn-more-link {
    margin-top: 1rem;
}

/* ================================
   CONTENT SECTIONS
   ================================ */
.approach-section {
    background: var(--light-bg);
    text-align: center;
}

.approach-section h2 {
    font-size: 3rem;
    margin-bottom: 3rem;
    color: var(--dark-green);
}

.approach-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 3rem;
}

/* Safe Space Section */
.safe-space {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.space-image {
    background: linear-gradient(45deg, #a8b5a8, #c8d5c8);
    height: 400px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.space-image::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    right: 20%;
    bottom: 20%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.space-content h2 {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 2rem;
    color: var(--dark-green);
}

.space-content p {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--text-gray);
}

/* ================================
   TEAM SECTIONS
   ================================ */
.team-section {
    background: var(--light-bg);
    text-align: center;
}

.team-section h2 {
    font-size: 3rem;
    margin-bottom: 4rem;
    color: var(--dark-green);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.team-member {
    text-align: center;
}

.member-photo {
    width: 280px;
    height: 350px;
    margin: 0 auto 1.5rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #a8b5a8, #d8e5d8);
    position: relative;
    overflow: hidden;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-photo::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 25%;
    right: 25%;
    bottom: 25%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

/* Hide the decorative overlay when there's an actual image */
.member-photo:has(img)::after {
    display: none;
}

.member-name {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--dark-green);
    font-weight: bold;
    margin: 0;
}

.team-member-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.team-member-link:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-3px);
}

.team-member-link:hover .member-name {
    color: var(--coral);
}

/* Team Member Profiles (About Page) */
.team-member-profile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 6rem;
    align-items: center;
}

.team-member-profile:last-child {
    margin-bottom: 0;
}

.profile-image {
    height: 450px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(45deg, #a8b5a8, #c8d5c8);
    position: relative;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Profile backgrounds */
.profile-image.bg-coral { background: linear-gradient(45deg, #D4A574, #E5B485); }
.profile-image.bg-sage { background: linear-gradient(45deg, #8CA58F, #9DB5A0); }
.profile-image.bg-forest { background: linear-gradient(45deg, #2C3E2D, #3D4F3E); }
.profile-image.bg-sand { background: linear-gradient(45deg, #D8CFC0, #E9E0D1); }

.profile-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.profile-content {
    text-align: left;
}

.profile-content h2 {
    font-size: 2.5rem;
    margin: 1rem 0 0.25rem 0;
    text-align: left;
}

.position {
    color: var(--coral);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
}

.specialties {
    color: var(--coral);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0 0 1.5rem 0;
    position: relative;
}

.specialties::before {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--coral);
    margin-bottom: 0.5rem;
}

.profile-content p, .profile-content .bio p {
    color: var(--text-gray);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.profile-content .bio {
    margin-bottom: 2rem;
}

.social-links {
    font-size: 1rem;
}

.social-links a {
    color: var(--dark-green);
    text-decoration: none;
    font-weight: 500;
}

.social-links a:hover {
    text-decoration: underline;
}

/* ================================
   SERVICES SECTIONS
   ================================ */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.service-item {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-icon {
    margin-bottom: 1rem;
    color: var(--coral);
}

.service-item h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--dark-green);
}

.services-offerings {
    background-color: var(--light-bg);
}

.services-offerings h2 {
    font-size: 3rem;
    margin-bottom: 3rem;
    color: var(--dark-green);
    text-align: center;
}

/* Insurance Section */
.insurance-section {
    background-color: white;
}

.insurance-section h2 {
    font-size: 3rem;
    margin-bottom: 3rem;
    color: var(--dark-green);
    text-align: center;
}

.insurance-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.insurance-content h3 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem 0;
    color: var(--dark-green);
}

.insurance-list ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.insurance-list li {
    padding: 0.5rem 0;
    color: var(--text-gray);
    font-size: 1.1rem;
    border-bottom: 1px solid #e5e5e5;
}

.fee-info {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.fee-info p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.fee-info strong {
    color: var(--coral);
    font-size: 1.2rem;
}

/* ================================
   LOCATION SECTION
   ================================ */
.location-section {
    background: white;
}

.location-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.location-content {
    text-align: left;
}

.location-content h2 {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 2rem;
    color: var(--dark-green);
}

.location-content p {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.location-content address {
    font-style: normal;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-gray);
    margin-top: 2rem;
}

.location-content address a {
    color: var(--coral);
    text-decoration: none;
    font-weight: 500;
}

.location-content address a:hover {
    text-decoration: underline;
}

.directions-btn {
    margin: 1rem 0 !important;
    font-size: 0.9rem !important;
    padding: 0.6rem 1.2rem !important;
}

.location-map {
    height: 500px; /* Increased from 400px for better visibility */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* MapTiler SDK specific styles */
#map {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#map.loaded {
    opacity: 1;
}

/* Map placeholder and loading styles */
.map-placeholder {
    height: 100%;
    background: linear-gradient(135deg, var(--light-bg), #f0f0f0);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    position: relative;
}

.map-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 49%, rgba(212, 165, 116, 0.1) 50%, transparent 51%);
    animation: shimmer 2s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.map-placeholder-content {
    text-align: center;
    color: var(--text-gray);
    z-index: 1;
    position: relative;
}

.map-placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.map-placeholder-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark-green);
    font-family: 'Crimson Text', serif;
}

.map-placeholder-content p {
    margin-bottom: 0;
    font-size: 0.95rem;
    opacity: 0.8;
}

.map-loading {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-gray);
    background: var(--light-bg);
    border-radius: 8px;
    position: relative;
}

.map-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--coral);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

.map-error {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-gray);
    background: var(--light-bg);
    border-radius: 8px;
    text-align: center;
    gap: 1rem;
}

.map-load-button {
    background: var(--coral);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3);
}

.map-load-button:hover {
    background: #c59660;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.4);
}

.map-load-button:active {
    transform: translateY(0);
}

/* Custom marker styles */
.custom-map-marker {
    background: none !important;
    border: none !important;
    width: 30px !important;
    height: 42px !important;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.marker-pin {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    background: var(--coral);
    position: relative;
    transform: rotate(-45deg);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
    margin-bottom: 12px;
}

.marker-pin::after {
    content: '';
    width: 14px;
    height: 14px;
    margin: 8px 0 0 8px;
    background: white;
    position: absolute;
    border-radius: 50%;
}

/* Custom popup styles */
.custom-popup .maplibregl-popup-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
    padding: 0;
    max-width: 250px;
}

.map-popup {
    padding: 16px;
}

.map-popup h3 {
    color: var(--dark-green);
    font-size: 1.2rem;
    margin: 0 0 10px 0;
    font-family: 'Crimson Text', serif;
}

.map-popup p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.map-popup a {
    color: var(--coral);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-block;
}

.map-popup a:hover {
    text-decoration: underline;
}

/* ================================
   CTA SECTION
   ================================ */
.cta-section {
    background-color: var(--light-bg);
    text-align: left;
}

.cta-section .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1000px;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-green);
}

.cta-content p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

/* ================================
   MODAL STYLES
   ================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--light-bg);
    margin: auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--dark-green);
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover {
    color: var(--coral);
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--dark-green);
    text-align: center;
}

/* ================================
   SIMPLEPRACTICE WIDGET OVERRIDES
   ================================ */
.spwidget-button {
    background-color: var(--coral) !important;
    color: white !important;
    border: none !important;
    padding: 0.8rem 2rem !important;
    font-size: 1.1rem !important;
    font-weight: bold !important;
    border-radius: 4px !important;
    transition: background 0.3s !important;
    font-family: var(--font-body) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

.spwidget-button:hover {
    background-color: var(--coral-hover) !important;
    color: white !important;
}

.navbar-button .spwidget-button-wrapper {
    margin: 0 !important;
    padding: 0 !important;
}

.navbar-button .spwidget-button {
    padding: 1rem 2rem !important;
    font-size: 1rem !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
}

/* ================================
   MAP STYLES
   ================================ */
.custom-map-marker {
    position: relative;
}

.marker-pin {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    background: var(--coral);
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -20px 0 0 -15px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
}

.marker-pin::after {
    content: '';
    width: 14px;
    height: 14px;
    margin: 8px 0 0 8px;
    background: white;
    position: absolute;
    border-radius: 50%;
}

.custom-popup .leaflet-popup-content-wrapper {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
    padding: 0;
}

.custom-popup .leaflet-popup-content {
    margin: 0;
    padding: 0;
}

.map-popup {
    padding: 16px;
    max-width: 250px;
}

.map-popup h3 {
    color: var(--dark-green);
    font-size: 1.2rem;
    margin: 0 0 10px 0;
}

.map-popup p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.map-popup a {
    color: var(--coral);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-block;
}

.map-popup a:hover {
    text-decoration: underline;
}

.custom-popup .leaflet-popup-tip {
    background: white;
}

.leaflet-control-zoom a {
    color: var(--dark-green) !important;
    border-color: #e0e0e0 !important;
}

.leaflet-control-zoom a:hover {
    background-color: #f8f8f8 !important;
}

.leaflet-control-attribution {
    font-size: 9px !important;
    background-color: rgba(255, 255, 255, 0.7) !important;
    padding: 2px 5px !important;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 768px) {
    .section {
        padding: var(--section-padding-mobile);
    }
    
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .hero-content {
        padding: 8rem 1rem 3rem 1rem; /* Add top padding to account for navbar height */
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .hero-text {
        max-width: 100%;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }
    
    .scroll-indicator {
        bottom: 1rem;
    }
    
    .scroll-arrow {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .scroll-text {
        font-size: 0.8rem;
    }
    
    /* Hero background optimization for tablet */
    .hero.home,
    .hero.services,
    .hero.team {
        background-attachment: scroll; /* Prevent iOS parallax issues */
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile */
    }
    
    .safe-space,
    .team-member-profile,
    .location-container,
    .cta-section .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .team-member-profile {
        margin-bottom: 4rem;
    }
    
    .profile-image {
        height: 300px;
        order: 2;
    }
    
    .profile-content {
        order: 1;
    }
    
    .profile-content h2 {
        font-size: 2rem;
        margin-top: 0;
    }
    
    .location-map {
        height: 450px; /* Increased from 300px for better visibility */
        order: -1;
        /* Improve mobile touch handling */
        touch-action: pan-x pan-y;
    }
    
    /* Mobile map optimizations */
    #map {
        /* Improve mobile rendering */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
    
    
    .cta-section {
        text-align: center;
    }
    
    .cta-buttons {
        align-items: center;
    }
    
    .approach-section h2,
    .team-section h2,
    .services-offerings h2,
    .insurance-section h2 {
        font-size: 2rem;
    }
    
    .space-content h2,
    .location-content h2,
    .cta-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.5rem;
    }
    
    .logo-image {
        height: 60px;
    }
    
    .nav-links {
        gap: 0.8rem;
    }
    
    .nav-links a {
        font-size: 1rem;
    }
    
    .hero-content {
        padding: 7rem 1rem 2rem 1rem;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    /* Hero background optimization for mobile */
    .hero.home {
        background: 
            linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
            url('../images/hero-home.jpg');
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        background-attachment: scroll; /* Prevent iOS parallax issues */
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile */
    }
    
    .hero.services {
        background: 
            linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
            url('../images/hero-services.jpg');
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        background-attachment: scroll;
        min-height: 100vh;
        min-height: 100dvh;
    }
    
    .hero.team {
        background: 
            linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
            url('../images/hero-about.jpg');
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        background-attachment: scroll;
        min-height: 100vh;
        min-height: 100dvh;
    }
    
    /* WebP support for mobile hero images */
    @supports (background-image: url('data:image/webp;base64,UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==')) {
        .hero.home {
            background-image: 
                linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
                url('../images/hero-home.webp');
        }
        
        .hero.services {
            background-image: 
                linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
                url('../images/hero-services.webp');
        }
        
        .hero.team {
            background-image: 
                linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
                url('../images/hero-about.webp');
        }
    }
    
    .services-grid {
        grid-template-columns: 1fr !important;
    }
    
    .insurance-list ul {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    /* Additional mobile map optimizations for very small screens */
    .location-map {
        height: 400px; /* Increased from 250px for much better mobile usability */
        margin: 1rem 0;
    }
    
    /* Ensure map loading is more reliable on slow mobile connections */
    .map-placeholder {
        font-size: 0.9rem;
    }
    
    .map-loading {
        font-size: 1rem;
        padding: 2rem 1rem;
    }
}