/* ============================================
   KOLPA EDITORES - HOME PAGE STYLES
   ============================================ */

/* ============================================
   HERO SLIDER
   ============================================ */
.hero-slider {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease, visibility 1s ease;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1);
    transition: transform 8s ease;
}

.slide.active .slide-bg {
    transform: scale(1.1);
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(139, 0, 0, 0.5) 100%);
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    max-width: 900px;
    z-index: 2;
}

.slide-title {
    color: #ffffff;
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.slide.active .slide-title {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slider-controls {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 10;
}

.slider-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: var(--brand);
    border-color: var(--brand);
    transform: scale(1.1);
}

.slider-dots {
    display: flex;
    gap: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover,
.dot.active {
    background: var(--brand);
    transform: scale(1.2);
}

.slider-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--brand), var(--brand2));
    animation: progress 5000ms linear;
}

@keyframes progress {
    from { width: 0%; }
    to { width: 100%; }
}

/* ============================================
   TOMOS MARQUEE
   ============================================ */
.tomos-section {
    background: linear-gradient(180deg, rgba(6, 7, 10, 0) 0%, rgba(196, 30, 58, 0.05) 50%, rgba(6, 7, 10, 0) 100%);
}

.tomos-marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
}

.tomos-marquee::before,
.tomos-marquee::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.tomos-marquee::before {
    left: 0;
    background: linear-gradient(90deg, #06070a, transparent);
}

.tomos-marquee::after {
    right: 0;
    background: linear-gradient(270deg, #06070a, transparent);
}

.tomos-track {
    display: flex;
    gap: 2rem;
    animation: marquee var(--tomos-duration, 30s) linear infinite;
    width: max-content;
}

.tomos-track:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-1 * var(--tomos-shift, 50%))); }
}

.tomo-card {
    flex-shrink: 0;
    width: 200px;
    text-align: center;
    transition: transform 0.3s ease;
}

.tomo-card:hover {
    transform: translateY(-10px);
}

.tomo-image {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--card);
}

.tomo-image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tomo-card:hover .tomo-image img {
    transform: scale(1.05);
}

.tomo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.9) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tomo-card:hover .tomo-overlay {
    opacity: 1;
}

.tomo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--brand);
    color: #ffffff;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tomo-btn:hover {
    background: var(--brand2);
}

.tomo-title {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--text);
}

/* ============================================
   PARALLAX BANNER
   ============================================ */
.parallax-banner {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 200%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.parallax-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.85) 0%, rgba(139, 0, 0, 0.7) 100%);
}

