/* General Styles */
:root {
    --bg-color-dark: #1a1a1a;
    --text-color-dark: #f0f0f0;
    --accent-color-dark: #e74c3c;
    --accent-color-hover-dark: #c0392b;
    --navbar-bg-dark: rgba(20, 20, 20, 0.9);
    --navbar-border-dark: #333;
    --card-bg-dark: #222;
    --card-shadow-dark: rgba(0, 0, 0, 0.2);
    --text-muted-dark: #ccc;
    --button-text-dark: #fff;

    --bg-color-light: #f4f4f8;
    --text-color-light: #333333;
    --accent-color-light: #d9534f; /* A slightly different red for light theme */
    --accent-color-hover-light: #c9302c;
    --navbar-bg-light: rgba(240, 240, 240, 0.95);
    --navbar-border-light: #ddd;
    --card-bg-light: #ffffff;
    --card-shadow-light: rgba(0, 0, 0, 0.1);
    --text-muted-light: #555;
    --button-text-light: #fff;

    /* Default to dark theme variables */
    --bg-color: var(--bg-color-dark);
    --text-color: var(--text-color-dark);
    --accent-color: var(--accent-color-dark);
    --accent-color-hover: var(--accent-color-hover-dark);
    --navbar-bg: var(--navbar-bg-dark);
    --navbar-border: var(--navbar-border-dark);
    --card-bg: var(--card-bg-dark);
    --card-shadow: var(--card-shadow-dark);
    --text-muted: var(--text-muted-dark);
    --button-text: var(--button-text-dark);
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-theme {
    --bg-color: var(--bg-color-light);
    --text-color: var(--text-color-light);
    --accent-color: var(--accent-color-light);
    --accent-color-hover: var(--accent-color-hover-light);
    --navbar-bg: var(--navbar-bg-light);
    --navbar-border: var(--navbar-border-light);
    --card-bg: var(--card-bg-light);
    --card-shadow: var(--card-shadow-light);
    --text-muted: var(--text-muted-light);
    /* --button-text can remain the same or be adjusted if needed */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Add padding to main content sections to avoid navbar overlap */
section.content {
    padding-top: 80px; /* Adjust based on actual navbar height */
    padding-bottom: 3rem;
}

/* Base container */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

h1, h2 {
    font-family: 'Arial Black', Gadget, sans-serif;
    font-weight: bold;
    margin-bottom: 1rem;
    /* color will be inherited or set by specific rules */
}

/* Specific page titles */
.nosotros-page h1,
.programas-page h1,
.juramento-page h1, /* Will be removed/updated */
.historia-page h1,
.contacto-page h1,
.galeria-page h1 {
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

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

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Respeto a usuarios con reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Navbar */
.navbar {
    background-color: var(--navbar-bg);
    padding: 1rem 0;
    position: fixed; /* Fixed position */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--navbar-border);
    transition: background-color 0.3s ease, border-bottom-color 0.3s ease;
}
.navbar.scrolled {
    padding: 0.6rem 0;
    background-color: var(--navbar-bg);
    backdrop-filter: saturate(180%) blur(8px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    display: flex;
    align-items: center;
    color: var(--text-color); /* Use theme text color */
}

.navbar-logo img {
    height: 40px; /* Adjust logo size */
    margin-right: 10px;
    border-radius: 50%; /* If logo is circular */
}

.navbar-logo span {
    font-size: 1.4rem;
    font-weight: bold;
}

.navbar-collapse {
    display: flex;
    align-items: center;
}

.navbar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.navbar-nav li {
    margin-left: 25px;
}

.navbar-nav a {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    padding-bottom: 5px;
    position: relative;
}

.navbar-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--accent-color);
}

.navbar-nav a:hover::after,
.navbar-nav a.active::after {
    transform: scaleX(1);
}

/* Hamburger Menu Button - Hidden by default */
.navbar-toggler {
    display: none;
    background: none;
    border: 1px solid var(--text-muted);
    color: var(--text-color);
    font-size: 1.5rem;
    padding: 0.35rem 0.65rem;
    border-radius: 5px;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.navbar-toggler:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Theme Toggle Button */
.theme-toggle-button {
    background: none;
    border: 1px solid var(--text-muted);
    color: var(--text-color);
    font-size: 1.2rem;
    padding: 0.5rem 0.7rem;
    border-radius: 5px;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease;
    margin-left: 20px; /* Space it from the nav links */
}

.theme-toggle-button:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.theme-toggle-button i {
    transition: transform 0.3s ease;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 90vh; /* Adjust height as needed */
    min-height: 500px;
    width: 100%;
    overflow: hidden;
    margin-top: 70px; /* Adjust based on navbar height - ensure this is consistent or calculated */
}

/* Degradado para mejorar legibilidad del hero */
.hero-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.45) 50%, rgba(0,0,0,0.65) 100%);
    pointer-events: none;
}

.carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-color: #000; /* Fallback background */
}

.carousel-item.active {
    opacity: 1;
    z-index: 1;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area, might crop */
    object-position: center center; /* Adjust as needed, try 'top center' if top is cut */
}

/* Hero Overlay */
.hero-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    background-color: rgba(0, 0, 0, 0.4); /* Slight dark overlay for text visibility */
    padding: 2rem 3rem;
    border-radius: 8px;
}

.hero-overlay h1 {
    font-size: 3rem; /* Responsive font size */
    margin-bottom: 1.5rem;
    color: var(--accent-color); /* Cambiado a rojo para mantener coherencia con otros títulos */
    transition: color 0.3s ease;
}

.hero-overlay h1:hover {
    color: var(--accent-color); /* Red on hover */
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--button-text);
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 5px;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
    background-color: var(--accent-color-hover);
    color: var(--button-text);
    transform: scale(1.05);
}

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

.cta-button.secondary:hover {
    background-color: var(--accent-color);
    color: var(--button-text);
}

/* Intro Section */
.intro-section {
    padding: 4rem 0;
    background-color: var(--card-bg); /* Use card-bg for sections like this */
    text-align: center;
    transition: background-color 0.3s ease;
}

.intro-section h2 {
    color: var(--text-color);
    font-size: 2rem;
}

.intro-section p {
    max-width: 700px;
    margin: 0 auto 1rem auto;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* About Us Page */
/* About Us Page Layout Correction */
.about-section {
    padding-top: 80px; /* Add padding to prevent navbar overlap */
    padding-bottom: 4rem; /* Add space before the footer */
}

.about-section .container {
    display: block; /* Change from flex to block for nosotros.html */
    text-align: center;
}

.about-section h1 {
    color: var(--accent-color); /* Match other page titles */
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem; /* Match other page title sizes */
}

.about-text {
    flex: 1 1 50%;
    min-width: 300px;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.about-image {
    flex: 1 1 40%;
    min-width: 280px;
    text-align: center;
}

.about-image img {
    border-radius: 10px;
    box-shadow: 0 8px 20px var(--card-shadow);
}

.school-description {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-muted);
}

.main-instructor-profile {
    display: flex;
    justify-content: center;
}

.main-instructor-profile .instructor-profile {
    max-width: 500px; /* Limit the width of the main profile card */
    flex-grow: 1;
}

.instructor-profile {
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--card-shadow);
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.instructor-profile:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--card-shadow);
}

.instructor-profile img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem auto;
    border: 4px solid var(--accent-color);
}

.instructor-photos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.instructor-photos .instructor-img {
    margin: 0;
    object-position: center top;
}

.instructor-photos .instructor-img--offset {
    object-position: center 35%;
}

.instructor-profile h2, .instructor-profile h3 {
    color: var(--accent-color);
    margin: 1rem 0 0.5rem;
    font-size: 1.5rem;
}

.instructor-profile p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Grid for other instructors */
.instructors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    margin-bottom: 4rem; /* Added margin to separate from footer */
}

.instructors-grid .instructor-profile {
    margin-top: 0; /* Reset margin top for grid items */
}

.instructors-grid h3 {
    font-size: 1.5rem; /* Slightly smaller heading for grid items */
}

.instructors-grid-title {
    text-align: center;
    color: var(--accent-color);
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
}

/* Programas Page */
.program-section {
    padding-top: 80px; /* Add padding to prevent navbar overlap */
    text-align: center;
}

