/* ===== RESET Y CONFIGURACIÓN BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* ===== VARIABLES CSS ===== */
:root {
    --primary-color: #102C57;
    --primary-dark: #FD0911;
    --secondary-color: #102C57;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --bg-dark: #102C57;
    --border-color: #e9ecef;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --container-width: 1200px;
}

/* ===== UTILIDADES ===== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: #FD0911;
    color: white;
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

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

/* ===== NAVEGACIÓN ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

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

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

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

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

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.hero-social {
    margin: 1.5rem 0 2rem 0;
    display: flex;
    gap: 1.2rem;
    align-items: center;
    justify-content: center; /* Centrar horizontalmente */
    flex-wrap: wrap; /* Permitir que se envuelvan en pantallas pequeñas */
}
.hero-social a {
    color: white;
    font-size: 2rem;
    transition: color 0.2s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem; /* Espacio para el área de clic */
    border-radius: 50%; /* Hacer el área de clic circular */
}
.hero-social a:hover {
    color: #FD0911;
    transform: translateY(-3px) scale(1.15);
    background-color: rgba(255, 255, 255, 0.1); /* Fondo sutil al hacer hover */
}
.hero-social a {
    text-decoration: none !important;
    border-bottom: none !important;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.profile-image {
    text-align: center;
}

.profile-image img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-hover);
}

.profile-image-large {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}
.profile-image-large img {
    width: 300px;
    height: 300px;
    max-width: 90vw;
    max-height: 40vw;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-hover);
    border: 4px solid #fff;
    display: block;
}
@media (max-width: 600px) {
    .profile-image-large img {
        width: 120px;
        height: 120px;
        max-height: 60vw;
    }
}

/* ===== SECCIONES GENERALES ===== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--secondary-color);
    padding-top: 2rem;
    padding-bottom: 1.2rem;
}

.page-header {
    padding: 120px 0 60px;
    background-color: var(--bg-light);
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
}

/* ===== SKILLS SECTION ===== */
.skills {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.skills-grid {
    display: grid;
    gap: 2rem;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.skill-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* ===== PROJECTS SECTION ===== */
.featured-projects {
    padding: 80px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

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

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.project-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--primary-dark);
}

/* ===== PROJECTS FILTER ===== */
.projects-filter {
    padding: 40px 0;
    background-color: var(--bg-light);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

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

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

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal {
    background-color: white;
    border-radius: var(--border-radius);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-content {
    padding: 1.5rem;
}

.modal-image {
    margin-bottom: 1.5rem;
}

.modal-image img {
    width: 100%;
    border-radius: var(--border-radius);
}

.modal-details h3 {
    margin: 1.5rem 0 0.5rem;
    color: var(--secondary-color);
}

.modal-details ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    padding: 20px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-form-container h2,
.contact-info-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 1rem 0;
}

.contact-info-container h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--secondary-color);
}

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.contact-info {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.contact-details h3 {
    margin-bottom: 0.25rem;
    color: var(--secondary-color);
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

.services-list {
    list-style: none;
    margin-top: 1rem;
}

.services-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
}

.services-list i {
    color: var(--primary-color);
}

.contact-availability {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
}

.contact-availability h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.contact-availability ul {
    margin-left: 1.5rem;
}

/* ===== FAQ SECTION ===== */
.faq-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: white;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background-color: var(--bg-light);
}

.faq-question h3 {
    margin: 0;
    color: var(--secondary-color);
}

.faq-question i {
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item.active .faq-answer {
    padding: 0 1.5rem 1.5rem;
    max-height: 200px;
}

/* ===== CTA SECTION ===== */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--bg-dark);
    color: white;
    padding: 60px 0 20px;
    text-align: center; /* Centrar todo el contenido del footer */
}

