/* --- VARIABLES & RESET --- */
:root {
    --bg-color: #0f0f11;
    --surface-color: #18181c;
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    --accent: #d4af37; /* Dorado / Accent elegante */
    --accent-hover: #b5932a;
    --font-title: 'Outfit', sans-serif;
    --font-body: 'Montserrat', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* --- TIPOGRAFÍA Y REUTILIZABLES --- */
h1, h2, h3 {
    font-family: var(--font-title);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent);
}

.portfolio-title {
    margin-bottom: 1.5rem;
    color: #8f8f92;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-weight: 400;
}

.portfolio-title::after {
    display: none;
}

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

/* --- NAVEGACIÓN --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: #000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.logo {
    display: block;
    width: 91px;
    height: 91px;
}

.logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px 7px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: #fff;
    transition: var(--transition);
}

.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-main);
}

/* --- HERO SECTION --- */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('../imagenes/Casa Ana WT/12 copia.jpg') center/cover no-repeat;
    padding: 0 1rem;
}

.video-hero {
    position: relative;
    overflow: hidden;
    background: #000;
}

.hero-video {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-hero .hero-content {
    position: relative;
    z-index: 1;
    transform: translateY(clamp(35px, 6vh, 60px));
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 3px 6px rgba(0,0,0,.95), 0 8px 24px rgba(0,0,0,.75);
}

.hero-content p {
    margin-bottom: 2.5rem;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.9;
}

.hero-content p span {
    padding: .14em .42em;
    background: rgba(0,0,0,.88);
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background-color: var(--accent);
    color: #000;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.64rem;
    border-radius: 2px;
    transition: var(--transition);
}

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

/* --- EQUIPOS TÉCNICOS --- */
.team-section {
    width: 96%;
    max-width: 1400px;
    padding: 3.5rem 0;
}

.team-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.team-coordinator {
    margin-top: .9rem;
    color: var(--text-muted);
    font-size: .875rem;
    font-weight: 400;
    line-height: 1.55;
    text-align: left;
}

.team-visual {
    min-width: 0;
}

.team-photo {
    position: relative;
    min-width: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--surface-color);
}

.team-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%);
    transition: var(--transition);
}

.team-photo:hover img {
    transform: scale(1.025);
    filter: grayscale(0%);
}

.team-photo figcaption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 2.4rem 1rem .8rem;
    color: #fff;
    background: linear-gradient(transparent, rgba(0,0,0,.88));
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .7px;
    text-align: right;
    text-transform: uppercase;
}

.team-copy {
    display: grid;
    grid-template-columns: 1fr;
    gap: .45rem;
    padding: 0;
    color: var(--text-muted);
    background: transparent;
    border: 0;
    font-size: .72rem;
    line-height: 1.35;
    text-align: left;
}

.team-photo-copy {
    margin-top: .8rem;
    padding: 0 .35rem;
    color: var(--text-muted);
    font-size: clamp(1rem, 1.18vw, 1.18rem);
    line-height: 1.5;
    font-weight: 400;
    text-align: center;
}

.team-profile {
    min-width: 0;
    padding: .65rem .85rem;
    background: rgba(24,24,28,.72);
    border-left: 2px solid var(--accent);
}

.team-profile + .team-profile {
    margin-top: 0;
    border-top: 0;
}

.team-role {
    display: block;
    margin-bottom: .2rem;
    color: var(--accent);
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.team-profile h3 {
    margin-bottom: .2rem;
    color: var(--text-main);
    font-size: .96rem;
    line-height: 1.25;
}

.team-credential {
    margin-left: .35rem;
    color: var(--text-muted);
    font-size: .72rem;
    font-weight: 400;
    white-space: nowrap;
}

.team-profile p + p {
    margin-top: .3rem;
}

.team-details {
    margin-top: .3rem;
    padding-left: 1rem;
}

.team-details li + li {
    margin-top: .12rem;
}

.team-trainees strong {
    color: var(--text-main);
}

.team-profile-compact h3 {
    color: var(--accent);
    font-size: .6rem;
    letter-spacing: .35px;
    text-transform: uppercase;
}

/* --- CONTADORES DE TRAYECTORIA --- */
.stats-section {
    background: var(--surface-color);
    border-block: 1px solid rgba(255,255,255,.06);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 90%;
    max-width: 1200px;
    padding: 3.5rem 0;
}

.stat-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    text-align: center;
}

.stat-item + .stat-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12%;
    width: 1px;
    height: 76%;
    background: rgba(212,175,55,.45);
}

