/* ==========================================================
   VARIABLES Y BASE
   ========================================================== */
:root {
    --negro-obsc: #121212;
    --negro-topbar: #0b0b0b;
    --azul: #0056d2;
    --azul-hover: #0043a8;
    --gris-text: #c3c4c7;
    --content-faded: #bdbdbd;
    --white: #ffffff;
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --font-accent: 'Merriweather', serif;
    --transition: 0.3s ease;
    --site-border-radius: 14px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--negro-obsc);
    background-color: var(--negro-obsc);
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================
   HELPERS Y CONTENEDORES
   ========================================================== */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-2 { margin-top: 0.8rem; }
.pt-large { padding-top: 5rem; }
.pb-large { padding-bottom: 5rem; }

/* ==========================================================
   REGLA ESTRICTA DE CONTRASTE (BLANCO EN OSCURO / NEGRO EN CLARO)
   ========================================================== */
.section-dark {
    background-color: var(--negro-obsc);
    color: var(--white);
}

.section-dark .section-heading,
.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
    color: #ffffff !important;
}

/* En fondo oscuro: Cursivas 100% Blancas */
.section-dark .accent-italic {
    font-family: var(--font-accent);
    font-style: italic;
    font-weight: 400;
    color: #ffffff !important;
}

.section-dark .section-subheading {
    color: var(--content-faded);
    font-size: clamp(15px, 1.8vw, 18px);
    max-width: 750px;
    margin: 0 auto 3rem;
}

.section-light {
    background-color: #ffffff;
    color: var(--negro-obsc);
    padding: 5rem 0;
}

.section-light .section-heading-dark,
.section-light h1,
.section-light h2,
.section-light h3,
.section-light h4 {
    color: #121212 !important;
}

/* En fondo claro: Cursivas 100% Negras */
.section-light .accent-italic {
    font-family: var(--font-accent);
    font-style: italic;
    font-weight: 400;
    color: #121212 !important;
}

.section-light .section-subheading-dark {
    color: #555555;
    font-size: clamp(15px, 1.8vw, 18px);
    max-width: 750px;
    margin: 0 auto 3rem;
}

/* Tipografía de títulos generales */
.section-heading, .section-heading-dark {
    font-family: var(--font-heading);
    font-size: clamp(24px, 3.8vw, 38px);
    font-weight: 700;
    margin-bottom: 1.2rem;
}

/* ==========================================================
   1. TOPBAR OSCURA DE ALTO CONTRASTE
   ========================================================== */
.topbar {
    background-color: var(--negro-topbar);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    padding: 10px 0;
    color: var(--gris-text);
}

.topbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.topbar-contact a, .topbar-location span {
    color: var(--gris-text);
    text-decoration: none;
    margin-right: 18px;
    transition: var(--transition);
}

.topbar-contact a i, .topbar-location i {
    color: var(--azul);
    margin-right: 5px;
}

.topbar-contact a:hover { color: var(--white); }

/* ==========================================================
   2. HERO CON LOGO DE 150px Y CROSSFADE SLIDER
   ========================================================== */
.hero-section {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
}

.slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide.active { opacity: 1; }

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(18, 18, 18, 0.72);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 3rem 1rem;
}

/* LOGO DE 150px */
.hero-logo-box {
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
}

.hero-logo-150 {
    width: 150px;
    max-width: 150px;
    height: auto;
    object-fit: contain;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(32px, 5.2vw, 56px);
    font-weight: 800;
    color: var(--white);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(15px, 2vw, 18px);
    color: var(--gris-text);
    margin-bottom: 2.2rem;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.85rem 2rem;
    border-radius: 2.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--negro-obsc);
}

.btn-whatsapp {
    background: var(--white);
    color: var(--negro-obsc);
}

.btn-whatsapp:hover {
    background: #4eb844;
    color: var(--white);
}

/* ==========================================================
   3. ACORDEÓN (SOBRE MÍ)
   ========================================================== */
.accordion-wrapper {
    padding: 1.2rem 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.custom-accordion {
    max-width: 980px;
    margin: 0 auto;
}

.accordion-header {
    width: 100%;
    background: none;
    border: none;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    padding: 12px 0;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.accordion-header:hover { color: var(--azul); }
.accordion-icon { margin-right: 8px; transition: transform 0.3s; }
.accordion-header.active .accordion-icon { transform: rotate(45deg); }

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.accordion-inner {
    display: grid;
    grid-template-columns: 5fr 2fr 5fr;
    gap: 20px;
    padding: 1.5rem 0;
    align-items: center;
}

.about-col p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--content-faded);
}

.avatar-col { text-align: center; }
.avatar-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: var(--transition);
}

.avatar-img:hover { filter: grayscale(0%); }

/* ==========================================================
   4. TARJETAS DE SERVICIOS
   ========================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.service-card {
    padding: 2.4rem 1.8rem;
    border-radius: 15px;
    color: var(--negro-obsc);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.service-card h4 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #121212 !important;
}

.card-italic {
    font-family: var(--font-accent);
    font-style: italic;
    color: #121212;
}

.service-card p {
    font-size: 15px;
    line-height: 1.45;
    color: #222;
}

.card-yellow { background-color: #feffd1; }
.card-pink   { background-color: #ffd6e9; }
.card-blue   { background-color: #c9eaff; }
.card-purple { background-color: #e1e0ff; }

/* ==========================================================
   5. PASIÓN POR EL DISEÑO (CAJAS UNIFORMES Y ESPACIADAS)
   ========================================================== */