.footer-content {
    display: flex; /* Cambiar de grid a flex */
    flex-direction: column; /* Apilar elementos verticalmente */
    align-items: center; /* Centrar horizontalmente */
    justify-content: center; /* Centrar verticalmente */
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    text-align: center; /* Centrar el texto de cada sección */
    max-width: 600px; /* Limitar el ancho para mejor legibilidad */
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    text-align: center; /* Asegurar que los títulos estén centrados */
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center; /* Centrar los iconos sociales */
    align-items: center;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

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

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

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.back-to-top.show {
    display: flex;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

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

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

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .profile-image img {
        width: 250px;
        height: 250px;
    }

    .section-title {
        font-size: 2rem;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info-container {
        max-width: 100%;
        padding: 1rem 0;
    }
    
    .contact-item {
        padding: 1rem;
    }

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

    .skills-list {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }

    .modal {
        margin: 20px;
        max-height: 95vh;
    }

    .modal-links {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .profile-image img {
        width: 200px;
        height: 200px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
    }
}

/* Responsive para tablets */
@media (max-width: 768px) {
    .hero-social {
        gap: 1rem;
        margin: 1.2rem 0 1.8rem 0;
    }
    .hero-social a {
        font-size: 1.8rem;
        padding: 0.4rem;
    }
}

/* Responsive para móviles */
@media (max-width: 480px) {
    .hero-social {
        gap: 0.8rem;
        margin: 1rem 0 1.5rem 0;
    }
    .hero-social a {
        font-size: 1.6rem;
        padding: 0.3rem;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== ESTADOS DE CARGA ===== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ===== ESTADOS DE ÉXITO/ERROR ===== */
.success {
    color: #27ae60;
}

.error {
    color: var(--accent-color);
} 
.hero-social a::after {
    display: none !important;
}

/* ===== FEATURED CATEGORIES ===== */
.featured-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}
.category-tag {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    background: #fff;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.category-tag:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow-hover);
}

/* ===== PYTHON COURSES PAGE ===== */
.page-main {
    background: #faf9f6;
    min-height: 100vh;
    padding-top: 110px;
    padding-bottom: 40px;
}
.blog-intro h1 {
    color: #4666a3;
    font-style: italic;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 2.5rem;
    font-weight: 400;
}
.blog-content {
    background: transparent;
}
.blog-content article {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    padding-left: 2rem;
    padding-right: 2rem;
}
.blog-content h1 a {
    color: #2d3e7b;
    text-decoration: underline;
    font-size: 1.35rem;
    font-weight: 500;
    transition: color 0.2s;
}
.blog-content h1 a:hover {
    color: #FD0911;
}
.blog-content p {
    color: #222;
    font-size: 1.08rem;
    line-height: 1.7;
    margin-top: 0.5rem;
    margin-bottom: 0;
}
@media (max-width: 600px) {
    .blog-intro h1 {
        font-size: 2rem;
    }
    .blog-content h1 a {
        font-size: 1.1rem;
    }
    .blog-content article {
        padding-left: 0.7rem;
        padding-right: 0.7rem;
    }
}
.blog-intro p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
    font-size: 1.1rem;
    color: #444;
}

.intro-desc {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
    font-size: 1.25rem;
    color: #444;
    padding-top: 2rem;
    padding-bottom: 2.2rem;
    font-weight: 400;
}

/* ==================================================== */
/* ===== CÓDIGO AÑADIDO PARA PÁGINA "SOBRE MÍ" ===== */
/* ==================================================== */

.about-flex-container {
    display: flex;
    flex-wrap: wrap; /* Para que se apilen en móviles */
    gap: 40px; /* Espacio entre texto e imagen */
    align-items: flex-start; /* Alinea el inicio del texto con la imagen */
}

.about-columna-texto {
    flex: 2; /* El texto ocupa 2/3 del espacio */
    min-width: 300px; /* Ancho mínimo para legibilidad */
}

.about-columna-imagen {
    flex: 1; /* La imagen ocupa 1/3 del espacio */
    min-width: 250px;
    max-width: 350px; /* Tamaño máximo coherente */
    margin: 0 auto; /* Centra la columna de imagen */
}

.about-columna-imagen img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 50%; /* Tu imagen 'portada.png' es circular */
    
    /* Reutilizamos estilos de tu .profile-image-large img */
    box-shadow: var(--shadow-hover);
    border: 4px solid #fff;
}

/* ===== RESPONSIVE PARA "SOBRE MÍ" ===== */
@media (max-width: 768px) {
    .about-flex-container {
        flex-direction: column; /* Apila los elementos verticalmente */
    }

    .about-columna-texto, .about-columna-imagen {
        flex: 1 1 100%; /* Ocupan todo el ancho */
        max-width: 100%;
    }
    
    .about-columna-imagen {
        order: -1; /* Mueve la imagen arriba del texto en móvil */
        margin-bottom: 20px;
        display: flex;
        justify-content: center; /* Centra la imagen en su fila */
    }

    .about-columna-imagen img {
        /* Ajustamos el tamaño en móvil para que no sea gigante */
        max-width: 250px; 
    }
}

/* ==================================================== */
/* ===== 9. ESTILOS DEL MODAL DE CERTIFICADOS ===== */
/* ==================================================== */

/*
  Reutilizamos el estilo de tu .modal-overlay existente (línea 480)
  pero le damos un ID único para controlarlo por separado.
*/
#certModalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Un poco más oscuro para foco */
    display: none; /* Se activa con JS */
    align-items: center;
    justify-content: center;
    z-index: 2500; /* Más alto que el navbar (1000) y el modal de proyectos (2000) */
    padding: 20px;
    cursor: zoom-out; /* Indica que se puede cerrar haciendo clic */
}

/* El botón de cierre se hereda de .modal-close (línea 498), 
   pero ajustamos su z-index para estar sobre la imagen */
#certModalClose {
    z-index: 2510;
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem; /* Más grande para ser más fácil de presionar */
    color: white;
}

.cert-modal-content {
    max-width: 90%;
    max-height: 90vh; /* Ocupa máximo el 90% de la altura de la pantalla */
    display: flex;
    justify-content: center;
    align-items: center;
}

