/* 
 * Horse Coaching Website - Main Stylesheet
 * Theme: Forest, Horses, Nature, Connection
 */

:root {
    /* Color Palette - Refined Dark Forest Theme */
    --color-primary-dark: #0d1f16;
    /* Deepest Forest Green (Overall Background Base) */
    --color-primary: #4f7965;
    /* Dark Green (Cards/Sections) */
    --color-primary-light: #619580;
    /* Sage Green (Accents) */

    --color-secondary-dark: #3e2723;
    /* Very Dark Chocolate (Alt Backgrounds/Borders) */
    --color-secondary: #4e342e;
    /* Dark Chocolate Brown (Secondary Elements) */
    --color-secondary-light: #6d4c41;
    /* Milk Chocolate (Secondary Buttons) */

    --color-accent-light: #fbd0a2;
    /* Light Yellow (Highlights) */
    --color-accent: #ffb74d;
    /* Warm Amber (Highlights) */
    --color-accent-hover: #ffa726;
    /* Darker Amber */

    --color-text-main: #e0e0e0;
    /* Off-White (Main Text) */
    --color-text-light: #ffffff;
    /* Pure White (Headings/Contrast) */
    --color-text-muted: #b0bec5;
    /* Muted Blue-Grey (Secondary Text) */

    --color-bg-body: #1a2f23;
    /* Lighter Deep Green Background */
    --color-bg-card: #365845;
    /* Slightly Lighter Card Background */
    --color-bg-alt: #281e19;
    /* Dark Chocolate Alt Background */

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    /* Docker container max-width */
    --container-width: 1200px;
}

/* Reset & Base Styles */
html {
    scroll-behavior: smooth;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg-body);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary-dark);
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

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

a:hover {
    color: var(--color-primary-dark);
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header & Navigation */
header {
    background-color: var(--color-primary-dark);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo img {
    height: 40px;
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
    list-style: none;
}

.nav-links a {
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 1.1rem;
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--color-text-muted);
    border-bottom: 2px solid var(--color-primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--color-primary-dark);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-text-light);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--color-accent-light);
    color: var(--color-accent-light);
}

.btn-secondary:hover {
    background-color: var(--color-accent-light);
    color: var(--color-secondary-dark);
}

.btn-accent {
    background-color: var(--color-accent);
    color: var(--color-secondary-dark);
}

.btn-accent:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-success {
    background-color: #4caf50;
    color: white;
}

.btn-success:hover {
    background-color: #43a047;
    color: white;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: #f44336;
    color: white;
}

.btn-danger:hover {
    background-color: #d32f2f;
    color: white;
    transform: translateY(-2px);
}

.btn-edit {
    background-color: #2196f3;
    /* Blue */
    color: white;
}


.btn-edit:hover {
    background-color: #1976d2;
    color: white;
    transform: translateY(-2px);
}

.btn-brown-outline {
    background-color: transparent;
    border: 2px solid #C1A793;
    /* Muted Beige */
    color: #C1A793;
}

.btn-brown-outline:hover {
    background-color: #C1A793;
    color: var(--color-secondary-dark);
    /* Dark text on beige hover */
    transform: translateY(-2px);
}

/* Footer */
footer {
    background-color: var(--color-primary-dark);
    color: var(--color-text-light);
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    margin-top: 2rem;
    /* Reduced from spacing-xl */
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

.footer-column h3 {
    color: var(--color-accent-light);
    margin-bottom: var(--spacing-md);
}

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

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: #cccccc;
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    text-align: center;
    font-size: 0.9rem;
    color: #999;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Hide for now, will implement mobile menu handling later */
    }

    .mobile-menu-btn {
        display: block;
    }

    h1 {
        font-size: 2rem;
    }

    .btn {
        width: 100%;
        margin-bottom: var(--spacing-sm);
    }
}

/* Booking Page Styles */
.page-header {
    background-color: var(--color-primary-dark);
    color: var(--color-text-light);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.booking-container {
    padding: var(--spacing-md) 0 var(--spacing-xl);
    /* Reduced top padding */
    background-color: var(--color-bg-body);
}

.booking-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-md);
}

.booking-card h2 {
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-control,
.form-select {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-primary-light);
    border-radius: var(--radius-sm);
    color: var(--color-text-main);
    font-family: inherit;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(255, 183, 77, 0.2);
}

/* Subscription Selection UI */
.subscription-meta-box {
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.subscription-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.subscription-hint {
    display: block;
    margin-top: 0.25rem;
    opacity: 0.8;
}

.hidden {
    display: none !important;
}

.checkbox-group {
    display: grid;
    grid-template-columns: 22px 1fr;
    column-gap: 12px;
    align-items: start;
    margin-top: 12px;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--color-accent);
}