.pasion-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 45px;
    align-items: center;
}

.pasion-left p {
    font-size: 15px;
    color: #444;
    line-height: 1.6;
}

.pasion-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* CAJAS UNIFORMES */
.feature-card {
    background: #fbfcfe;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.8rem 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    min-height: 130px;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--azul);
    box-shadow: 0 8px 20px rgba(0, 86, 210, 0.1);
}

.feature-icon-box {
    font-size: 26px;
    color: var(--azul);
}

.feature-card h6 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: #121212;
    line-height: 1.35;
    margin: 0;
}

/* ==========================================================
   6. TIMELINE CV INTERACTIVO COLAPSABLE
   ========================================================== */
.timeline-wrapper { padding: 5rem 0; }

.timeline-layout {
    display: grid;
    grid-template-columns: 3.5fr 5.5fr 3fr;
    gap: 30px;
}

.timeline-sidebar-left h2 {
    font-family: var(--font-heading);
    font-size: 32px;
    margin-bottom: 1rem;
}

.timeline-sidebar-left p, .timeline-sidebar-right p {
    color: var(--gris-text);
    font-size: 14px;
    line-height: 1.6;
}

.timeline-sidebar-right h4 {
    font-family: var(--font-heading);
    font-size: 20px;
    margin-bottom: 1rem;
}

.timeline-accordion-item {
    background: #1a1a1a;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid #292929;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.timeline-accordion-item:hover {
    border-color: var(--azul);
}

.timeline-toggle-btn {
    width: 100%;
    background: #1f1f1f;
    border: none;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--white);
    text-align: left;
    transition: background 0.3s ease;
}

.timeline-toggle-btn:hover { background: #262626; }

.timeline-badge-btn {
    background: var(--azul);
    color: #fff;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.timeline-toggle-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    flex-grow: 1;
    color: #ffffff;
}

.timeline-arrow {
    font-size: 14px;
    color: var(--gris-text);
    transition: transform 0.3s ease;
}

.timeline-accordion-item.active .timeline-arrow {
    transform: rotate(180deg);
    color: var(--azul);
}

.timeline-collapse-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: #161616;
}

.timeline-collapse-content .cv-item { padding: 20px; }

.cv-empresa {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--azul);
}

.cv-tematica {
    margin: 4px 0 0;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gris-text);
}

.cv-territorio {
    margin: 8px 0;
    padding: 8px 0;
    font-size: 12px;
    font-style: italic;
    color: #a3a3a3;
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cv-descripcion {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #dedede;
}

.cv-link { margin-top: 10px; font-size: 13px; }
.cv-link a { color: var(--azul); text-decoration: none; font-weight: 600; }
.cv-link a:hover { text-decoration: underline; }

/* ==========================================================
   7. CARRUSEL DE TESTIMONIOS (2 TARJETAS + FOTOS + BOTONES)
   ========================================================== */
.testimonials-slider-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonials-slider-window {
    overflow: hidden;
    width: 100%;
}

.testimonials-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
}

.testimonial-slide {
    flex: 0 0 50%;
    padding: 0 10px;
    box-sizing: border-box;
}

.testimonial-card {
    background: #fbfcfe;
    border: 1px solid #e2e8f0;
    padding: 2.2rem;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    text-align: left;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.client-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--azul);
}

.testimonial-header strong {
    display: block;
    font-size: 15px;
    color: var(--negro-obsc);
}

.testimonial-header span {
    font-size: 12px;
    color: #666;
}

.stars { color: #f5a623; margin-bottom: 8px; font-size: 16px; }
.testimonial-quote { font-style: italic; font-size: 14px; color: #444; line-height: 1.5; }

.slider-btn {
    background: var(--azul);
    color: var(--white);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
    flex-shrink: 0;
}

.slider-btn:hover {
    background: var(--azul-hover);
    transform: scale(1.08);
}

/* ==========================================================
   8. FOOTER
   ========================================================== */
.footer {
    background-color: var(--negro-obsc);
    padding: 3.5rem 0 2rem;
    border-top: 1px solid #222;
}

.footer-logo-box { margin-bottom: 1.5rem; }
.footer-logo { max-height: 40px; }

.footer-text {
    font-size: 13px;
    color: #a3a3a3;
    line-height: 1.6;
    letter-spacing: 0.06em;
}

.footer-contact {
    margin-top: 10px;
    font-size: 12px;
    color: #a3a3a3;
}

.footer-contact a { color: #a3a3a3; text-decoration: none; }
.footer-contact a:hover { color: var(--azul); }

.footer-socials {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1e1e1e;
    color: var(--content-faded);
    text-decoration: none;
    transition: var(--transition);
}

.footer-socials a:hover {
    background: var(--azul);
    color: var(--white);
}

/* ==========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================== */
@media (max-width: 1024px) {
    .timeline-layout { grid-template-columns: 1fr; }
    .pasion-grid { grid-template-columns: 1fr; }
    .accordion-inner { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 768px) {
    .topbar-container { justify-content: center; text-align: center; }
    .pasion-right { grid-template-columns: 1fr; }
    .hero-title { font-size: 34px; }
    .services-grid { grid-template-columns: 1fr; }
    .testimonial-slide { flex: 0 0 100%; }
}