/*
Theme Name: Simple Dental
Description: A clean, modern WordPress theme for Simple Dental practice in Las Vegas. Features transparent pricing, honest messaging, and earth-tone design aesthetic.
Version: 1.1.0
Author: Simple Dental Development Team
*/

/* ==========================================================================
   CSS Reset and Base Styles
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: #2c2c2c;
    background-color: #ffffff;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* ==========================================================================
   Color Variables - Gray and Earth Tones
   ========================================================================== */

:root {
    --primary-brown: #8B7355;
    --brown-hover: #7A6249;
    --brown-light: #A68B5B;
    --dark-gray: #2c2c2c;
    --medium-gray: #6b6b6b;
    --light-gray: #f3f4f6;
    --border-gray: #e5e7eb;
    --off-white: #fafafa;
    --white: #ffffff;
    --warm-beige: #f5f2ed;
    --sage-green: #9CAF88;
    --soft-sage: #9CAF88;
    --warm-coral: #B5967A;
    --coral-hover: #A68867;
    --soft-taupe: #D4C4B0;
    --charcoal: #3a3a3a;
    --text-dark: #2c2c2c;
    --text-medium: #4a4a4a;
    --text-light: #737373;
    --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --success-green: var(--soft-sage);
    --accent-coral: var(--warm-coral);    
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
}

h2 {
    font-size: 2.25rem;
    font-weight: 700;
}

h3 {
    font-size: 1.875rem;
    font-weight: 600;
}

h4 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    color: var(--text-medium);
}

a {
    color: var(--primary-brown);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--brown-hover);
}

/* ==========================================================================
   Layout and Structure
   ========================================================================== */

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

.section {
    padding: 60px 0;
}

.section-alt {
    background-color: var(--warm-beige);
}

/* ==========================================================================
   Header Styles
   ========================================================================== */

.site-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 2000;
    border-bottom: 1px solid var(--border-gray);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    min-height: 80px;
}

.site-branding {
    flex: 0 0 auto;
}

.site-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.site-title a {
    color: var(--text-dark);
    font-weight: inherit;
}

.site-title a:hover {
    color: var(--primary-brown);
}

.custom-logo-wrapper img {
    height: 60px;
    width: auto;
    max-width: 200px;
}

.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
}

/* --- Desktop Menu Item & Icon Alignment --- */
.main-navigation a {
    display: flex;
    align-items: center;
    gap: 0.6rem; /* Desktop spacing */
    color: var(--text-medium);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.75rem 0;
    position: relative;
    transition: all 0.2s ease;
}

/* Desktop Menu Icons */
.main-navigation .menu-icon {
    width: 16px; /* Desktop icon size */
    height: 16px;
    stroke-width: 2.5;
    flex-shrink: 0;
    margin-top: -2px; /* Fine-tune desktop alignment */
    opacity: 0.85;
    transition: all 0.2s ease;
}

.main-navigation a:hover .menu-icon,
.main-navigation a.active .menu-icon {
    opacity: 1;
}

.main-navigation .menu-text {
    line-height: 1; /* Clean desktop line-height */
}

.main-navigation a:hover,
.main-navigation a.active {
    color: var(--primary-brown);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-brown);
    transition: width 0.2s ease;
}

.main-navigation a:hover::after,
.main-navigation a.active::after {
    width: 100%;
}

/* Desktop Header CTA - Visible on desktop/tablet only */
.header-cta {
    flex: 0 0 auto;
    display: block; /* Default: visible on desktop */
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    background: linear-gradient(135deg, var(--off-white) 0%, var(--white) 100%);
    padding: 140px 0 100px;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(139, 115, 85, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.75rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    letter-spacing: -0.05em;
    line-height: 1.1;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-medium);
    margin-bottom: 3rem;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
    line-height: 1.6;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
    letter-spacing: -0.01em;
    min-height: 48px;
    box-shadow: var(--shadow-light);
}

.btn-primary {
    background-color: var(--primary-brown);
    color: var(--white);
    border: 2px solid var(--primary-brown);
}

.btn-primary:hover {
    background-color: var(--brown-hover);
    border-color: var(--brown-hover);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-brown);
    border: 2px solid var(--primary-brown);
}

.btn-secondary:hover {
    background-color: var(--primary-brown);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn-coral {
    background-color: var(--warm-coral);
    color: var(--white);
    border: 2px solid var(--warm-coral);
}

.btn-coral:hover {
    background-color: var(--coral-hover);
    border-color: var(--coral-hover);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* ==========================================================================
   New Patient Special
   ========================================================================== */

.new-patient-special {
    background: linear-gradient(135deg, var(--warm-coral) 0%, var(--coral-hover) 100%);
    color: var(--white);
    padding: 2.5rem;
    border-radius: 1rem;
    text-align: center;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-large);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.new-patient-special::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.special-badge {
    background-color: rgba(255, 255, 255, 0.25);
    color: var(--white);
    padding: 0.625rem 1.25rem;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.new-patient-special h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--white);
}

.special-price {
    font-size: 3rem;
    font-weight: 900;
    margin: 1rem 0;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: -0.025em;
}

.new-patient-special p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.special-features {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0 2rem 0;
    flex-wrap: wrap;
}

.special-features .feature {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.95;
}

.new-patient-special .btn {
    background-color: var(--white);
    color: var(--warm-coral);
    border-color: var(--white);
    font-weight: 700;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.new-patient-special .btn:hover {
    background-color: var(--off-white);
    color: var(--coral-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ==========================================================================
   Services/Pricing Section
   ========================================================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-light);
    transition: all 0.2s ease;
    border: 1px solid var(--border-gray);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-brown), var(--brown-light));
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-brown);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-title {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.service-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-brown);
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.service-description {
    color: var(--text-medium);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ==========================================================================
   Services by Category
   ========================================================================== */

.services-by-category {
    margin: 2rem 0;
}

.service-category {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-gray);
}