.text-danger {
    color: #ef5350;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Small Hero Variant */
.hero.hero-small {
    min-height: 30vh;
}

.hero.hero-small h1 {
    color: var(--color-accent);
}

.hero.hero-small p {
    color: var(--color-accent-light);
    /* Slightly lighter for contrast? Or just amber? User said "text color should be amber". */
}

/* Newsletter Box (Philosophy Section) */
.philosophy .container {
    position: relative;
    /* For absolute positioning of newsletter box within container */
}

.newsletter-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    background-color: var(--color-bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-primary-light);
    z-index: 10;
    text-align: center;
}

.newsletter-box h3 {
    color: var(--color-accent);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.newsletter-box p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

@media (max-width: 1200px) {
    .newsletter-box {
        position: static;
        width: 100%;
        max-width: 400px;
        margin: 0 auto 2rem;
    }
}

/* Newsletter Banner (Floating Box Style) */
/* Newsletter Banner (Floating Box Style) */
.newsletter-banner {
    background-color: transparent;
    padding: var(--spacing-md) 0;
    /* Reduced from lg to md */
    border-bottom: none;
}

.newsletter-content {
    background-color: var(--color-bg-card);
    /* Lighter green box */
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-lg) var(--spacing-xl);
    /* Reduced vertical padding */
    border: 1px solid var(--color-primary-light);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
}

.newsletter-text {
    flex: 1;
    min-width: 300px;
}

.newsletter-text h2 {
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    text-align: left;
}

.newsletter-form-container {
    flex: 1;
    min-width: 300px;
}

.newsletter-simple-form {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.newsletter-simple-form .form-group {
    margin-bottom: 0;
    flex-grow: 1;
}

.newsletter-simple-form .form-control {
    margin-top: 0;
    /* Remove default margin since there's no label */
}

.newsletter-simple-form .checkbox-group {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Philosophy Section alignments */
.philosophy-text h2 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    /* Doubled from sm (0.5rem) to lg (2rem) */
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-text-muted);
}

@media (max-width: 768px) {
    .newsletter-simple-form {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Hero Banner Centering */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Layered Hero Styles */
.hero-layered {
    position: relative;
    width: 100%;
    min-height: 60vh;
    /* Adjust as needed */
    overflow: hidden;
    display: flex;
    align-items: center;
    /* Vertically center content */
    justify-content: center;
    color: var(--color-text-light);
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.hero-layer-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Background covers the whole section */
    background-size: cover;
    background-position: top center;
    z-index: 1;
}

/* Gradient overlay for readability */
.hero-layer-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(26, 47, 35, 0.4), rgba(26, 47, 35, 0.4));
    /* Match the theme's dark green tint */
}


.hero-layer-left,
.hero-layer-right {
    position: absolute;
    bottom: 0;
    height: 100%;
    /* Scale to banner height */
    width: 50%;
    /* Start with 50% width, but background-size contain/cover might be better */
    background-repeat: no-repeat;
    background-position: bottom;
    background-size: contain;
    /* Keep aspect ratio */
    z-index: 2;
    pointer-events: none;
    /* Let clicks pass through to buttons */
}

.hero-layer-left {
    left: 0;
    background-position: bottom left;
}

.hero-layer-right {
    right: 0;
    background-position: bottom right;
}

.hero-content {
    position: relative;
    z-index: 3;
    /* Above all images */
    padding: var(--spacing-xl) var(--spacing-md);
    max-width: 800px;
    /* Constrain text width */
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-accent);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Enhance readability */
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .hero-layered {
        min-height: 50vh;
    }

    /* On mobile, we might want to let the background take over or stack differently */
    .hero-layer-left,
    .hero-layer-right {
        opacity: 0.6;
        /* Fade side images so text is readable if they overlap */
        width: 40%;
        /* distinct from desktop */
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}



/* Small Variant for Layered Hero */
.hero-layered.hero-small {
    min-height: 40vh;
}

.hero-layered.hero-small .hero-layer-bg {
    background-position: center;
}

.hero-layered.hero-small .hero-content h1 {
    font-size: 3rem;
}

.hero-layered.hero-small .hero-content p {
    font-size: 1.15rem;
    max-width: 700px;
}

@media (max-width: 768px) {
    .hero-layered.hero-small {
        min-height: 30vh;
    }

    .hero-layered.hero-small .hero-content h1 {
        font-size: 2rem;
    }
}

/* Form Actions Spacing */
.form-actions {
    margin-top: var(--spacing-lg);
    width: 100%;
}

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

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

.modal-content {
    background-color: var(--color-bg-card);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-primary-light);
}

.modal-header {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--color-accent);
}

.close-modal {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.close-modal:hover {
    color: var(--color-text-light);
}

.modal-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-main);
}

.modal-trigger {
    color: var(--color-accent);
    text-decoration: underline;
    cursor: pointer;
}

