/* Color Palette: Sourced from GPN Logo */
:root {
    --primary-blue: #0067a9;
    --secondary-green: #a4d29a;
    --text-dark: #333;
    --text-light: #f4f4f4;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
}

/* Enhanced Reader Mode Prevention */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    
    /* Stronger Reader Mode prevention */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    
    /* Additional Safari reader mode prevention */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Prevent Safari from detecting as article content */
body::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 1px;
    height: 1px;
    background: transparent;
    z-index: -1;
}

/* Force app-like behavior */
html {
    -webkit-text-size-adjust: none;
    -ms-text-size-adjust: none;
    text-size-adjust: none;
}

/* Allow text selection where needed */
p, 
.director-quote, 
.director-bio, 
.highlight-description,
.cta-description,
blockquote,
address,
.location-card p,
.billing-card p {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Semantic elements styling to indicate web app */
main[role="main"] {
    position: relative;
    min-height: 50vh;
}

section[role="banner"],
section[role="complementary"],
section[role="region"] {
    position: relative;
    display: block;
}

/* Interactive elements styling */
button,
a[role="button"],
nav a,
.cta-button,
.cta-button-large,
.clickable-location {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0,103,169,0.1);
}

/* Header and Navigation Improvements */
header {
    background-color: #fff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    height: 55px;
}

nav a {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: 600;
    margin-left: 25px;
    transition: color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

nav a:hover {
    color: var(--secondary-green);
}

/* Hero Section Refinement */
#hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #004d7a 100%);
    min-height: 50vh;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem 1rem;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="none"><path d="M0,50 Q250,0 500,50 T1000,50 L1000,100 L0,100 Z" fill="rgba(164,210,154,0.1)"/></svg>') bottom center/cover no-repeat;
}

#hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    max-width: 800px;
    position: relative;
    z-index: 1;
}

#hero p {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.cta-buttons {
    margin-top: 2rem;
    position: relative;
    z-index: 1;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* CTA Button Refinement */
.cta-buttons a {
    display: inline-block;
    background: var(--secondary-green);
    color: var(--text-dark);
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(164,210,154,0.3);
    text-transform: none;
    letter-spacing: normal;
    -webkit-tap-highlight-color: transparent;
}

.cta-buttons a:hover,
.cta-buttons a:active {
    background: #8bc47a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(164,210,154,0.4);
}

/* Summary Section */
#summary-section {
    background-color: var(--light-gray);
    padding: 4rem 2rem;
    text-align: center;
}

.summary-logo {
    width: 200px;
    height: auto;
    margin-bottom: 2rem;
}

#summary-section p {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-dark);
}

/* Key Information Section */
#key-info {
    padding: 4rem 2rem;
    background-color: var(--white);
}

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

.info-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border: 1px solid var(--medium-gray);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-green));
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,103,169,0.15);
}

.info-card img {
    height: 250px;
    width: 100%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border-radius: 8px;
}

.info-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.info-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Styling for clickable info cards */
.info-link {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

/* Patient Page Styling */
.page-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #004d7a 100%);
    color: var(--text-light);
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="none"><path d="M0,50 Q250,0 500,50 T1000,50 L1000,100 L0,100 Z" fill="rgba(164,210,154,0.1)"/></svg>') bottom center/cover no-repeat;
}

.page-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.page-header p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Billing Section */
.patient-section {
    padding: 4rem 2rem;
    background-color: var(--light-gray);
}

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

.billing-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border: 1px solid var(--medium-gray);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.billing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-green));
}

.billing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,103,169,0.15);
}

.billing-card h4 {
    color: var(--primary-blue);
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 1rem;
}

.billing-card p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.billing-card a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
}

.billing-card a:hover {
    color: var(--secondary-green);
}

/* Enhanced Location Section Styling */
.patient-locations-header {
    margin-bottom: 2rem;
}

.patient-locations-header h2 {
    font-size: 2.8rem;
}