.service-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.category-title {
    font-size: 2rem;
    color: var(--primary-brown);
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.75rem;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-brown), var(--soft-sage));
    border-radius: 2px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    border-left: 4px solid var(--border-gray);
    transition: all 0.3s ease;
}

.service-category[data-category="preventive"] .category-card {
    border-left-color: var(--soft-sage);
}

.service-category[data-category="restorative"] .category-card {
    border-left-color: var(--primary-brown);
}

.service-category[data-category="extraction"] .category-card {
    border-left-color: var(--warm-coral);
}

.service-category[data-category="endodontics"] .category-card {
    border-left-color: var(--brown-light);
}

.service-category[data-category="prosthetics"] .category-card {
    border-left-color: var(--soft-taupe);
}

.service-category[data-category="other"] .category-card {
    border-left-color: var(--medium-gray);
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.category-card .service-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.contact-card {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

.contact-card h4 {
    color: var(--accent-coral);
    margin-bottom: 15px;
}

.map-container {
    width: 100%;
    height: 400px;
    margin-top: 40px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background-color: var(--text-dark);
    color: var(--light-gray);
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: 15px;
}

.footer-section p,
.footer-section a {
    color: var(--light-gray);
}

.footer-bottom {
    border-top: 1px solid var(--medium-gray);
    padding-top: 20px;
    text-align: center;
    color: var(--text-light);
}

/* ==========================================================================
   Coming Soon Banner
   ========================================================================== */

.coming-soon-banner {
    background: linear-gradient(90deg, var(--primary-brown) 0%, var(--brown-hover) 100%);
    color: var(--white);
    padding: 0.75rem 0;
    text-align: center;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
}

.banner-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.banner-text::before {
    content: '🎉';
    font-size: 1rem;
}

/* ==========================================================================
   Contact Form Styles
   ========================================================================== */

.simple-contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.simple-contact-form .form-row {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
}

.simple-contact-form .form-row input,
.simple-contact-form .form-row textarea {
    flex: 1;
    padding: 15px;
    border: 2px solid var(--light-gray);
    border-radius: 5px;
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.simple-contact-form .form-row input:focus,
.simple-contact-form .form-row textarea:focus {
    outline: none;
    border-color: var(--primary-brown);
}

.simple-contact-form .form-row:last-child {
    text-align: center;
}

.contact-success {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.contact-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.contact-error ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.contact-error li {
    margin: 5px 0;
}

.contact-success {
    background-color: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
    font-size: 1.1rem;
    text-align: center;
    box-shadow: var(--shadow-light);
}

/* Enhanced Contact Form Styles */
.simple-contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.simple-contact-form .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.simple-contact-form .form-row input,
.simple-contact-form .form-row textarea {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: var(--white);
}

.simple-contact-form .form-row input:focus,
.simple-contact-form .form-row textarea:focus {
    outline: none;
    border-color: var(--primary-brown);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.simple-contact-form .form-row textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.captcha-row {
    justify-content: center;
    align-items: center;
}

.form-note {
    text-align: center;
    margin-top: 10px;
}

.form-note small {
    color: var(--text-medium);
    font-size: 0.9rem;
}

/* AJAX Contact Form Loading States */
#contact-submit-btn {
    position: relative;
    min-width: 160px;
    transition: all 0.3s ease;
}

#contact-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    display: inline-block;
}

.btn-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Messages Styling */
#contact-form-messages {
    margin-bottom: 20px;
}

#contact-form-messages .contact-success,
#contact-form-messages .contact-error {
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Focus States for AJAX Form */
.simple-contact-form input:focus,
.simple-contact-form textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.15), 0 0 0 3px rgba(139, 115, 85, 0.1);
}

/* reCAPTCHA Styling */
.g-recaptcha {
    margin: 0 auto;
    display: inline-block;
}

/* Mobile Contact Form Improvements */
@media (max-width: 768px) {
    .simple-contact-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .simple-contact-form .form-row input,
    .simple-contact-form .form-row textarea {
        margin-bottom: 15px;
    }
    
    .simple-contact-form .form-row:last-child input,
    .simple-contact-form .form-row:last-child textarea {
        margin-bottom: 0;
    }
}

/* ==========================================================================
   Scroll Animations
   ========================================================================== */

.service-card, .contact-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.fade-in, .contact-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Header Scroll Effects
   ========================================================================== */