.stat-number {
    color: var(--accent);
    font-family: var(--font-title);
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    max-width: 280px;
    margin-top: .85rem;
    color: var(--text-muted);
    font-size: .78rem;
    line-height: 1.5;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-stats {
    width: min(900px, 92vw);
    margin: 2rem auto 2.5rem;
    background: transparent;
    border: 0;
    backdrop-filter: none;
}

.hero-stats .stats-grid {
    width: 100%;
    padding: 1.4rem 0;
}

.hero-stats .stat-item {
    padding: 0 1.25rem;
}

.hero-stats .stat-number {
    font-size: clamp(1.65rem, 3vw, 2.65rem);
    text-shadow: 0 2px 4px rgba(0,0,0,.95), 0 6px 18px rgba(0,0,0,.8);
}

.hero-stats .stat-label {
    margin-top: .55rem;
    color: #fff;
    font-size: clamp(.58rem, .85vw, .72rem);
    text-shadow: 0 1px 3px #000, 0 4px 12px rgba(0,0,0,.95);
}

.hero-stats .stat-item + .stat-item::before {
    background: rgba(212,175,55,.8);
    box-shadow: 0 1px 6px rgba(0,0,0,.8);
}

/* --- PROYECTOS (GALERÍA) --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.project-card {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: var(--surface-color);
    cursor: pointer;
}

.project-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    opacity: 0.88;
}

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem 0.8rem 0.7rem;
    background: linear-gradient(transparent, rgba(15,15,17,0.95));
    transform: translateY(12px);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.project-card:hover img {
    transform: scale(1.05);
    opacity: 1;
}

.project-card:hover .project-info {
    transform: translateY(0);
    opacity: 1;
}

.project-info h3 {
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
}

.project-info span {
    font-size: 0.64rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.portfolio-intro { max-width: 680px; margin: -0.75rem 0 2rem; color: var(--text-muted); }
.gallery-lightbox { position: fixed; inset: 0; z-index: 2000; display: none; place-items: center; padding: 2rem; background: rgba(7,7,8,.96); backdrop-filter: blur(8px); }
.gallery-lightbox.is-open { display: grid; }
.lightbox-panel { width: min(1100px, 94vw); }
.lightbox-stage { position: relative; display: grid; place-items: center; min-height: min(70vh, 720px); }
.lightbox-main { display: block; max-width: 100%; max-height: 70vh; object-fit: contain; box-shadow: 0 25px 80px rgba(0,0,0,.55); }
.lightbox-close, .lightbox-arrow { border: 0; color: white; background: rgba(15,15,17,.62); cursor: pointer; transition: var(--transition); }
.lightbox-close:hover, .lightbox-arrow:hover { background: var(--accent); color: #111; }
.lightbox-close { position: fixed; top: 1.2rem; right: 1.5rem; z-index: 2; width: 44px; height: 44px; border-radius: 50%; font-size: 1.8rem; }
.lightbox-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; font-size: 1.5rem; }
.lightbox-prev { left: 0; } .lightbox-next { right: 0; }
.lightbox-meta { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; }
.lightbox-title { font-family: var(--font-title); font-size: 1.2rem; }
.lightbox-counter { color: var(--text-muted); font-size: .85rem; }
.lightbox-thumbs { display: flex; gap: 8px; width: 100%; overflow-x: auto; overflow-y: hidden; padding: 4px 2px 10px; scroll-behavior: smooth; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--accent) rgba(255,255,255,.08); }
.lightbox-thumbs::-webkit-scrollbar { height: 6px; }
.lightbox-thumbs::-webkit-scrollbar-track { background: rgba(255,255,255,.08); }
.lightbox-thumbs::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 999px; }
.lightbox-thumb { flex: 0 0 110px; border: 2px solid transparent; padding: 0; background: none; opacity: .5; cursor: pointer; scroll-snap-align: center; }
.lightbox-thumb.is-active { border-color: var(--accent); opacity: 1; }
.lightbox-thumb img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; }
/* --- SERVICIOS --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2rem;
}

.service-card {
    grid-column: span 2;
}

.service-card:nth-child(4) {
    grid-column: 2 / span 2;
}

.service-card:nth-child(5) {
    grid-column: 4 / span 2;
}

.services-intro {
    max-width: 760px;
    margin: -0.75rem 0 2.5rem;
    color: var(--text-muted);
}

.service-card {
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: 560px;
    background-color: var(--surface-color);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition);
    overflow: hidden;
}

.service-card:nth-child(1) { background-image: url('../imagenes/cards/01.jpeg'); }
.service-card:nth-child(2) { background-image: url('../imagenes/cards/02.jpeg'); }
.service-card:nth-child(3) { background-image: url('../imagenes/cards/03.jpeg'); }
.service-card:nth-child(4) { background-image: url('../imagenes/cards/04.jpeg'); }
.service-card:nth-child(5) { background-image: url('../imagenes/cards/05.jpeg'); }

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(8,8,10,.62), rgba(8,8,10,.86));
    transition: var(--transition);
}

.service-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.service-card:hover::before {
    background: linear-gradient(180deg, rgba(8,8,10,.52), rgba(8,8,10,.78));
}

.service-card-image {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    filter: grayscale(25%);
    transition: var(--transition);
}

.service-card:hover .service-card-image {
    transform: scale(1.035);
    filter: grayscale(0%);
}

.service-card-content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 2rem 2.5rem 2.5rem;
    background: transparent;
}

.service-number {
    display: block;
    margin-bottom: 1.2rem;
    color: var(--accent);
    font-family: var(--font-title);
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-shadow: 0 2px 8px rgba(0,0,0,.9);
}

.service-card p {
    color: rgba(255,255,255,.82);
    font-size: 0.9rem;
    text-shadow: 0 1px 5px rgba(0,0,0,.95);
}

.service-list {
    margin-top: .55rem;
    padding: 0;
    color: rgba(255,255,255,.82);
    font-size: .88rem;
    line-height: 1.6;
    list-style: none;
    text-shadow: 0 1px 5px rgba(0,0,0,.95);
}

.service-list li {
    position: relative;
    padding-left: 1rem;
}

.service-list li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.service-list li + li {
    margin-top: .35rem;
}

/* --- CONTACTO / DATOS --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background-color: var(--surface-color);
    padding: 4rem;
    border-left: 3px solid var(--accent);
}

.contact-info h2 {
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.info-item i {
    width: 45px;
    height: 45px;
    background-color: rgba(212, 175, 55, 0.1);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.info-item div span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.info-item div strong {
    font-size: 1rem;
    color: var(--text-main);
}

.whatsapp-cta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.02);
    padding: 2.5rem;
    border-radius: 4px;
}

.whatsapp-cta h3 {
    display: flex;
    align-items: center;
    gap: .7rem;
}

.whatsapp-cta h3 i {
    color: var(--accent);
}

.btn-whatsapp-large {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2.5rem;
    background-color: #25D366;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 4px;
    margin-top: 1.5rem;
    transition: var(--transition);
}

.btn-whatsapp-large:hover {
    background-color: #1da851;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
}

/* --- BOTÓN FLOTANTE WHATSAPP --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0px 4px 15px rgba(0,0,0,0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #1da851;
}

/* --- FOOTER --- */
footer {
    padding: 2rem 5%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.64rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 1050px) and (min-width: 769px) {
    .team-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .team-copy {
        grid-column: 1 / -1;
        grid-row: 1;
    }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        background: #000;
        border-top: 1px solid rgba(255,255,255,.08);
        transition: max-height .35s ease, visibility .35s;
    }
    .nav-links.is-open { max-height: 320px; visibility: visible; }
    .nav-links li { border-bottom: 1px solid rgba(255,255,255,.08); }
    .nav-links a { display: block; padding: 1rem 5%; }
    .hero-content h1 { font-size: 2.3rem; }
    .video-hero .hero-content { transform: translateY(30px); }
    .stats-grid { grid-template-columns: 1fr; padding: 1.5rem 0; }
    .stat-item { padding: 1.6rem 1rem; }
    .stat-item + .stat-item::before { top: 0; left: 20%; width: 60%; height: 1px; }
    .stat-number { font-size: 2.5rem; }
    .hero-stats { width: 94vw; margin: 1.5rem auto 2rem; }
    .hero-stats .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: .85rem 0; }
    .hero-stats .stat-item { padding: .4rem .35rem; }
    .hero-stats .stat-item + .stat-item::before { top: 12%; left: 0; width: 1px; height: 76%; }
    .hero-stats .stat-number { font-size: clamp(1.15rem, 5.4vw, 1.75rem); }
    .hero-stats .stat-label { margin-top: .4rem; font-size: clamp(.48rem, 2.1vw, .62rem); line-height: 1.3; letter-spacing: .5px; }
    .team-layout, .contact-container { grid-template-columns: 1fr; gap: 1.5rem; }
    .team-copy {
        grid-template-columns: 1fr;
        order: -1;
        padding-bottom: .5rem;
    }
    .team-profile:nth-child(3) { grid-column: auto; }
    .services-grid { grid-template-columns: 1fr; }
    .service-card,
    .service-card:nth-child(4),
    .service-card:nth-child(5) { grid-column: auto; width: 100%; min-height: 500px; }
    .contact-container { padding: 2rem; }
    .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
    .project-card:nth-child(3n + 1) { grid-column: span 2; aspect-ratio: 16 / 9; }
    .project-info { opacity: 1; transform: translateY(0); }
    .gallery-lightbox { padding: 1rem; }
    footer { flex-direction: column; gap: 1rem; text-align: center; }
}