.modal-trigger:hover {
    color: var(--color-accent-hover);
}

/* How it Works Full Width Section */
.how-it-works-section {
    background-color: var(--color-bg-card);
    /* Darker shade */
    padding: var(--spacing-lg) 0;
    margin-bottom: var(--spacing-md);
    /* Reduced bottom spacing (half of lg) */
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.how-it-works-steps {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    /* Ensure equal height */
    gap: var(--spacing-lg);
    text-align: center;
}

.step-item {
    flex: 1;
    display: flex;
    /* For link filling */
    flex-direction: column;
}

/* Clickable Column Styles */
.step-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    /* Prevent layout shift on border hover if used */
}

.step-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 255, 255, 0.1);
}

.step-link h2 {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.step-link:hover h2 {
    color: var(--color-accent);
}

.step-link p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

/* Booking Intro Text */
.booking-intro-text {
    font-family: var(--font-heading);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    color: var(--color-text-main);
}

@media (max-width: 768px) {
    .how-it-works-steps {
        flex-direction: column;
    }

    .step-item {
        margin-bottom: var(--spacing-lg);
        padding: 0;
    }

    .step-item:last-child {
        margin-bottom: 0;
    }
}

/* Coaching Options Highlight */
.coaching-options {
    background-color: rgba(255, 255, 255, 0.05);
    /* Slightly lighter/different shade */
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hidden {
    display: none;
}

/* Testimonials Grid */
.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Fixed 2 columns */
    gap: var(--spacing-xl);
    margin-top: var(--spacing-lg);
    text-align: center;
    /* Centered text for cleaner look without boxes */
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.testimonial-card {
    padding: var(--spacing-md);
    /* Reduced padding */
    /* No background or border */
    background: transparent;
    border: none;
}

.testimonial-card p {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 0;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

/* Testimonials Section */
.testimonials {
    padding-top: var(--spacing-lg);
    /* Reduced padding to 2rem */
    padding-bottom: var(--spacing-md);
    /* Reduced to 1rem to compensate for card padding (total 2rem) */
    background-color: var(--color-bg-body);
}

/* Unified Title Styling (User Request: Centered & Light Amber) */
.philosophy-text h2,
.blog-content h2,
.coaching-text h2,
.about-text h2 {
    text-align: center;
    color: var(--color-accent);
    font-family: var(--font-heading);
}

.blog-content h2 {
    font-size: 1.75rem;
    margin-top: 0;
}


/* Admin Panel Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    color: var(--color-text-main);
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th {
    font-weight: bold;
    color: var(--color-accent);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.data-table tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.admin-card {
    /* Optional: if additional card styling is needed inside the main card */
    width: 100%;
}


/* Robust Override for Title Styling */
.philosophy-text h2,
.blog-content h2,
.about-text h2 {
    color: var(--color-accent-light) !important;
    text-align: center !important;
}

.coaching-text h2 {
    color: var(--color-accent-light) !important;
    text-align: left !important;
}

/* Admin Search Form Styling */
/* Admin Search Form Styling */
/* Admin Search Form Styling */
.admin-search-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    /* Center items vertically */
    flex: 1;
    max-width: 400px;
}

.admin-search-form input[type="hidden"] {
    display: none !important;
}

.admin-search-form .form-control {
    margin: 0 !important;
    /* Force reset all margins */
    height: 42px !important;
    /* Force exact height */
    min-height: 42px !important;
    padding: 0.375rem 0.75rem;
    box-sizing: border-box;
}

.admin-search-form .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    height: 42px !important;
    /* Force exact height */
    min-height: 42px !important;
    padding: 0 1rem;
    margin: 0 !important;
    /* Force reset all margins */
    box-sizing: border-box;
}

/* Dynamic Section Styles - Global Cycle */
.style-1 {
    background-color: var(--color-bg-body);
    /* Dark Green Base */
}

.style-2 {
    background-color: var(--color-bg-card);
    /* Slightly Lighter Green */
}

.style-3 {
    background-color: var(--color-bg-alt);
    /* Dark Chocolate background */
}

/* Ensure sections span full width for background color to show */
.dynamic-section {
    padding: var(--spacing-xl) 0;
    width: 100%;
}

/* Series Availability Warning Box */
.series-warning-box {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background-color: rgba(255, 183, 77, 0.1);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-md);
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