#certModalImage {
    width: auto;
    max-width: 100%; /* Asegura que la imagen no se desborde */
    height: auto;
    max-height: 90vh; /* Asegura que la imagen no se desborde verticalmente */
    object-fit: contain; /* CRUCIAL: Mantiene la proporción de la imagen */
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    cursor: default; /* El cursor normal sobre la imagen */
}

/* ==================================================== */
/* ===== 11. ESTILOS DE LISTAS DE CERTIFICADOS ===== */
/* ==================================================== */

.cert-category:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.cert-category h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.cert-category ul {
    list-style: none; /* Quitamos los bullet points */
    padding-left: 0;
}

.cert-category li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0; /* Separador sutil */
}

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

.cert-category a {
    /* Reutilizamos el estilo de tus enlaces de cursos */
    color: #2d3e7b;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 1rem; /* Tamaño de fuente legible */
}

.cert-category a:hover {
    color: var(--primary-dark);
}

/* ==================================================== */
/* ===== 12. ESTILOS DE LINKS EN EDUCACIÓN         ===== */
/* ==================================================== */

/*
* Esto aplica el mismo estilo de link (color, hover, etc.)
* de los certificados a los títulos <h3> de la sección Educación.
*/
.education-content h3 a {
    color: #2d3e7b; /* Mismo color que .cert-category a */
    text-decoration: underline;
    transition: color 0.2s;
    /* * IMPORTANTE: No definimos 'font-size' ni 'font-weight'.
    * Dejamos que los herede del tag <h3> para que 
    * se mantenga grande y en negritas.
    */
}

.education-content h3 a:hover {
    color: var(--primary-dark); /* Mismo color hover (#FD0911) */
}

/* ========================================================== */
/* ===== 13 & 15. ESTILOS FINALES P/ ACORDEÓN CERTIF.   ===== */
/* ========================================================== */

/* 1. LAYOUT DE CUADRÍCULA (GRID) */
.skills-detailed .container .certification-grid {
    width: 100%; /* Asegura que tome el ancho del .container */
    max-width: none; /* Anula cualquier max-width heredado */
    margin: 0; /* Anula cualquier margin: auto heredado */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* 2. ESTILO DE TARJETA BASE (Acordeón) */
/* Usamos .faq-item porque el JS lo necesita, pero lo aplicamos DENTRO de .certification-grid */
.certification-grid .cert-category.faq-item {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    padding: 1.5rem; /* Coincide con .education-card */
    margin-bottom: 0; /* Anula margen del .faq-item original */
    transition: var(--transition);
}
.certification-grid .cert-category.faq-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.certification-grid > .cert-category.faq-item {
    margin-bottom: 0; 
}

/* 3. ESTILO DEL ENCABEZADO CLICKEABLE */
.certification-grid .cert-category .faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Centra verticalmente */
    padding: 0;
    cursor: pointer;
    background-color: transparent;
    transition: var(--transition);
}
.certification-grid .cert-category .faq-question:hover {
    background-color: transparent;
}

/* 4. ESTILO DEL TÍTULO DENTRO DEL ENCABEZADO */
.certification-grid .cert-category .faq-question h3 {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* 5. ESTILO DEL ICONO DE FLECHA */
.certification-grid .cert-category .faq-question i {
    color: var(--primary-color);
    transition: var(--transition);
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-left: 1rem;
}

/* 6. ESTILO DEL CONTENIDO DESPLEGABLE */
.certification-grid .cert-category .faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out; /* Animación suave */
}
.certification-grid .cert-category .faq-answer ul {
    margin-top: 1rem;
    padding-left: 0;
    list-style: none;
}
.certification-grid .cert-category .faq-answer li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.certification-grid .cert-category .faq-answer li:last-child {
    border-bottom: none;
}

/* 7. LÓGICA DE EXPANSIÓN (JS añade .active a .faq-item) */
.certification-grid .cert-category.faq-item.active .faq-question i {
    transform: rotate(180deg);
}
.certification-grid .cert-category.faq-item.active .faq-answer {
    max-height: 1000px; /* Ajusta si es necesario */
}

/* ==================================================== */
/* ===== 14. ALINEACIÓN VISUAL EDUCACIÓN         ===== */
/* ==================================================== */

/*
* Aplicamos el estilo de "tarjeta" (card) a la sección de educación
* para que sea visualmente coherente con los acordeones de certificados.
*/
.education-card {
    /* Estilos clave para imitar la tarjeta del acordeón */
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden; /* Buena práctica con border-radius */
    padding: 1.5rem; /* Coincide con .cert-category */
    
    /* Ajuste para el layout de icono + contenido que ya tienes */
    display: flex;
    gap: 1.5rem; /* Espacio entre icono y texto */
    align-items: flex-start; /* Alinea icono y texto en la parte superior */
}

/* Ajustes al icono que ya tienes */
.education-icon {
    flex-shrink: 0; /* Evita que el icono se encoja */
    font-size: 1.5rem; /* Tamaño de icono consistente */
    color: var(--primary-color); /* Coherencia de color */
    padding-top: 0.25rem; /* Pequeño ajuste de alineación vertical */
}

.education-content {
    flex-grow: 1; /* El contenido toma el espacio restante */
}