.program-section h1 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.program-section p {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

/* Free Class Banner */
.free-class-banner {
    margin-top: 4rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: var(--card-bg);
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 15px var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.free-class-banner h3 {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.free-class-banner p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
}

.free-class-banner .cta-button {
    display: inline-block;
    margin: 1rem 0;
}

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

.schedule-block {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--card-shadow);
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.schedule-block:hover {
    transform: translateY(-5px);
}

.schedule-block h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.schedule-block p {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-color);
    margin: 0.5rem 0;
}

/* Contacto Page */
.contact-section {
    padding-top: 80px;
    padding-bottom: 2rem;
}

.contact-section h1 {
    text-align: center;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.contact-container {
    display: flex;
    justify-content: center; /* Center the remaining column */
    gap: 2rem;
    align-items: flex-start;
}

.contact-info-map {
    flex: 0 1 600px; /* Allow it to grow but not exceed 600px */
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--card-shadow);
}

.contact-info-map h2 {
    color: var(--accent-color);
    margin-top: 0;
    margin-bottom: 1.5rem;
    transition: background-color 0.3s ease;
}

.contact-button:hover {
    background-color: var(--accent-color-hover);
}

.map-container {
    width: 100%;
    height: 300px; /* Adjust as needed */
    border-radius: 8px;
    overflow: hidden; /* Ensures iframe respects border-radius */
    margin-bottom: 1.5rem;
}

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

.whatsapp-button {
    display: inline-block;
    background-color: #25D366; /* WhatsApp Green */
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    text-align: center;
}

.whatsapp-button i {
    margin-right: 8px;
}

.whatsapp-button:hover {
    background-color: #1DAE50; /* Darker WhatsApp Green */
    color: #fff;
}

/* Galeria Page */
.gallery-section {
    padding-top: 80px; /* Add padding to prevent navbar overlap */
    text-align: center;
}

.gallery-section h1 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

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

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--card-shadow);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 4 / 3;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 12px var(--card-shadow);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Lightbox Styles */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.85); /* Darker overlay */
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: auto;
    max-width: 80%;
    max-height: 80%;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-content img {
    display: block;
    margin: auto;
    max-width: 100%;
    max-height: 100%;
    border-radius: 5px;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--accent-color);
    text-decoration: none;
}

.lightbox-prev, .lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 2rem;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    cursor: pointer;
    z-index: 2100;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-caption {
    position: fixed;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0,0,0,0.5);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    z-index: 2100;
    max-width: 80vw;
    text-align: center;
}

/* Footer Styles */
.footer {
    background-color: #111; /* Even darker for footer */
    color: #aaa;
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--navbar-border);
    font-size: 0.9rem;
    transition: background-color 0.3s ease, border-top-color 0.3s ease;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-info {
    flex-basis: 60%;
    text-align: left;
}

.footer-info p {
    margin: 0.3rem 0;
}

.footer-social {
    flex-basis: 15%;
    text-align: right;
}