.series-warning-box strong {
    color: var(--color-accent);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.warning-instruction {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 183, 77, 0.2);
    font-style: italic;
    opacity: 0.9;
}
/* Mobile fixes */
@media (max-width: 768px) {
  .newsletter-banner {
    padding: 2rem 1rem;
  }

  .newsletter-content {
    display: block !important;
    width: 100%;
  }

  .newsletter-form-container {
    width: 100%;
    max-width: 100%;
  }

  .newsletter-simple-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }

  .newsletter-simple-form .form-group,
  .newsletter-simple-form input[type="text"],
  .newsletter-simple-form input[type="email"],
  .newsletter-simple-form .form-control {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .newsletter-simple-form .btn,
  .newsletter-simple-form button {
    width: 100%;
    max-width: 100%;
  }

  .checkbox-group {
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* Dashboard mobile layout fixes */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    box-sizing: border-box;
  }

  .admin-card {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .stats-grid,
  .dashboard-stats {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  .stat-card {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 0.75rem !important;
  }

  .admin-card table,
  .data-table {
    min-width: 640px;
  }

  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .admin-card h1,
  .admin-card h2 {
    font-size: 1.8rem !important;
    word-break: break-word;
  }
}

/* Admin mobile fixes */
@media (max-width: 768px) {
  .admin-card,
  .dashboard-card,
  .modal-content {
    width: calc(100vw - 2rem) !important;
    max-width: calc(100vw - 2rem) !important;
    margin: 1rem auto !important;
    padding: 1rem !important;
    box-sizing: border-box;
  }

  .admin-header,
  .admin-actions,
  .calendar-controls,
  .form-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    align-items: stretch !important;
  }

  .admin-header .btn,
  .admin-actions .btn,
  .calendar-controls .btn,
  .form-actions .btn {
    width: 100% !important;
  }

  .data-table,
  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
  }

  .form-row,
  .booking-form,
  .admin-form {
    display: block !important;
  }

  .form-group,
  .form-control,
  textarea,
  select,
  input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  #calendar {
    min-height: 520px !important;
    overflow-x: auto;
  }

  .fc .fc-toolbar {
    flex-direction: column;
    gap: 0.75rem;
  }

  .fc .fc-toolbar-title {
    font-size: 1.25rem;
  }
}

/* Mobile navigation fix */
@media (max-width: 768px) {
  .navbar {
    position: relative;
  }

  .mobile-menu-btn {
    display: block !important;
    background: transparent;
    border: 1px solid var(--color-accent);
    color: var(--color-text-main);
    font-size: 1.8rem;
    line-height: 1;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    cursor: pointer;
    margin-left: auto;
    z-index: 2000;
  }

  .nav-links {
    display: none !important;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column !important;
    background: var(--color-bg-header, #071f15);
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    z-index: 1999;
  }

  .nav-links.open {
    display: flex !important;
  }

  .nav-links li,
  .nav-links a {
    width: 100%;
    display: block;
    text-align: left;
  }
}

/* Mobile navigation toggle */
@media (max-width: 768px) {
  .navbar {
    position: relative;
  }

  .mobile-menu-btn {
    display: block !important;
    color: var(--color-accent) !important;
    border: 1px solid var(--color-accent) !important;
    background: transparent !important;
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    font-size: 1.6rem;
    line-height: 1;
    margin-left: auto;
    z-index: 3000;
  }

  .nav-links {
    display: none !important;
  }

  .nav-links.open {
    display: flex !important;
    flex-direction: column !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-primary-dark);
    padding: 1rem;
    gap: 1rem;
    z-index: 2999;
    border-top: 1px solid rgba(255,255,255,0.15);
  }

  .nav-links.open li,
  .nav-links.open a {
    width: 100%;
    display: block;
  }
}

/* Strong newsletter mobile overflow fix */
@media (max-width: 768px) {
  .newsletter-banner,
  .newsletter-banner .container,
  .newsletter-content,
  .newsletter-text,
  .newsletter-form-container,
  .newsletter-simple-form {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .newsletter-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem !important;
  }

  .newsletter-simple-form {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .newsletter-simple-form > div {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 0 1 auto !important;
    box-sizing: border-box !important;
  }

  .newsletter-simple-form input,
  .newsletter-simple-form .form-control,
  .newsletter-simple-form button {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .newsletter-simple-form .checkbox-group {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    align-items: start !important;
    width: 100% !important;
  }

  .newsletter-simple-form .checkbox-group label {
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }
}


/* Booking consent checkbox alignment */
@media (max-width: 768px) {
    .booking-form .checkbox-group {
        display: grid !important;
        grid-template-columns: 22px 1fr !important;
        column-gap: 12px !important;
        align-items: start !important;
    }

    .booking-form .checkbox-group input[type="checkbox"] {
        width: 22px !important;
        height: 22px !important;
        margin: 4px 0 0 0 !important;
    }

    .booking-form .checkbox-group label {
        display: block !important;
        line-height: 1.45 !important;
        margin: 0 !important;
        text-align: left !important;
    }
}

/* Dashboard stats responsive */
@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Anchor offset for fixed header */
#service-4,
#service-5,
#service-6 {
    scroll-margin-top: 140px;
}
