@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Bebas+Neue&display=swap');

:root {
    --color-white: #ffffff;
    --color-black: #000000;
    --color-orange: #f54e2c;
    --color-red: #4ba34c;
    --color-gray: #333333;
    --color-light-gray: #ffffff;
    --color-dark-blue: #3c853d;
    --fuente-principal: 'Montserrat', sans-serif;
    --fuente-secundaria: 'Bebas Neue', cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: linear-gradient(to bottom, #ffffff, var(--color-dark-blue));
    color: var(--color-black);
    font-family: var(--fuente-principal);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ═══════════════════════════════════════
   HEADER / NAVBAR
═══════════════════════════════════════ */
.header {
    background: var(--color-white);
    border-bottom: 2px solid var(--color-red);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    height: 80px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    flex-wrap: nowrap;
    position: relative;
}

.logo-container { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }

.logo {
    width: 60px; height: 60px;
    background: var(--color-white);
    border: 2px solid var(--color-red);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    overflow: hidden; cursor: pointer;
    transition: 0.3s ease; flex-shrink: 0;
}
.logo:hover { transform: rotate(360deg) scale(1.1); }
.logo img { width: 100%; height: 100%; object-fit: cover; }

.club-name {
    font-family: var(--fuente-secundaria);
    font-size: 1.8rem;
    color: var(--color-black);
    text-transform: uppercase;
    white-space: nowrap;
}

.nav-links { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

.nav-links a {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    color: var(--color-gray);
    text-transform: uppercase;
    display: flex; align-items: center; justify-content: center;
    min-width: 120px; height: 45px;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap;
}
.nav-links a:hover { background: rgba(245,78,44,0.12); color: var(--color-orange); }
.nav-links a.active {
    background: var(--color-orange);
    color: var(--color-white);
    box-shadow: 0 4px 14px rgba(245,78,44,0.35);
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px; height: 40px;
    background: none; border: none;
    cursor: pointer; padding: 4px;
    border-radius: 8px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}
.hamburger:hover { background: rgba(0,0,0,0.06); }
.hamburger span {
    display: block; width: 24px; height: 2.5px;
    background: var(--color-gray);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ═══════════════════════════════════════
   MAIN / LAYOUT
═══════════════════════════════════════ */
.services-main { flex: 1; max-width: 1200px; margin: 0 auto; padding: 2rem; width: 100%; }
.page-title { font-family: var(--fuente-secundaria); font-size: 3rem; text-align: center; margin-bottom: 0.5rem; color: var(--color-black); text-transform: uppercase; }
.page-subtitle { text-align: center; font-size: 1.2rem; color: var(--color-gray); margin-bottom: 2rem; }

.services-container { display: grid; grid-template-columns: 350px 1fr; gap: 2rem; min-height: 600px; margin-top: 2rem; }

/* ═══════════════════════════════════════
   MENÚ LATERAL
═══════════════════════════════════════ */
.services-nav {
    background: var(--color-white);
    border-radius: 12px; padding: 1.5rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    height: fit-content;
    position: sticky; top: 100px;
    border-left: 5px solid var(--color-red);
}
.services-menu { display: flex; flex-direction: column; gap: 0.5rem; }
.category { border-radius: 8px; overflow: hidden; border: 2px solid transparent; transition: all 0.3s; }
.category.active { border-color: var(--color-red); box-shadow: 0 4px 15px rgba(0,44,139,0.2); }
.category-header {
    background: linear-gradient(135deg, #4ba34c 0%, #00704b 100%);
    color: var(--color-white);
    padding: 1rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; transition: all 0.3s;
}
.category-header:hover { background: linear-gradient(135deg, #00704b 0%, #4ba34c 100%); transform: translateX(5px); }
.category-header i:first-child { font-size: 1.2rem; margin-right: 0.8rem; }
.category-header span { font-size: 1.1rem; font-weight: 600; flex-grow: 1; }
.category-header .arrow { transition: transform 0.3s; }
.category.active .category-header .arrow { transform: rotate(90deg); }

.subcategories { max-height: 0; overflow: hidden; background: #f5f5f5; transition: max-height 0.5s cubic-bezier(0.4,0,0.2,1); }
.category.active .subcategories { max-height: 500px; }
.subcategory {
    padding: 0.8rem 1.5rem 0.8rem 3rem;
    cursor: pointer; border-bottom: 1px solid #ddd;
    transition: all 0.3s; position: relative;
    color: var(--color-gray);
}
.subcategory:last-child { border-bottom: none; }
.subcategory:hover { background: rgba(0,0,0,0.06); padding-left: 3.5rem; color: var(--color-red); }
.subcategory::before { content: '›'; position: absolute; left: 2rem; color: var(--color-red); font-size: 1.2rem; transition: transform 0.3s; }
.subcategory:hover::before { transform: translateX(3px); }
.subcategory.active { background: var(--color-red); color: var(--color-white); }
.subcategory.active::before { color: var(--color-white); }

/* ═══════════════════════════════════════
   PANEL DERECHO
═══════════════════════════════════════ */
.service-display {
    background: var(--color-white); border-radius: 12px; padding: 2rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border-left: 5px solid var(--color-red);
    min-height: 600px; position: relative;
}
.service-default { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 500px; }
.default-content { text-align: center; color: var(--color-gray); padding: 2rem; }
.default-icon { font-size: 4rem; color: #bdc3c7; margin-bottom: 1rem; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.default-content h2 { font-family: var(--fuente-secundaria); font-size: 2rem; margin-bottom: 1rem; color: var(--color-black); text-transform: uppercase; }
.default-content p { font-size: 1.1rem; line-height: 1.6; max-width: 400px; margin: 0 auto; }

.service-content { display: none; width: 100%; }
.service-content.active { display: block; animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.service-title {
    font-family: var(--fuente-secundaria);
    font-size: 2.5rem; color: var(--color-black);
    margin-bottom: 1.5rem; padding-bottom: 1rem;
    border-bottom: 3px solid var(--color-red);
    display: flex; align-items: center; gap: 1rem; text-transform: uppercase;
}
.service-title i { color: var(--color-red); }

/* ═══════════════════════════════════════
   CARRUSEL — contenedor externo
═══════════════════════════════════════ */
.carousel-container {
    margin-bottom: 0;
    border-radius: 12px;
    position: relative;
    width: 100%;
}

/* Badge de categoría */
.cat-badge {
    position: absolute;
    top: 14px; left: 14px; z-index: 5;
    background: var(--color-red);
    color: var(--color-white);
    font-size: 0.7rem; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    padding: 4px 12px; border-radius: 20px;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* Contador de slides */
.slide-counter {
    position: absolute;
    top: 14px; right: 14px; z-index: 5;
    background: rgba(0,0,0,0.55);
    color: var(--color-white);
    font-size: 0.75rem; font-weight: 600;
    padding: 4px 12px; border-radius: 20px;
    pointer-events: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Track deslizante */
.carousel {
    border-radius: 12px;
    overflow: hidden;
    height: 480px;
    position: relative;
}

.slides-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #111;
    overflow: hidden;
    flex-shrink: 0;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.45s ease;
    display: block;
}
.carousel-slide:hover img {
    transform: scale(1.04);
}

/* Botones prev/next */
.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
}

.carousel-btn {
    pointer-events: all;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1.5px solid rgba(255,255,255,0.4);
    color: var(--color-white);
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.25s, transform 0.2s, border-color 0.25s;
}
.carousel-btn:hover {
    background: var(--color-red);
    border-color: var(--color-red);
    transform: scale(1.1);
}

/* ═══════════════════════════════════════
   MINIATURAS
═══════════════════════════════════════ */
.carousel-thumbs {
    display: flex;
    gap: 8px;
    padding: 10px 0 0;
}

.carousel-thumb {
    flex: 1;
    height: 68px;
    border-radius: 7px;
    overflow: hidden;
    border: 2.5px solid transparent;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.25s, border-color 0.25s, transform 0.2s;
}
.carousel-thumb:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}
.carousel-thumb.active {
    border-color: var(--color-red);
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(75,163,76,0.35);
}
.carousel-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* ═══════════════════════════════════════
   DESCRIPCIÓN
═══════════════════════════════════════ */
.service-description {
    background: #f5f5f5;
    padding: 2rem; border-radius: 10px; margin-top: 1.5rem;
    border-left: 4px solid var(--color-red);
}
.service-description h3 {
    color: var(--color-black); margin-bottom: 1rem; font-size: 1.5rem;
    display: flex; align-items: center; gap: 0.5rem; font-weight: 600;
}
.service-description h3 i { color: var(--color-red); }
.service-description p { line-height: 1.8; color: var(--color-gray); font-size: 1.1rem; }

/* ═══════════════════════════════════════
   LIGHTBOX
═══════════════════════════════════════ */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.93);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: lbFadeIn 0.25s ease;
}
.lightbox-overlay.open { display: flex; }

@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }

.lb-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 80vh;
}

#lbMainImg {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.3s ease;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.lb-caption {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 12px;
    font-family: var(--fuente-principal);
}

/* Botón cerrar */
.lb-close {
    position: fixed;
    top: 18px; right: 22px;
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.25);
    color: var(--color-white);
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
}
.lb-close:hover { background: rgba(255,255,255,0.25); transform: scale(1.1) rotate(90deg); }

/* Botones prev/next del lightbox */
.lb-nav {
    position: fixed;
    top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.25);
    color: var(--color-white);
    width: 46px; height: 46px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
}
.lb-nav:hover { background: var(--color-red); border-color: var(--color-red); transform: translateY(-50%) scale(1.1); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* Miniaturas del lightbox */
.lb-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 90vw;
}

.lb-thumb-item {
    width: 56px; height: 40px;
    border-radius: 5px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.45;
    transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
    flex-shrink: 0;
}
.lb-thumb-item:hover { opacity: 0.75; transform: scale(1.05); }
.lb-thumb-item.active {
    border-color: var(--color-red);
    opacity: 1;
    transform: scale(1.05);
}
.lb-thumb-item img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.pie { background: #f5f5f5; border-top: 2px solid var(--color-red); padding: 1.5rem; text-align: center; margin-top: 3rem; }
.pie p { color: var(--color-gray); font-family: var(--fuente-secundaria); font-size: 1.1rem; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 1100px) { .services-container { grid-template-columns: 300px 1fr; } }

@media (max-width: 992px) {
    .services-container { grid-template-columns: 1fr; }
    .services-nav { position: static; }
    .carousel { height: 380px; }
}

@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-links {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch;
        gap: 0.3rem; padding: 0.75rem 1rem 1rem;
        background: var(--color-white);
        border-top: 2px solid var(--color-red);
        box-shadow: 0 8px 20px rgba(0,0,0,0.12);
        z-index: 999;
    }
    .nav-links.open { display: flex; }
    .nav-links a { width: 100%; min-width: unset; height: 48px; border-radius: 10px; font-size: 0.95rem; padding: 0 1rem; justify-content: flex-start; }
    .navbar { height: 70px; padding: 0 1rem; }
    .logo { width: 50px; height: 50px; }
    .club-name { font-size: 1.4rem; }
    .page-title { font-size: 2.2rem; }
    .services-main { padding: 1rem; }
    .carousel { height: 280px; }
    .service-title { font-size: 2rem; }
    .carousel-thumb { height: 52px; }
    .lb-nav { display: none; }
    .lb-thumbs { gap: 6px; }
    .lb-thumb-item { width: 46px; height: 34px; }
}

@media (max-width: 480px) {
    .navbar { height: 60px; }
    .logo { width: 42px; height: 42px; }
    .club-name { font-size: 1.2rem; }
    .page-title { font-size: 1.8rem; }
    .carousel { height: 220px; }
    .carousel-thumbs { gap: 5px; }
    .carousel-thumb { height: 44px; }
}