.footer-social a {
    color: #aaa;
    margin-left: 15px;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

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

.footer-kenpo-logo {
    align-self: center;
}

.footer-kenpo-logo img {
    height: 60px; /* Adjust as needed */
    opacity: 0.8;
}

/* Placeholder for Juramento Page specific styles */
.juramento-page .content {
    padding: 8rem 0 4rem 0; /* Add padding top to account for fixed navbar */
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.juramento-page .ed-parker-img {
    max-width: 300px;
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.juramento-page h1 {
    color: var(--accent-color); /* Accent color for title */
    margin-bottom: 2rem;
}

.juramento-page pre {
    white-space: pre-wrap; /* Wrap text */
    word-wrap: break-word;
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 5px;
    text-align: left;
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* Historia Page Specific Styles */
.historia-page .content .container > h1 {
    color: var(--accent-color); /* Red accent for main titles on specific pages */
    text-align: center;
    margin-bottom: 2.5rem; /* Increased margin for main title */
    font-size: 2.8rem;
}

.historia-section {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--card-shadow);
    transition: background-color 0.3s ease;
}

.historia-section h2 {
    color: var(--accent-color); /* Red accent for section titles */
    margin-bottom: 1rem;
    font-size: 2rem;
    border-bottom: 2px solid var(--navbar-border);
    padding-bottom: 0.5rem;
    text-align: center; /* Center the titles */
}

.historia-section h3 {
    color: var(--text-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.historia-section p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.historia-section p:last-child {
    margin-bottom: 0;
}

/* Layout for Ed Parker section */
.historia-ed-parker-container {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 2rem;
    align-items: flex-start; /* Align items to the top */
    margin-top: 1.5rem;
}

.historia-ed-parker-img-container {
    flex: 1 1 300px; /* Flex basis of 300px, can grow and shrink */
    max-width: 350px;
    margin: 0 auto; /* Center image if it wraps */
}

.historia-ed-parker-img-container img.ed-parker-img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--card-shadow);
}

.historia-ed-parker-bio {
    flex: 2 1 500px; /* Takes more space */
}

.historia-ed-parker-bio h3 {
    margin-top: 0; /* Remove top margin as it's inside a flex item */
    color: var(--accent-color);
}

/* Two-column layout for certain sections */
.historia-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.historia-column {
    flex: 1 1 45%; /* Each column takes roughly half, allows wrapping */
    min-width: 300px; /* Minimum width before wrapping */
}

/* Visual Separator */
.historia-separator {
    height: 2px;
    background-color: var(--accent-color);
    border: none;
    margin: 2.5rem auto;
    width: 50%;
    opacity: 0.7;
}

/* Responsive adjustments for historia page if needed */
@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap; /* Allow wrapping for logo and toggler */
    }

    .navbar-toggler {
        display: block; /* Show hamburger button */
        order: 1; /* Ensure it's after the logo if flex-wrap occurs */
        margin-left: auto; /* Push it to the right, opposite the logo */
    }

    .navbar-collapse {
        display: none; /* Hide nav links and theme toggle by default on mobile */
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        background-color: var(--navbar-bg); /* Give it a background when expanded */
        position: absolute;
        top: 100%; /* Position below the navbar header part */
        left: 0;
        right: 0;
        padding: 1rem 0; /* Add some padding */
        border-top: 1px solid var(--navbar-border);
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .navbar-collapse.active {
        display: flex; /* Show when active */
    }

    .navbar-nav ul {
        flex-direction: column; /* Stack links vertically */
        width: 100%;
    }

    .navbar-nav li {
        margin-left: 0;
        width: 100%;
    }

    .navbar-nav a {
        display: block;
        padding: 0.8rem 5%; /* Adjust padding (5% of container width) */
        border-bottom: 1px solid var(--navbar-border); /* Separator for links */
    }

    .navbar-nav a:hover,
    .navbar-nav a.active {
        border-bottom-color: var(--accent-color); /* Keep hover/active style */
        background-color: rgba(0,0,0,0.05); /* Slight background for active/hover link */
    }
    .light-theme .navbar-nav a:hover,
    .light-theme .navbar-nav a.active {
        background-color: rgba(255,255,255,0.1);
    }

    .navbar-nav li:last-child a {
        border-bottom: none;
    }

    .theme-toggle-button {
        margin-top: 1rem; /* Space above theme toggle button in mobile menu */
        margin-left: 5%; /* Align with nav links */
        align-self: flex-start;
    }

    .hero-section {
        height: 70vh;
        margin-top: 60px; /* Adjust if navbar height changes on mobile */
    }

    .hero-overlay h1 {
        font-size: 1.8rem;
        padding: 0 1rem;
    }

    .cta-button {
        font-size: 1rem;
        padding: 10px 20px;
    }

    .intro-section h2,
    .historia-section h2 {
        font-size: 1.8rem;
    }

    .contact-section .container,
    .about-section .container {
        flex-direction: column;
    }

    .instructors-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-info,
    .footer-social {
        flex-basis: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }

    .footer-social a {
        margin: 0 10px;
    }

    /* Contact section stacks on mobile */
    .contact-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .contact-info-map {
        flex: 1 1 auto;
        width: 100%;
    }
    .contact-info-map, .contact-form {
        padding: 1rem;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero-overlay h1 {
        font-size: 1.5rem;
    }
    
    .cta-button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .instructor-profile img {
        width: 120px;
        height: 120px;
    }
    
    .instructor-profile h2 {
        font-size: 1.5rem;
    }
    
    .instructors-grid-title {
        font-size: 1.6rem;
    }
    
    .free-class-banner h3 {
        font-size: 1.3rem;
    }
}

/* Historia Page Styles */
.historia-section {
    margin-bottom: 3rem;
    text-align: center;
}

.historia-separator {
    margin: 2rem auto;
    border: 0;
    border-top: 1px solid var(--navbar-border);
    width: 80%;
}

.kenpo-quote {
    background-color: var(--card-bg);
    border-left: 5px solid var(--accent-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    border-radius: 5px;
    box-shadow: 0 3px 8px var(--card-shadow);
}

.kenpo-quote p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.kenpo-quote footer {
    text-align: right;
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1rem;
}

.historia-section h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .kenpo-quote {
        padding: 1rem;
    }
    
    .kenpo-quote p {
        font-size: 1rem;
    }
}