.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Mobile Menu Toggle */
.menu-toggle,
button.menu-toggle {
    display: none;
    background: none !important;
    border: none !important;
    padding: 0.75rem;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* ==========================================================================
   Footer Styles (migrated from inline)
   ========================================================================== */

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    padding: 3px 0;
    color: var(--light-gray);
}

.footer-faq-item { margin-bottom: 12px; }
.footer-faq-item:last-child { margin-bottom: 0; }
.footer-faq-item p {
    margin-bottom: 0;
    line-height: 1.5;
    color: var(--light-gray);
}
.footer-faq-item strong { color: var(--white); font-weight: 600; }

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-brown);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    outline: none;
}

.scroll-to-top:hover {
    background-color: var(--brown-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.scroll-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-arrow { line-height: 1; font-size: 18px; }

@media (max-width: 768px) {
    .footer-bottom-content { flex-direction: column; text-align: center; }
    .scroll-to-top { bottom: 15px; right: 15px; width: 45px; height: 45px; }
    .scroll-arrow { font-size: 16px; }
}

@media (max-width: 480px) {
    .footer-content { grid-template-columns: 1fr; text-align: center; }
}

/* ==========================================================================
   Page: Front Page (migrated from inline in front-page.php)
   ========================================================================== */

.hero { position: relative; text-align: center; padding: 220px 0 140px; margin-top: 0; min-height: 75vh; background-size: cover; background-position: center; background-repeat: no-repeat; }
.hero-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.4); display: flex; align-items: center; justify-content: center; }
.hero-overlay .container { position: relative; z-index: 2; }
.hero h1 { font-size: 3.5rem; color: var(--white); margin: 0 0 2rem; font-weight: 800; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); letter-spacing: -0.025em; line-height: 1.2; }
.hero .subtitle { font-size: 1.5rem; color: var(--white); margin: 0 0 2rem; text-shadow: 1px 1px 2px rgba(0,0,0,0.3); font-weight: 400; max-width: 800px; margin-left: auto; margin-right: auto; line-height: 1.4; }

/* Mobile styles for hero are defined in the global Responsive Design section
   to keep a single source of truth. */

/* ==========================================================================
   Page: Shared Page Header (used by About/Services/Contact/Default)
   ========================================================================== */

.page-header { position: relative; text-align: center; padding: 240px 0 160px; min-height: 56vh; background-size: cover; background-position: center; background-repeat: no-repeat; }
.page-header-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.4); display: flex; align-items: center; justify-content: center; }
.page-header-overlay .container { position: relative; z-index: 2; }
.page-title { font-size: 3rem; color: var(--white); margin: 0 0 1rem 0; font-weight: 800; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); letter-spacing: -0.025em; }
.page-subtitle { font-size: 1.25rem; color: var(--white); margin: 0; text-shadow: 1px 1px 2px rgba(0,0,0,0.3); font-weight: 400; }

/* ==========================================================================
   Page: Services (migrated from inline in page-services.php)
   ========================================================================== */

/* Service page header nuance */
body.page-template-page-services-php .page-header-overlay { background: rgba(0, 0, 0, 0.5); }

.services-section { background-color: var(--white); }
.services-intro { text-align: center; max-width: 700px; margin: 0 auto 3rem; padding: 2rem 0; }
.services-intro h2 { color: var(--primary-brown); margin-bottom: 1.5rem; font-size: 2.25rem; }
.services-intro p { font-size: 1.125rem; line-height: 1.7; color: var(--text-medium); }

.insurance-notice { background: linear-gradient(135deg, var(--warm-beige) 0%, var(--off-white) 100%); border: 1px solid var(--border-gray); border-radius: 1rem; padding: 2rem; margin: 3rem auto; max-width: 900px; box-shadow: var(--shadow-light); }
.insurance-notice h3 { color: var(--primary-brown); margin-bottom: 1.5rem; font-size: 1.5rem; text-align: center; }
.notice-content p { color: var(--text-medium); line-height: 1.7; margin-bottom: 1rem; font-size: 1.0625rem; }
.notice-content p:last-child { margin-bottom: 0; text-align: center; }

.services-additional { margin-top: 4rem; }
.services-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-bottom: 3rem; }
.info-card { background: var(--white); padding: 2rem; border-radius: 1rem; box-shadow: var(--shadow-light); text-align: center; border: 1px solid var(--border-gray); transition: all 0.2s ease; }
.info-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-medium); border-color: var(--primary-brown); }
.info-card h3 { color: var(--primary-brown); margin-bottom: 1rem; font-size: 1.25rem; }
.info-card p { color: var(--text-medium); line-height: 1.6; }

