/* Variables y reset */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --text-color: #1f2937;
    --text-light: #000000;
    --bg-color: #ffffff;
    --bg-light: #f3f4f6;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-color);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo a:hover {
    color: var(--secondary-color);
}

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

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background: var(--text-color);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-repeat: no-repeat;
    background-position: bottom;
    opacity: 0.1;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease 0.4s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
    line-height: 1.2;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 0.6s both;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Sección Certificados */
.certificados {
    padding: 100px 0;
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.title-decoration {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.filter-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.cert-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.cert-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.cert-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.cert-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cert-card:hover .cert-image img {
    transform: scale(1.1);
}

.cert-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.cert-date {
    color: white;
    font-weight: 600;
    background: var(--primary-color);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
}

.cert-info {
    padding: 1.5rem;
}

.cert-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.cert-issuer {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cert-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.cert-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.credential-id {
    font-size: 0.85rem;
    color: var(--text-light);
}

.btn-verify {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.btn-verify:hover {
    color: var(--secondary-color);
}

.load-more {
    text-align: center;
}

.btn-secondary {
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Sección Habilidades */
.habilidades {
    padding: 100px 0;
    background: white;
}

.skills-container {
    max-width: 800px;
    margin: 0 auto;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-name {
    font-weight: 600;
}

.skill-percentage {
    color: var(--primary-color);
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--bg-light);
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    transition: width 1s ease;
    position: relative;
}

/* Sección Sobre Mí */
.sobre-mi {
    padding: 100px 0;
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

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

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.about-subtitle {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.about-description {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

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

.stat-box {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
}

.stat-box i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.about-social {
    display: flex;
    gap: 1rem;
}

.about-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.about-social a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* Sección Contacto */
.contacto {
    padding: 100px 0;
    background: white;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    gap: 2rem;
}

.contact-item {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-item h3 {
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--text-light);
}

.contact-form {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--text-color);
    color: white;
    padding: 4rem 0 1rem;
}

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

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links h4,
.footer-social h4 {
    margin-bottom: 1rem;
}

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

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-bottom i {
    color: var(--accent-color);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Media Queries para Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }

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

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }
}

/* Estilos para imágenes por defecto */
img {
    max-width: 100%;
    height: auto;
}

/* Utilidades */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

/* Modal para certificados */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: auto;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border: 3px solid white;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#modalCaption {
    margin: 20px auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: white;
    font-size: 1.2rem;
    padding: 10px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10000;
}

.modal-close:hover {
    color: var(--primary-color);
}

/* Para que las imágenes de certificados sean clickeables */
.cert-image {
    cursor: pointer;
}

/* ========== SECCIÓN DISTINCIONES (exclusiva) ========== */
.distinciones {
    padding: 100px 0;
    background: linear-gradient(135deg, #f5f0e8 0%, #faf7f2 100%);
}

.distinctions-timeline {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

.distinction-item {
    display: flex;
    gap: 3rem;
    align-items: center;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
    border-left: 8px solid #d4af37; /* dorado */
}

.distinction-item:hover {
    transform: translateY(-5px);
}

/* Para alternar (imagen a la derecha) */
.distinction-item.reverse {
    flex-direction: row-reverse;
    border-left: none;
    border-right: 8px solid #d4af37;
}

.distinction-images {
    flex: 1;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.distinction-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.distinction-img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border-color: #d4af37;
}

.distinction-content {
    flex: 1;
    padding: 1rem;
}

.distinction-year {
    display: inline-block;
    background: #d4af37;
    color: white;
    font-weight: 700;
    padding: 0.3rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.distinction-content h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 700;
}

.distinction-awarder {
    color: #b8860b;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.distinction-description {
    color: #4a5568;
    line-height: 1.8;
    font-size: 1rem;
}



/* Responsive */
@media (max-width: 768px) {
    .distinction-item,
    .distinction-item.reverse {
        flex-direction: column;
        padding: 1.5rem;
        border-left: 8px solid #d4af37;
        border-right: none;
    }
    
    .distinction-images {
        width: 100%;
        justify-content: center;
    }
    
    .distinction-img {
        width: 120px;
        height: 120px;
    }
    
    .distinction-content h3 {
        font-size: 1.5rem;
    }
}

/* Contacto horizontal */
.contact-info-horizontal {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.contact-item-h {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 10px;
    min-width: 200px;
    transition: transform 0.3s ease;
}

.contact-item-h:hover {
    transform: translateY(-5px);
}

.contact-item-h i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-item-h h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.contact-item-h p {
    color: var(--text-light);
    word-break: break-word;
}

.contact-item-h a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item-h a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Botón descargar CV */
.cv-download {
    margin: 2rem 0;
    text-align: center;
}

/* ========== SECCIÓN PONENCIAS (estilo exclusivo) ========== */
.ponencias {
    padding: 100px 0;
    background: #f0f4fa;
}

.posters-timeline {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.poster-item {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 5px solid #2c7da0;
}

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

.poster-images {
    flex: 1;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.poster-img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 3px solid white;
}

.poster-img:hover {
    transform: scale(1.05);
    border-color: #2c7da0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.poster-content {
    flex: 1;
    padding: 0.5rem;
}

.poster-year {
    display: inline-block;
    background: #2c7da0;
    color: white;
    font-weight: 700;
    padding: 0.3rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.poster-content h3 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
    color: #1e3a5f;
    font-weight: 700;
}

.poster-event {
    color: #2c7da0;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.poster-description {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.poster-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.poster-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Responsive para ponencias */
@media (max-width: 768px) {
    .poster-item {
        flex-direction: column;
        padding: 1.5rem;
    }
    .poster-img {
        width: 140px;
        height: 140px;
    }
    .poster-content h3 {
        font-size: 1.3rem;
    }
}