/* ===== 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;
}