.services-cta { background: var(--warm-beige); border: 1px solid var(--border-gray); padding: 3rem; border-radius: 1rem; text-align: center; margin-top: 3rem; }
.cta-content h2 { color: var(--text-dark); margin-bottom: 1rem; font-size: 2rem; }
.cta-content p { color: var(--text-medium); font-size: 1.125rem; margin-bottom: 2rem; line-height: 1.6; max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-buttons { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }
.cta-buttons .btn { min-width: 200px; padding: 1rem 2rem; }

/* Technology Section */
.technology-section { background: linear-gradient(135deg, var(--warm-beige) 0%, var(--off-white) 100%); padding: 4rem 0; margin: 3rem 0; border-radius: 1rem; }
.technology-section h2 { text-align: center; color: var(--primary-brown); margin-bottom: 2rem; font-size: 2.5rem; }
.technology-intro { text-align: center; max-width: 800px; margin: 0 auto 3rem; }
.technology-intro p { font-size: 1.25rem; line-height: 1.7; color: var(--text-medium); }
.technology-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 2rem; margin-bottom: 3rem; }
.tech-feature { background: var(--white); padding: 2rem; border-radius: 1rem; box-shadow: var(--shadow-light); border: 1px solid var(--border-gray); }
.tech-feature h3 { color: var(--primary-brown); margin-bottom: 1rem; font-size: 1.5rem; }
.tech-feature p { color: var(--text-medium); line-height: 1.6; margin-bottom: 1rem; }
.tech-feature ul { list-style: none; padding: 0; }
.tech-feature li { color: var(--text-medium); padding: 0.5rem 0; position: relative; padding-left: 1.5rem; }
.tech-feature li:before { content: '✓'; color: var(--sage-green); font-weight: bold; position: absolute; left: 0; }
.technology-benefits { margin: 3rem 0; }
.technology-benefits h3 { text-align: center; color: var(--primary-brown); margin-bottom: 2rem; font-size: 2rem; }
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.benefit-item { background: var(--white); padding: 1.5rem; border-radius: 0.75rem; text-align: center; box-shadow: var(--shadow-light); border: 1px solid var(--border-gray); transition: all 0.2s ease; }
.benefit-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-medium); border-color: var(--primary-brown); }
.benefit-icon { font-size: 2rem; display: block; margin-bottom: 1rem; }
.benefit-item h4 { color: var(--primary-brown); margin-bottom: 0.5rem; font-size: 1.125rem; }
.benefit-item p { color: var(--text-medium); line-height: 1.5; margin: 0; }
.technology-cta { background: var(--white); padding: 2rem; border-radius: 1rem; text-align: center; box-shadow: var(--shadow-light); border: 1px solid var(--border-gray); }
.technology-cta h3 { color: var(--primary-brown); margin-bottom: 1rem; font-size: 1.5rem; }
.technology-cta p { color: var(--text-medium); line-height: 1.6; margin-bottom: 1.5rem; max-width: 600px; margin-left: auto; margin-right: auto; }
/* Detailed technology styles (features, grids, CTA) live below in the global CSS */

/* ==========================================================================
   Page: Default Page (migrated from inline in page.php)
   ========================================================================== */

.page-content { padding: 60px 0; background: var(--white); }
.content-wrapper { max-width: 800px; margin: 0 auto; line-height: 1.8; }
.content-wrapper h2 { color: var(--primary-brown); margin-top: 40px; margin-bottom: 20px; }
.content-wrapper h3 { color: var(--primary-brown); margin-top: 30px; margin-bottom: 15px; }
.content-wrapper p { margin-bottom: 20px; color: var(--text-medium); }
.content-wrapper ul, .content-wrapper ol { margin-bottom: 20px; padding-left: 30px; }
.content-wrapper li { margin-bottom: 8px; color: var(--text-medium); }
.page-links { margin-top: 40px; text-align: center; }
.page-links a { display: inline-block; padding: 8px 16px; margin: 0 4px; background-color: var(--primary-brown); color: var(--white); text-decoration: none; border-radius: 4px; transition: background-color 0.3s ease; }
.page-links a:hover { background-color: var(--brown-hover); }
.page-links .current { background-color: var(--brown-hover); color: var(--white); padding: 8px 16px; margin: 0 4px; border-radius: 4px; }

@media (max-width: 768px) {
    body.page-template-default .page-header { padding-top: 430px !important; padding-bottom: 120px; min-height: 48vh; position: relative !important; }
    body.page-template-default .page-title { font-size: 2.25rem; }
    .page-content { padding: 40px 0; }
}

@media (max-width: 768px) {
    body.page-template-page-services-php .page-header { padding-top: 470px !important; padding-bottom: 120px; min-height: 48vh; position: relative !important; }
    body.page-template-page-services-php .page-title { font-size: 2.1rem; }
    body.page-template-page-services-php .page-subtitle { font-size: 1.2rem; }
    .services-intro { padding: 1.5rem 0; }
    .services-intro h2 { font-size: 2rem; }
    .services-info-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .insurance-notice { padding: 1.5rem; margin: 2rem 0; }
    .insurance-notice h3 { font-size: 1.25rem; }
    .notice-content p { font-size: 1rem; }
    .info-card { padding: 1.5rem; }
    .cta-buttons { flex-direction: column; align-items: center; }
    .services-cta { padding: 2rem 1.5rem; }
    .cta-content h2 { font-size: 1.75rem; }
    .cta-content p { font-size: 1rem; }
    /* Technology Section Mobile */
    .technology-section { padding: 2rem 0; margin: 2rem 0; }
    .technology-section h2 { font-size: 2rem; }
    .technology-intro p { font-size: 1.125rem; }
    .technology-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .tech-feature { padding: 1.5rem; }
    .benefits-grid { grid-template-columns: 1fr; }
    .technology-cta { padding: 1.5rem; }
}

