/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #c8102e;
    --dark-gray: #333;
    --light-gray: #f5f5f5;
    --white: #ffffff;
    --text-dark: #2c2c2c;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Justificar todos los párrafos por defecto */
p {
    text-align: justify;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
/* Navegación principal - Barra roja */
.main-nav {
    background: var(--primary-red);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow);
}

/* Botón hamburguesa */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 5px 0;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: block;
    color: var(--white);
    text-decoration: none;
    padding: 10px 18px;
    font-weight: 500;
    transition: background 0.3s ease;
    white-space: nowrap;
    font-size: 0.95rem;
}

.nav-menu a:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Hero Section */
.hero {
    position: relative;
    height: 550px;
    overflow: hidden;
    margin-top: 20px;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    z-index: 10;
    padding-top: 40px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    height: 100%;
    align-items: center;
}

.hero-text {
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
    padding-left: 40px;
}

.hero-top-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
}

.hero-logo-unmsm {
    height: 120px;
    width: auto;
    flex-shrink: 0;
}

.hero-subtitle-top {
    font-size: 1.35rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-weight: 400;
    line-height: 1.3;
    flex: 1;
    font-family: 'Merriweather', serif;
}

.hero-main-content {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.hero-figura {
    position: absolute;
    left: 0px;
    top: 0;
    height: 100%;
    width: auto;
    max-height: 750px;
    object-fit: contain;
    transform: scale(1.3);
    transform-origin: left center;
}

.hero-text-content {
    margin-left: 180px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    width: 100%;
}

.hero-text h1 {
    font-size: 4.5rem;
    font-weight: 900;
    font-family: 'Anton', sans-serif;
    margin: 0;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
    letter-spacing: 0.1em;
    line-height: 1;
    white-space: nowrap;
    text-align: right;
    width: 100%;
}

.hero-bottom-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.hero-date {
    font-size: 2.3rem;
    font-weight: 900;
    font-family: 'Anton', sans-serif;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    line-height: 1.1;
    text-align: right;
}

.hero-theme {
    font-size: 1.25rem;
    line-height: 1.4;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    text-align: right;
    font-weight: 700;
    font-family: 'Merriweather', serif;
}

.hero-theme em {
    font-style: italic;
    font-size: 1.2rem;
}

/* Speakers Slider en Hero */
.hero-speakers {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    margin-left: -20px;
}

.speakers-slider {
    position: relative;
    width: 100%;
    height: 400px;
    max-height: 70vh;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.speaker-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.speaker-slide.active {
    opacity: 1;
}

.speaker-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.speaker-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    color: var(--white);
    padding: 30px 20px 20px;
}

.speaker-info h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.speaker-info p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Botones del slider - Ocultos */
.slider-btn {
    display: none;
}

/* Secciones generales */
.section {
    padding: 40px 0;
}

.section:nth-child(even) {
    background: var(--light-gray);
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    color: var(--primary-red);
    position: relative;
    padding-bottom: 15px;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-red);
}

/* Bienvenida */
.content-box {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
}

.content-box p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: justify;
}

/* Organización */
.organizers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.organizer-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease;
}

.organizer-card:hover {
    transform: translateY(-5px);
}

.organizer-image {
    width: 100%;
    height: 350px;
    overflow: hidden;
}

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

.organizer-info {
    padding: 30px;
}

.organizer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-red);
}

.organizer-role {
    font-weight: bold;
    color: var(--dark-gray);
    margin-bottom: 15px;
}

/* Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-red);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-marker {
    position: absolute;
    left: -38px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-red);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 3px var(--primary-red);
}

.timeline-content {
    background: var(--white);
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 3px 10px var(--shadow);
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-red);
}

/* Dos columnas */
.two-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.info-card {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
}

.info-card h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-red);
}

.info-card ul {
    margin: 20px 0;
    padding-left: 20px;
}