.locations-container {
    display: flex;
    justify-content: space-between;
    padding: 2rem;
    gap: 2rem;
    align-items: flex-start;
}

#map-section {
    flex-basis: 50%;
    position: sticky;
    top: 95px;
    min-width: 0; /* Prevents flex item from overflowing */
}

/* Enhanced Mobile-Optimized Map Container */
#map {
    height: 600px;
    width: 100%;
    border-radius: 8px;
    border: 2px solid var(--medium-gray);
    background-color: var(--light-gray);
    position: relative;
    overflow: hidden;
    
    /* Mobile touch optimizations */
    touch-action: manipulation;
    -webkit-overflow-scrolling: touch;
}

/* Mobile-specific fixes */
@media (max-width: 768px) {
    .locations-container {
        flex-direction: column;
        padding: 1rem;
        gap: 1.5rem;
    }
    
    #map-section {
        position: relative;
        top: 0;
        flex-basis: auto;
        order: 1;
        width: 100%; /* Ensure full width on mobile */
    }
    
    #map {
        height: 350px !important;
        width: 100% !important;
        min-width: 100%;
        border-radius: 8px;
        touch-action: manipulation;
        position: relative;
    }
    
    #location-listings {
        flex-basis: auto;
        order: 2;
        width: 100%;
    }
}


#map.loaded::before {
    display: none;
}

#location-listings {
    flex-basis: 50%;
}

/* Enhanced Mobile-Optimized Location Cards */
.location-card {
    background-color: #fff;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    
    /* Mobile touch optimizations */
    -webkit-tap-highlight-color: rgba(0,103,169,0.1);
    touch-action: manipulation;
    user-select: none;
}

.location-card:hover,
.location-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,103,169,0.2);
    border-color: var(--secondary-green);
}

/* Mobile-specific location card behavior */
@media (max-width: 768px) {
    .location-card:active {
        background-color: rgba(0,103,169,0.05);
        transform: scale(0.98);
    }
}

.location-card h3 {
    margin-top: 0;
    color: var(--primary-blue);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.location-card p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.location-card a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
}

.location-card a:hover {
    color: var(--secondary-green);
}

/* Info window styling */
.info-window-content {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 300px;
    font-size: 0.85rem;   /* smaller text */
    line-height: 1.2;     /* tighter spacing */
    white-space: normal; 
}

.info-window-content h3 {
    margin-top: 0;
    color: var(--primary-blue);
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.info-window-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.4;
}

/* Career Page Styling */
#careers-hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #004d7a 100%);
    color: var(--text-light);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#careers-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="none"><path d="M0,50 Q250,0 500,50 T1000,50 L1000,100 L0,100 Z" fill="rgba(164,210,154,0.1)"/></svg>') bottom center/cover no-repeat;
}

#careers-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

#careers-hero p {
    font-size: 1.4rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

#career-paths {
    padding: 4rem 2rem;
    background-color: var(--light-gray);
    text-align: center;
}

#career-paths h2 {
    color: var(--primary-blue);
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

.info-card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: stretch;
    height: 100%;
}

/* Modal and Form Styling */
.modal {
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: stretch;
    justify-content: center;
    padding: 1rem;
    -webkit-overflow-scrolling: touch;
}