.about-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin: 40px 0; }
.feature { text-align: center; padding: 20px; }
.feature h4 { color: var(--accent-teal); margin-bottom: 10px; }
.hero-buttons { display: flex; gap: 20px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }

.about-story { max-width: 700px; margin: 0 auto; text-align: center; padding: 2rem 0; }
.about-story h2 { color: var(--primary-brown); margin-bottom: 1.5rem; font-size: 2.25rem; }
.about-story p { font-size: 1.125rem; line-height: 1.7; margin-bottom: 1.5rem; color: var(--text-medium); }

.about-philosophy { background-color: var(--warm-beige); padding: 4rem 2rem; margin: 4rem 0; border-radius: 1rem; }
.philosophy-content { max-width: 1000px; margin: 0 auto; }
.philosophy-content h2 { text-align: center; color: var(--text-dark); margin-bottom: 3rem; font-size: 2rem; }
.philosophy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.philosophy-item { background: var(--white); padding: 2rem; border-radius: 1rem; box-shadow: var(--shadow-light); text-align: center; border: 1px solid var(--border-gray); transition: all 0.2s ease; }
.philosophy-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-medium); border-color: var(--primary-brown); }
.philosophy-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.philosophy-item h3 { color: var(--primary-brown); margin-bottom: 1rem; font-size: 1.25rem; }
.philosophy-item p { color: var(--text-medium); line-height: 1.6; }

@media (max-width: 768px) {
    .hero-buttons { flex-direction: column; align-items: center; }
    .philosophy-grid { grid-template-columns: 1fr; }
    .about-philosophy { padding: 3rem 1.5rem; margin: 3rem 0; }
}

/* Clean Hamburger Menu Styling */
.hamburger {
    display: block !important;
    width: 20px !important;
    height: 2px !important;
    background-color: var(--primary-brown) !important;
    margin: 3px 0 !important;
    transition: all 0.2s ease !important;
    border-radius: 1px !important;
    opacity: 1 !important;
    visibility: visible !important;
}


/* Hamburger to X animation */
.menu-toggle.active .hamburger {
    transform: scale(0) !important;
    opacity: 0 !important;
    transition: all 0.25s ease !important;
}


/* Mobile Menu Overlay - Simplified z-index */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1500; /* Below header(2000)/menu(2001), above content */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Show overlay when body has menu-open */
body.menu-open .mobile-menu-overlay { opacity: 1; visibility: visible; }

body.menu-open {
    overflow: hidden;
}