.parallax-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.parallax-content h2 {
    font-size: clamp(1.75rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.parallax-content p {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   CONTADOR
   ============================================ */
.counter-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
}

.counter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.counter-item {
    text-align: center;
    padding: 2rem;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.counter-item:hover {
    transform: translateY(-5px);
    border-color: var(--brand);
}

.counter-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.75rem;
    color: #ffffff;
}

.counter-number {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--brand);
    display: inline-block;
    will-change: transform;
    animation: counterFloat 2.6s ease-in-out infinite;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.counter-item:nth-child(2) .counter-number {
    animation-delay: 0.15s;
}

.counter-item:nth-child(3) .counter-number {
    animation-delay: 0.3s;
}

@keyframes counterFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.counter-label {
    font-size: 1rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.5rem;
}

/* ============================================
   LIBROS DESTACADOS
   ============================================ */
.books-section {
    background: linear-gradient(180deg, #06070a 0%, rgba(196, 30, 58, 0.03) 50%, #06070a 100%);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.book-card {
    display: flex;
    gap: 1.5rem;
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    border-color: var(--brand);
    box-shadow: var(--shadow);
}

.book-image {
    position: relative;
    width: 130px;
    height: 180px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.book-card:hover .book-shine {
    left: 150%;
}

.book-content {
    display: flex;
    flex-direction: column;
}

.book-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.book-description {
    font-size: 0.9rem;
    color: var(--muted);
    flex-grow: 1;
    margin-bottom: 1rem;
}

.book-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.book-btn:hover {
    gap: 0.75rem;
    color: #DC143C;
}

/* ============================================
   PUBLICACIONES
   ============================================ */
.publications-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
}

.publications-wrapper {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 4rem;
    align-items: center;
}

.publications-image {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.publications-content h2 {
    margin-bottom: 1.5rem;
}

.publications-content p {
    color: var(--muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* ============================================
   CAPACITACIONES
   ============================================ */
.capacitaciones-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%);
}

.capacitaciones-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.capacitaciones-content h2 {
    margin-bottom: 1.5rem;
}

.capacitaciones-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    max-width: 700px;
}

.capacitaciones-icon {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   GESTIÓN
   ============================================ */
.gestion-section {
    background: #06070a;
}

.gestion-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.gestion-card {
    background: var(--card);
    padding: 2.5rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.gestion-card:hover {
    transform: translateY(-10px);
    border-color: var(--brand);
    box-shadow: var(--shadow);
}

.gestion-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: #ffffff;
}

.gestion-card h3 {
    margin-bottom: 1rem;
}

.gestion-card p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* ============================================
   LIBRO DESTACADO
   ============================================ */
.featured-book-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.1) 0%, rgba(139, 0, 0, 0.05) 100%);
}

.featured-book-wrapper {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 4rem;
    align-items: center;
}

.featured-book-image {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.featured-book-content h2 {
    margin-bottom: 1.5rem;
}

.featured-book-content p {
    color: var(--muted);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.featured-quote {
    font-style: italic;
    padding-left: 1.5rem;
    border-left: 3px solid var(--brand);
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   DIRECTORIO
   ============================================ */
.directorio-section {
    background: linear-gradient(180deg, #06070a 0%, #1a1a1a 100%);
}

.directorio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.director-card {
    display: flex;
    gap: 2rem;
    background: var(--card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.director-card:hover {
    transform: translateY(-5px);
    border-color: var(--brand);
    box-shadow: var(--shadow);
}

.director-image {
    position: relative;
    width: 180px;
    height: 220px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
}

.director-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.director-social {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.9));
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.director-card:hover .director-social {
    transform: translateY(0);
}

.director-social a {
    width: 35px;
    height: 35px;
    background: var(--brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.3s ease;
}

.director-social a:hover {
    background: #ffffff;
    color: var(--brand);
}

.director-content h3 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}

.director-role {
    display: inline-block;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%);
    color: #ffffff;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.director-content p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ============================================
   REVISTA CIENTÍFICA
   ============================================ */
.revista-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%);
}

.revista-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 4rem;
    align-items: center;
}

.revista-content h2 {
    margin-bottom: 1.5rem;
}

.revista-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.revista-image {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* ============================================
   CONTACTO CTA
   ============================================ */
.contact-cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
}

.contact-cta-wrapper {
    text-align: center;
}

.contact-cta-wrapper h2 {
    margin-bottom: 2rem;
}

/* ============================================
   PALABRAS CLAVE
   ============================================ */
.keywords-section {
    padding: 4rem 0;
    background: #0d0d0d;
}

.keywords-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.keyword-item {
    text-align: center;
    padding: 2rem;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.keyword-item:hover {
    transform: translateY(-5px);
    border-color: var(--brand);
    box-shadow: var(--shadow2);
}

.keyword-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.75rem;
    color: #ffffff;
}

.keyword-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.keyword-item p {
    font-size: 0.875rem;
    color: var(--muted);
    margin: 0;
}

/* ============================================
   RESPONSIVE HOME
   ============================================ */
@media (max-width: 992px) {
    .publications-wrapper,
    .featured-book-wrapper,
    .revista-wrapper {
        grid-template-columns: 1fr;
    }

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

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

    .counter-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .keywords-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .capacitaciones-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .capacitaciones-icon {
        order: -1;
        font-size: 5rem;
    }
}

@media (max-width: 768px) {
    .tomos-track .tomo-card {
        width: 170px;
    }

    .tomos-marquee::before,
    .tomos-marquee::after {
        width: 50px;
    }

    .hero-slider {
        min-height: 500px;
    }

    .slide-title {
        font-size: 1.75rem;
    }

    .slider-controls {
        bottom: 30px;
    }

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

    .book-card {
        flex-direction: column;
        text-align: center;
    }

    .book-image {
        width: 150px;
        height: 220px;
        margin: 0 auto;
    }

    .director-card {
        flex-direction: column;
        text-align: center;
    }

    .director-image {
        width: 150px;
        height: 180px;
        margin: 0 auto;
    }

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

@media (max-width: 480px) {
    .tomos-track .tomo-card {
        width: 150px;
    }

    .counter-number {
        font-size: 2.5rem;
    }
}