.modal-content {
    background-color: #fff;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    position: relative;
    animation-name: modalopen;
    animation-duration: 0.4s;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@keyframes modalopen {
    from {opacity: 0; transform: translateY(-30px) scale(0.95);}
    to {opacity: 1; transform: translateY(0) scale(1);}
}

.modal-content h3 {
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.close-button {
    color: #999;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

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

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.submit-button {
    width: 100%;
    padding: 1rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.submit-button:hover,
.submit-button:active {
    background: #004d80;
    transform: translateY(-1px);
}

/* Residency page styles */
.hero-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #004d7a 100%);
    color: var(--text-light);
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="none"><path d="M0,50 Q250,0 500,50 T1000,50 L1000,100 L0,100 Z" fill="rgba(164,210,154,0.1)"/></svg>') bottom center/cover no-repeat;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-green);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: var(--secondary-green);
    color: var(--text-dark);
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(164,210,154,0.3);
    -webkit-tap-highlight-color: transparent;
}

.cta-button:hover,
.cta-button:active {
    background: #8bc47a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(164,210,154,0.4);
}

/* Program Director Section */
.director-section {
    padding: 4rem 0;
    background: var(--light-gray);
}

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

.director-image {
    width: 300px;
    height: 350px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.director-content h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.director-quote {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-left: 4px solid var(--secondary-green);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.director-bio {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.director-signature {
    font-weight: 600;
    color: var(--primary-blue);
}

/* Program Highlights */
.highlights-section {
    padding: 4rem 0;
    background: var(--white);
}

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

.section-title {
    text-align: center;
    font-size: 2.8rem;
    color: var(--primary-blue);
    margin-bottom: 3rem;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.highlight-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border: 1px solid var(--medium-gray);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.highlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-green));
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,103,169,0.15);
}

.highlight-icon {
    width: 60px;
    height: 60px;
    background: var(--secondary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.highlight-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.highlight-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Gallery Section */
.gallery-section {
    padding: 4rem 0;
    background: var(--light-gray);
    text-align: center;
}

.gallery-title {
    font-size: 2.8rem;
    color: var(--primary-blue);
    margin-bottom: 3rem;
}

.carousel-container {
    position: relative;
    overflow: visible;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 100px;
    height: 400px;
}

.carousel-track {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    position: relative;
}

.carousel-img {
    position: absolute;
    height: 300px;
    width: 400px;
    object-fit: cover;
    border-radius: 15px;
    transition: all 0.5s ease-in-out;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.carousel-img.center {
    z-index: 3;
    transform: translateX(0) scale(1.1);
    opacity: 1;
    box-shadow: 0 12px 35px rgba(0,103,169,0.3);
}

.carousel-img.left {
    z-index: 1;
    transform: translateX(-200px) scale(0.8);
    opacity: 0.7;
}

.carousel-img.right {
    z-index: 1;
    transform: translateX(200px) scale(0.8);
    opacity: 0.7;
}

.carousel-img.hidden {
    z-index: 0;
    opacity: 0;
    transform: scale(0.6);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.carousel-btn:hover,
.carousel-btn:active {
    background: var(--secondary-green);
    color: var(--text-dark);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #004d7a 100%);
    color: var(--text-light);
    padding: 4rem 0;
    text-align: center;
}

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

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button-large {
    display: inline-block;
    background: var(--secondary-green);
    color: var(--text-dark);
    padding: 1.5rem 3rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(164,210,154,0.3);
    -webkit-tap-highlight-color: transparent;
}

.cta-button-large:hover,
.cta-button-large:active {
    background: #8bc47a;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(164,210,154,0.4);
}

/* Footer Enhancement */
footer {
    background: var(--text-dark);
    color: var(--text-light);
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* Success Popup Styles */
.success-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1002;
    text-align: center;
    max-width: 500px;
    width: 90%;
    display: none;
}

.success-popup.show {
    display: block;
    animation: successPopupOpen 0.4s ease-out;
}

@keyframes successPopupOpen {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.success-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1001;
    display: none;
}

.success-popup-overlay.show {
    display: block;
}

.success-popup h3 {
    color: var(--primary-blue);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--secondary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: var(--white);
    animation: successIconPulse 0.6s ease-out;
}

@keyframes successIconPulse {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.success-popup p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.success-popup-close {
    background: var(--primary-blue);
    color: var(--white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.success-popup-close:hover,
.success-popup-close:active {
    background: #004d80;
    transform: translateY(-1px);
}

/* MOBILE RESPONSIVE DESIGN - Enhanced Mobile Optimizations */

/* Mobile Navigation Improvements */
@media (max-width: 768px) {
    header {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }
    
    .logo {
        height: 40px;
    }
    
    nav {
        flex-wrap: wrap;
        gap: 0.25rem;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    nav a {
        margin-left: 0;
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
        border-radius: 20px;
        background: rgba(0, 103, 169, 0.1);
    }
    
    /* Mobile Hero Sections */
    #hero,
    .hero-section,
    #careers-hero {
        height: auto;
        min-height: 60vh;
        padding: 3rem 1rem;
    }
    
    .hero-title,
    #hero h1,
    #careers-hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle,
    #hero p,
    #careers-hero p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    /* Mobile Stats Grid */
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .stat-item {
        padding: 1rem 0.5rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
        margin-top: 0.25rem;
    }
    
    /* Mobile CTA Buttons */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        margin-top: 1.5rem;
    }
    
    .cta-buttons a,
    .cta-button,
    .cta-button-large {
        width: 280px;
        max-width: 90%;
        text-align: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Mobile Summary Section */
    #summary-section {
        padding: 2rem 1rem;
    }
    
    .summary-logo {
        width: 150px;
        margin-bottom: 1.5rem;
    }
    
    #summary-section p {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    
    /* Mobile Cards and Grids */
    #key-info,
    .highlights-section,
    #career-paths,
    .patient-section {
        padding: 2rem 1rem;
    }
    
    .key-info-container,
    .highlights-grid,
    .info-card-container,
    .billing-options {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .info-card,
    .highlight-card,
    .billing-card {
        padding: 1.5rem;
        margin: 0;
    }
    
    .info-card img {
        height: 200px;
        margin-bottom: 1rem;
    }
    
    .info-card h3,
    .highlight-card h3,
    .billing-card h4 {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }
    
    .highlight-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    /* Mobile Page Headers */
    .page-header {
        padding: 2rem 1rem;
    }
    
    .page-header h1,
    .patient-locations-header h2 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }
    
    .page-header p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    /* Mobile Section Titles */
    .section-title,
    #career-paths h2,
    .gallery-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
        line-height: 1.2;
        padding: 0 1rem;
    }
    
    /* Mobile Director Section */
    .director-section {
        padding: 2rem 1rem;
    }
    
    .director-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .director-image {
        width: 250px;
        height: 300px;
        margin: 0 auto;
    }
    
    .director-content h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .director-quote {
        font-size: 1rem;
        padding: 1rem;
        margin-bottom: 1.5rem;
        text-align: left;
    }
    
    .director-bio {
        font-size: 1rem;
        line-height: 1.6;
        text-align: left;
        margin-bottom: 1.5rem;
    }
    
    .director-signature {
        text-align: left;
    }
    
    /* Mobile Gallery and Carousel */
    .gallery-section {
        padding: 2rem 1rem;
    }
    
    .carousel-container {
        padding: 0 30px;
        height: 280px;
        width: 100%;
    }
    
    .carousel-img {
        height: 200px;
        width: 250px;
    }
    
    .carousel-img.center {
        transform: translateX(0) scale(1.05);
    }
    
    .carousel-img.left {
        transform: translateX(-80px) scale(0.75);
        opacity: 0.6;
    }
    
    .carousel-img.right {
        transform: translateX(80px) scale(0.75);
        opacity: 0.6;
    }
    
    .carousel-btn {
        width: 45px;
        height: 45px;
        padding: 0.5rem;
        font-size: 1.2rem;
    }
    
    .carousel-btn.prev {
        left: 5px;
    }
    
    .carousel-btn.next {
        right: 5px;
    }
    
    /* Mobile CTA Section */
    .cta-section {
        padding: 2rem 1rem;
    }
    
    .cta-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
        line-height: 1.2;
    }
    
    .cta-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }
    
    /* ENHANCED MOBILE LOCATION SECTION */
    .locations-container {
        flex-direction: column;
        padding: 1rem;
        gap: 1.5rem;
    }
    
    #map-section {
        position: relative;
        top: 0;
        flex-basis: auto;
        order: 1;
    }
    
    /* Mobile-Optimized Map */
    #map {
        height: 350px !important;
        width: 100% !important;
        border-radius: 8px;
        touch-action: manipulation;
        position: relative;
        
        /* Enhanced mobile touch handling */
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        
        /* Prevent zoom conflicts */
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }

    
    #map.loaded::before {
        display: none;
    }
    
    #location-listings {
        flex-basis: auto;
        order: 2;
    }
    
    /* Enhanced Mobile Location Cards */
    .location-card {
        padding: 1rem;
        margin-bottom: 1rem;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        
        /* Enhanced mobile touch feedback */
        -webkit-tap-highlight-color: rgba(0,103,169,0.1);
        transform: translateZ(0); /* Hardware acceleration */
    }
    
    /* Mobile-specific active states */
    .location-card:active {
        background-color: rgba(0,103,169,0.05);
        transform: scale(0.98) translateZ(0);
        box-shadow: 0 2px 8px rgba(0,103,169,0.15);
    }
    
    .location-card:hover {
        background-color: #f8f9fa;
        transform: translateY(-1px) translateZ(0);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    .location-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    .location-card p {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
        line-height: 1.4;
    }
    
    /* Mobile phone links */
    .location-card a[href^="tel:"] {
        display: inline-block;
        background: rgba(0,103,169,0.1);
        padding: 0.3rem 0.8rem;
        border-radius: 15px;
        margin-top: 0.5rem;
        font-size: 0.9rem;
        transition: all 0.3s ease;
    }
    
    .location-card a[href^="tel:"]:active {
        background: rgba(0,103,169,0.2);
        transform: scale(0.95);
    }
    
    /* Mobile Modal Improvements */
    .modal {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 2rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-content {
        padding: 2rem 1.5rem;
        width: 95%;
        margin: 0;
        max-height: 85vh;
        border-radius: 15px;
    }
    
    .modal-content h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-group label {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
    }
    
    .form-group input {
        padding: 0.9rem;
        font-size: 1rem;
        border-radius: 6px;
    }
    
    .submit-button {
        padding: 1rem;
        font-size: 1rem;
        border-radius: 6px;
    }
    
    /* Mobile Success Popup */
    .success-popup {
        padding: 2rem 1.5rem;
        width: 95%;
        max-width: 350px;
        border-radius: 15px;
    }
    
    .success-popup h3 {
        font-size: 1.6rem;
        margin-bottom: 0.75rem;
    }
    
    .success-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .success-popup p {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }
    
    .success-popup-close {
        padding: 0.9rem 1.8rem;
        font-size: 0.95rem;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    .hero-title,
    #hero h1,
    #careers-hero h1 {
        font-size: 1.9rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-item {
        padding: 0.75rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        margin: 0 1rem;
    }
    
    .cta-buttons a,
    .cta-button,
    .cta-button-large {
        width: 250px;
        padding: 0.9rem 1.2rem;
        font-size: 0.95rem;
    }
    
    .carousel-container {
        padding: 0 20px;
        height: 260px;
    }
    
    .carousel-img {
        height: 180px;
        width: 220px;
    }
    
    .carousel-img.left {
        transform: translateX(-60px) scale(0.7);
    }
    
    .carousel-img.right {
        transform: translateX(60px) scale(0.7);
    }
    
    nav a {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    .section-title,
    #career-paths h2,
    .gallery-title {
        font-size: 1.6rem;
    }
    
    .director-image {
        width: 200px;
        height: 250px;
    }
    
    /* Extra small mobile map adjustments */
    #map {
        height: 300px !important;
    }
    
    .location-card {
        padding: 0.8rem;
    }
    
    .location-card h3 {
        font-size: 1rem;
    }
    
    .location-card p {
        font-size: 0.85rem;
    }
}