/* CRITICAL: Force mobile menu visibility on smaller screens */
@media screen and (max-width: 768px) {
    .site-header .menu-toggle,
    .header-content .menu-toggle,
    .main-navigation .menu-toggle,
    button.menu-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 1003 !important; /* Above menu and overlay */
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    .menu-toggle .hamburger,
    button.menu-toggle .hamburger {
        display: block !important;
        background-color: var(--primary-brown) !important;
        width: 28px !important;
        height: 3px !important;
        margin: 3px 0 !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    /* HERO SECTION - Mobile optimized padding */
    .hero {
        padding-top: 120px !important;
        padding-bottom: 80px;
        margin-top: 0 !important;
        position: relative !important;
    }
    
    .hero h1 {
        font-size: 2.75rem;
        line-height: 1.15;
    }
    
    .hero .subtitle {
        font-size: 1.125rem;
        margin-bottom: 2rem;
    }
    
    /* MOBILE HEADER LAYOUT - Logo left, language center, hamburger right */
    .header-content {
        display: grid;
        /* Use minmax to allow the logo column to shrink safely on narrow widths */
        grid-template-columns: minmax(0, 1fr) auto 44px;
        grid-template-areas: "logo language hamburger";
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 0;
        position: relative;
    }
    
    .menu-toggle {
        grid-area: hamburger;
        justify-self: end;
    }
    
    .site-branding {
        grid-area: logo;
        justify-self: start;
        text-align: left;
        padding: 0 0.5rem 0 0; /* Right padding only for spacing */
        min-width: 0; /* Allow logo container to shrink to prevent wrapping */
    }
    
    /* Optimize mobile logo sizing for better visual balance */
    .custom-logo-wrapper img {
        height: 56px; /* Slightly larger for better mobile presence */
        max-width: 200px;
    }
    
    .language-switcher-wrapper {
        grid-area: language;
        justify-self: center;
        margin-right: 0;
        /* Center positioning with better visual balance */
        opacity: 0.85;
        transition: opacity 0.2s ease;
    }
    
    .language-switcher-wrapper:hover {
        opacity: 1;
    }

    /* Hide the header language switcher when hamburger menu is present.
       The mobile menu contains its own language switcher entry. */
    .site-header .header-content > .language-switcher-wrapper {
        display: none !important;
    }
    
    /* HIDE HEADER CTA ON MOBILE - Hero section has prominent call button */
    .header-cta {
        display: none !important;
    }
    
    /* SHOW HAMBURGER MENU */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0.625rem !important;
        cursor: pointer;
        width: 44px !important;
        height: 44px !important;
        position: relative !important;
        z-index: 2002 !important;
        box-shadow: none !important;
    }
    
    /* COMPACT MOBILE MENU DESIGN - Fixed positioning for device consistency */
    .main-navigation ul {
        position: fixed;
        top: 80px; /* Align with fixed header height */
        right: 15px; /* Fixed distance from viewport edge */
        width: 170px !important;
        max-width: calc(100vw - 30px); /* Responsive max width */
        max-height: calc(100vh - 100px); /* Prevent menu from exceeding viewport */
        overflow-y: auto; /* Enable scrolling for long menus */
        background: var(--white);
        box-shadow: 0 8px 24px rgba(0,0,0,0.15);
        border-radius: 8px;
        z-index: 2001; /* Above header(2000) and overlay(1500) */
        flex-direction: column;
        padding: 0.5rem 0;
        margin: 0;
        list-style: none;
        border: 1px solid var(--border-gray);
        
        /* Initial hidden state */
        display: flex;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px) scale(0.95);
        pointer-events: none;
        
        /* Smooth animation properties - optimized for mobile */
        transition: opacity 0.25s ease,
                    visibility 0.25s ease,
                    transform 0.25s ease;
                    
        /* iOS Safari specific fixes */
        -webkit-overflow-scrolling: touch;
        transform-origin: top right;
    }
    
    /* SHOW MOBILE MENU WHEN ACTIVE */
    .main-navigation ul.active,
    body.menu-open .main-navigation ul {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) scale(1) !important;
        pointer-events: auto !important;
    }
    
    .main-navigation li {
        border-bottom: 1px solid var(--off-white);
        margin: 0;
    }
    
    .main-navigation li:last-child {
        border-bottom: none;
    }
    
    .main-navigation a {
        display: flex;
        align-items: center;
        gap: 1rem !important; /* Increased from 0.75rem for more breathing room */
        padding: 0.75rem 1rem; /* Increased vertical padding for 44px+ touch targets */
        text-align: left;
        color: var(--text-dark);
        text-decoration: none;
        font-weight: 500;
        font-size: 0.9rem;
        transition: all 0.2s ease;
        white-space: nowrap;
        overflow: hidden;
        min-height: 44px; /* Ensure minimum touch target size */
    }
    
    .main-navigation a:hover {
        background-color: var(--primary-brown);
        color: var(--white);
    }
    
    /* Mobile Menu Icon Styling - Override desktop styles */
    .main-navigation .menu-icon {
        width: 24px !important; /* Updated to 24px for better mobile visibility */
        height: 14px !important; /* Updated to 14px for optimized mobile aspect ratio */
        stroke-width: 2.1 !important; /* Slightly reduced for visual balance */
        flex-shrink: 0;
        opacity: 0.8;
        transition: all 0.2s ease;
        margin-top: 0 !important; /* Reset desktop margin for mobile */
    }
    
    .main-navigation a:hover .menu-icon {
        opacity: 1;
        stroke-width: 2.5;
    }
    
    .main-navigation .menu-text {
        line-height: 1.3; /* Increased from 1.2 for better readability */
        flex: 1;
    }
    
    /* Mobile menu link spacing is now handled in the main a selector above */
    
    /* Language Switcher Icon in Mobile Menu */
    .main-navigation .language-switcher-wrapper {
        display: flex;
        align-items: center;
        gap: 1rem !important; /* Increased to match menu item spacing */
        padding: 0.75rem 1rem; /* Increased to match menu item padding */
        justify-content: center;
        min-height: 44px; /* Consistent touch target size */
    }
    
    .main-navigation .language-icon {
        width: 24px; /* Updated to match new mobile menu icon size */
        height: 14px; /* Updated to match new mobile menu icon size */
        opacity: 0.7;
        color: var(--primary-brown);
    }
    
    .main-navigation .language-dropdown {
        font-size: 0.85rem;
        padding: 0.4rem 2rem 0.4rem 0.6rem;
        min-width: auto;
        border: 1px solid var(--border-gray);
        border-radius: 4px;
        background-size: 8px 5px;
        background-position: right 0.5rem center;
    }
    
    /* Mobile CTA Button - Hidden on mobile for cleaner UX */
    /* CTA functionality moved to prominent hero section button */
    
    /* Desktop language switcher positioning */
    .language-switcher-wrapper {
        margin-right: 0.75rem;
    }
    
    /* Mobile site title optimization */
    .site-title {
        font-size: 1.5rem;
        margin-bottom: 0; /* Remove default margin for cleaner header */
        line-height: 1.2; /* Tighter line height for mobile header */
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .section {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    /* Extra compact mobile header layout - Logo left, hamburger right */
    .header-content {
        grid-template-columns: 1fr 40px;
        grid-template-areas: "logo hamburger";
        gap: 0.75rem;
        padding: 0.625rem 0;
    }
    
    .menu-toggle {
        width: 40px !important;
        height: 40px !important;
        padding: 0.5rem !important;
        justify-self: end; /* Ensure right alignment */
    }
    
    /* Header CTA remains hidden on extra small screens */
    .header-cta {
        display: none !important;
    }
    
    /* Optimize logo sizing for small screens - left aligned */
    .site-branding {
        padding: 0 0.5rem 0 0; /* Right padding only for spacing from hamburger */
        justify-self: start;
        text-align: left;
    }
    
    .custom-logo-wrapper img {
        height: 50px; /* Slightly smaller on very small screens */
        max-width: 180px;
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .hero .subtitle {
        font-size: 1rem;
    }
    
    .site-title {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    .service-card {
        padding: 1.25rem;
    }
    
    .service-price {
        font-size: 1.75rem;
    }
    
    /* Contact form mobile styles */
    .simple-contact-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .simple-contact-form .form-row input,
    .simple-contact-form .form-row textarea {
        margin-bottom: 15px;
    }
    
    /* New Patient Special mobile */
    .new-patient-special {
        padding: 2rem 1.5rem;
        margin: 1.5rem 0;
    }
    
    .special-badge {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
        letter-spacing: 0.025em;
    }
    
    .special-price {
        font-size: 2.5rem;
    }
    
    .special-features {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .new-patient-special h3 {
        font-size: 1.5rem;
    }
    
    /* Category services mobile */
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-title {
        font-size: 1.75rem;
    }
    
    /* Language switcher mobile */
    .language-switcher-wrapper {
        order: -1;
        margin-bottom: 1rem;
        border-bottom: 1px solid var(--border-gray);
        padding-bottom: 1rem;
    }
    
    .language-switcher {
        justify-content: center;
    }
}

/* ==========================================================================
   Language Switcher Dropdown Styles
   ========================================================================== */

/* Hide mobile menu language switcher on desktop only */
@media (min-width: 769px) {
    .main-navigation .language-switcher-wrapper {
        display: none;
    }
}

.language-switcher-wrapper {
    display: flex;
    align-items: center;
    margin-right: 1.5rem; /* Add spacing from CTA button */
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Space between icon and dropdown */
}

/* Globe icon styling */
.language-globe-icon {
    width: 14px;
    height: 14px;
    color: var(--text-medium);
    opacity: 0.7;
    flex-shrink: 0;
}

.language-dropdown {
    padding: 0.375rem 0.6rem; /* Smaller padding */
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    font-size: 0.8rem; /* Smaller font size */
    font-weight: 500;
    color: var(--dark-gray);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px; /* Smaller width */
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23666" d="M6 8L0 2h12z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.6rem center; /* Adjusted for smaller padding */
    background-size: 8px 5px; /* Smaller dropdown arrow */
    padding-right: 2rem; /* Adjusted for smaller padding */
}

.language-dropdown:hover {
    border-color: var(--primary-brown);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.language-dropdown:focus {
    border-color: var(--primary-brown);
    box-shadow: 0 0 0 2px rgba(139, 115, 85, 0.1);
}

.language-dropdown option {
    padding: 0.5rem;
    background: var(--white);
    color: var(--dark-gray);
}

/* Duplicate mobile header section removed - Clean implementation above at line 1073 */

/* Duplicate 480px rules removed - Clean implementation above at line 1280 */

/* Mobile landscape orientation fixes */
@media (max-width: 768px) and (orientation: landscape) {
    .main-navigation ul {
        top: 60px !important; /* Reduced top spacing for landscape */
        max-height: calc(100vh - 80px) !important; /* More compact for landscape */
    }
    
    .hero {
        padding-top: 200px !important; /* Reduced hero padding in landscape */
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .main-navigation a {
        min-height: 48px !important; /* Larger touch targets */
        padding: 0.875rem 1rem !important;
    }
    
    .menu-toggle {
        width: 48px !important;
        height: 48px !important;
    }
}

/* CSS-only mobile-menu checkbox fallback removed (unused) */

/* Ensure language switcher appears inside mobile menu (wins cascade) */
@media (max-width: 768px) {
    .main-navigation .language-switcher-wrapper { display: flex !important; }
    .main-navigation .language-switcher-item { display: block !important; }
    /* Avoid duplicate globe icon in mobile menu: hide the standalone
       menu icon and keep the translator's globe next to the dropdown */
    .main-navigation .language-switcher-wrapper .menu-icon.language-icon { display: none !important; }
}

/* (Header language switcher hidden at ≤480px above; menu instance remains visible) */

/* ==========================================================================
   Page: About (migrated from inline in page-about.php)
   ========================================================================== */

.doctor-bio-section { max-width: 1000px; margin: 0 auto; padding: 2rem 0; }
.doctor-bio-section h2 { color: var(--primary-brown); margin-bottom: 2rem; font-size: 2.25rem; text-align: center; }
.doctor-bio-content { display: grid; grid-template-columns: 300px 1fr; gap: 3rem; align-items: start; }
.doctor-image img { width: 100%; border-radius: 1rem; box-shadow: var(--shadow-medium); }
.doctor-bio-text h3 { color: var(--primary-brown); margin-bottom: 1.5rem; font-size: 1.75rem; }
.doctor-bio-text p { color: var(--text-medium); line-height: 1.7; margin-bottom: 1.5rem; font-size: 1.0625rem; }
.doctor-bio-text p:last-child { margin-bottom: 0; }

.about-details { margin: 4rem 0; }
.about-details h2 { text-align: center; color: var(--text-dark); margin-bottom: 3rem; font-size: 2rem; }
.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.detail-card { text-align: center; padding: 1.5rem; border: 2px solid var(--border-gray); border-radius: 0.75rem; transition: all 0.2s ease; background: var(--white); }
.detail-card:hover { border-color: var(--primary-brown); transform: translateY(-2px); box-shadow: var(--shadow-light); }
.detail-card h4 { color: var(--primary-brown); margin-bottom: 0.75rem; font-size: 1.125rem; }
.detail-card p { color: var(--text-medium); line-height: 1.6; }

.about-location { background: var(--off-white); padding: 3rem; border-radius: 1rem; margin-top: 4rem; border: 1px solid var(--border-gray); }
.location-content { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; align-items: start; }
.location-info h2 { color: var(--text-dark); margin-bottom: 1rem; font-size: 2rem; }
.location-info h3 { color: var(--primary-brown); margin-bottom: 1rem; font-size: 1.5rem; }
.location-info p { color: var(--text-medium); margin-bottom: 1rem; line-height: 1.6; }
.location-highlight { background: linear-gradient(135deg, var(--warm-beige) 0%, var(--off-white) 100%); padding: 1.5rem; border-radius: 0.75rem; margin: 1.5rem 0; border-left: 4px solid var(--accent-teal); }
.location-highlight p { margin-bottom: 0.75rem; }
.location-highlight p:last-child { margin-bottom: 0; }
.address { color: var(--text-dark) !important; font-size: 1.125rem; }
.feature-list { margin: 1.5rem 0; }
.feature-item { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.feature-check { color: var(--sage-green); font-weight: 700; font-size: 1.125rem; }
.feature-item span:last-child { color: var(--text-medium); line-height: 1.5; }

/* Opening features wrapper (paragraph + checks) */
.opening-features { margin: 1.25rem 0 0; }

.location-cta { background: var(--white); padding: 2rem; border-radius: 0.75rem; text-align: center; box-shadow: var(--shadow-light); border: 1px solid var(--border-gray); }
.location-cta h4 { color: var(--text-dark); margin-bottom: 1rem; font-size: 1.25rem; }
.location-cta p { color: var(--text-medium); margin-bottom: 1.5rem; line-height: 1.6; }

@media (max-width: 768px) {
    .page-header { padding-top: 470px !important; padding-bottom: 120px; min-height: 48vh; position: relative !important; }
    .page-title { font-size: 2.1rem; }
    .page-subtitle { font-size: 1.2rem; }
    .details-grid { grid-template-columns: 1fr; }
    .location-content { grid-template-columns: 1fr; gap: 2rem; }
    .about-location { padding: 2rem 1.5rem; }
    .doctor-bio-content { grid-template-columns: 1fr; gap: 2rem; }
    .doctor-image { max-width: 300px; margin: 0 auto; }
    .doctor-bio-text h3 { font-size: 1.5rem; }
}

/* ==========================================================================
   Page: Contact (migrated from inline in page-contact.php)
   ========================================================================== */

.contact-section { background-color: var(--off-white); }
.contact-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-bottom: 60px; }
.contact-card { background: var(--white); padding: 30px; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.08); text-align: center; }
.primary-contact { border: 3px solid var(--primary-brown); }
.contact-card h3 { color: var(--primary-brown); margin-bottom: 20px; }
.contact-detail { margin-bottom: 20px; }
.contact-detail h4 { color: var(--primary-brown); margin-bottom: 8px; font-size: 1rem; }
.contact-detail p { margin: 0; line-height: 1.4; }
.phone-link { font-size: 1.3rem; font-weight: 600; color: var(--primary-brown); text-decoration: none; }
.phone-link:hover { color: var(--brown-hover); }
.contact-form-section { max-width: 600px; margin: 0 auto; text-align: center; }
.contact-form-section h2 { color: var(--text-dark); margin-bottom: 15px; }
.contact-form-section p { margin-bottom: 30px; color: var(--text-medium); }
.map-section { padding: 60px 0; background-color: var(--white); }
.map-section h2 { text-align: center; color: var(--text-dark); margin-bottom: 30px; }
.map-container { border-radius: 10px; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.1); margin-bottom: 20px; }
.map-info { text-align: center; }
.map-info p { font-size: 1.1rem; color: var(--text-medium); }
.faq-section { background-color: var(--warm-beige); }
.faq-section h2 { text-align: center; color: var(--text-dark); margin-bottom: 40px; }
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 25px; }
.faq-item { background: var(--white); padding: 25px; border-radius: 8px; box-shadow: 0 3px 15px rgba(0,0,0,0.08); }
.faq-item h4 { color: var(--primary-brown); margin-bottom: 10px; font-weight: 600; }
.faq-item p { margin: 0; line-height: 1.6; color: var(--text-medium); }

@media (max-width: 768px) {
    .contact-info { grid-template-columns: 1fr; }
    .faq-grid { grid-template-columns: 1fr; }
    .map-container { height: 300px; }
}
@media (max-width: 480px) {
    .contact-card { padding: 20px; }
    .phone-link { font-size: 1.1rem; }
}