.info-card li {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.small-text {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

/* Mesas de trabajo */
.mesas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.mesa-item {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mesa-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.mesa-item h4 {
    color: var(--primary-red);
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.mesa-item p {
    color: var(--dark-gray);
    line-height: 1.6;
    margin: 0;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-red);
    color: var(--white);
}

.btn-primary:hover {
    background: #a00d24;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(200, 16, 46, 0.3);
}

.btn-secondary {
    background: var(--dark-gray);
    color: var(--white);
}

.btn-secondary:hover {
    background: #222;
    transform: translateY(-2px);
}

.btn-submit {
    margin-top: 20px;
    display: block;
    text-align: center;
    width: 100%;
}

@media (min-width: 768px) {
    .btn-submit {
        display: table;
        width: auto;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Ponencias Magistrales */
.speakers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.speaker-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s ease, border 0.3s ease;
    border: 3px solid transparent;
}

.speaker-card:hover {
    transform: translateY(-10px);
    border: 3px solid var(--primary-red);
}

.speaker-image-large {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

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

.speaker-details {
    padding: 30px;
}

.speaker-details h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--primary-red);
}

.speaker-title {
    font-weight: bold;
    color: var(--dark-gray);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.speaker-bio {
    line-height: 1.8;
    text-align: justify;
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--white);
    border-radius: 10px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease;
}

.pricing-card:hover {
    transform: scale(1.05);
}

.pricing-card.featured {
    border: 3px solid var(--primary-red);
    transform: scale(1.05);
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-red);
}

.pricing-date {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
    font-weight: 500;
}

.price {
    font-size: 3rem;
    font-weight: bold;
    margin: 20px 0 10px;
    color: var(--dark-gray);
}

.price .amount {
    font-size: 3rem;
}

.price .currency {
    font-size: 1.2rem;
    margin-left: 5px;
    font-weight: normal;
}

.price-usd {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

.features {
    list-style: none;
    margin: 30px 0;
    text-align: left;
}

.features li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.features li:last-child {
    border-bottom: none;
}

/* Tour */
.tour-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.tour-image-main {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
}

.tour-image-main img {
    width: 100%;
    height: auto;
    display: block;
}

.tour-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-red);
}

.tour-features {
    list-style: none;
    margin: 30px 0;
}

.tour-features li {
    padding: 10px 0;
    font-size: 1.1rem;
}

/* Noticias */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.news-content {
    padding: 25px;
}

.news-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-red);
}

.news-date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

/* Consultas */
.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Intro de consultas (caja superior con email) */
.contact-intro {
    text-align: center;
}

.contact-intro p {
    font-size: 1.1rem;
}

.contact-intro a {
    color: var(--dark-gray);
    font-weight: 700;
    text-decoration: none;
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
}

/* Variante de una sola columna centrada */
.contact-form-single {
    max-width: 800px;
    margin: 30px auto 0;
    border-radius: 16px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-gray);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-red);
}

.form-group textarea {
    min-height: 200px;
}

.contact-info {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--primary-red);
}

.contact-item {
    margin-bottom: 25px;
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--dark-gray);
}

.contact-item p {
    color: #666;
}

/* Footer */
footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary-red);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-red);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: none;
}

.footer-bottom p {
    text-align: center;
    margin: 0;
}

/* Responsive */
@media (max-width: 968px) {
    /* Mostrar botón hamburguesa */
    .menu-toggle {
        display: block;
    }
    
    /* Ocultar flechas del carousel en móvil */
    .slider-btn {
        display: none;
    }
    
    /* Ocultar menú por defecto en móvil */
    .nav-menu {
        position: fixed;
        top: -30px;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--primary-red);
        flex-direction: column;
        padding-top: 35px;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
    }
    
    /* Mostrar menú cuando está activo */
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu a {
        text-align: left;
        padding: 12px 30px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 1rem;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .hero-speakers {
        display: none;
    }
    
    .tour-content {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .speakers-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        margin-left: auto;
        order: 2;
    }
    
    .hero {
        height: 450px;
    }
    
    .hero-content {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .hero-text {
        gap: 15px;
        padding: 0 5px;
    }
    
    .hero-figura {
        max-height: 300px;
        left: -15px;
        transform: scale(0.9);
        transform-origin: left center;
    }
    
    .hero-text-content {
        margin-left: 75px;
        padding-right: 10px;
    }
    
    .hero-top-row {
        gap: 10px;
        justify-content: flex-start;
    }
    
    .hero-logo-unmsm {
        height: 70px;
    }
    
    .hero-subtitle-top {
        font-size: 0.9rem;
    }
    
    .hero-text h1 {
        font-size: 2.3rem;
        letter-spacing: 0.05em;
    }
    /* Alinear el título del hero a la derecha en móvil */
    .hero-text-content {
        align-items: flex-end;
        width: 100%;
    }
    .hero-text h1 {
        text-align: right;
        width: 100%;
    }
    
    .hero-date {
        font-size: 1.6rem;
    }
    
    .hero-theme {
        font-size: 1rem;
        font-weight: 500;
    }
    
    .hero-theme em {
        font-size: 0.95rem;
    }
    
    .hero-bottom-content {
        gap: 8px;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section h2 {
        font-size: 2rem;
    }
}

/* Ajustes de tipografía del hero en desktop */
@media (min-width: 1024px) {
    .hero-top-row {
        padding-left: 60px; /* desplaza el logo y subtítulo a la derecha */
    }
    /* Mantener el subtítulo del hero en una sola línea en desktop */
    .hero-subtitle-top {
        white-space: nowrap;
    }
    /* Hacer que el encabezado temático quede en una sola línea */
    .hero-theme {
        font-size: 1.15rem; /* un poco más pequeño */
        line-height: 1.2;
        margin-top: 6px; /* pequeño respiro respecto al título/fecha */
    }
    .hero-theme > br { display: none; }

    /* Cita en 2 líneas, bloque justificado */
    .hero-theme em {
        display: block;
        text-align: justify;
        margin-top: 12px; /* espacio con la línea anterior */
        max-width: 560px; /* fuerza el salto a ~2 líneas */
    }
}
