/* =================================
   ESTILOS GENERALES Y VARIABLES
   ================================= */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --background-color: #f4f7f6;
    --text-color: #333;
    --card-bg: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    line-height: 1.2;
}

.section-title {
    font-size: 2.5rem;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 50px;
}

/* =================================
   BARRA DE NAVEGACIÓN
   ================================= */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* =================================
   SECCIÓN HERO
   ================================= */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-intro {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
}

.hero-title {
    font-size: 3.5rem;
    margin: 10px 0;
    color: var(--secondary-color);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* =================================
   SECCIÓN PROYECTOS
   ================================= */
.projects {
    padding: 80px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.project-image img {
    width: 100%;
    height: auto;
    display: block;
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.project-stack {
    margin: 15px 0;
}

.project-stack span {
    background-color: #e0eafc;
    color: #3498db;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 5px;
}

.project-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* =================================
   NUEVO DISEÑO "SOBRE MÍ" (AJUSTADO)
   ================================= */
.about {
    background-color: #ffffff;
    padding: 6rem 0;
}

.about-container {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.about-main-content {
    flex: 2; /* Ocupa el doble de espacio que el stack */
    min-width: 300px;
}

.about-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 25px;
}

.about-image {
    flex-shrink: 0;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid #f0f0f0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.about-intro .section-title {
    margin-bottom: 15px;
    text-align: left;
    font-size: 2.2rem;
}

.about-intro p,
.about-details p {
    line-height: 1.7;
    text-align: justify;
}

.about-details p {
    margin-bottom: 1rem;
}

.about-skills {
    flex: 1; /* Ocupa una fracción del espacio */
    min-width: 300px;
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    position: sticky;
    top: 100px;
}

.skills-title {
    text-align: center;
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.skills-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skills-list li {
    background-color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease;
    width: 100%;
}

.skills-list li:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* =================================
   SECCIÓN CONTACTO
   ================================= */
.contact {
    padding: 80px 0;
    text-align: center;
}

.contact-subtitle {
    max-width: 600px;
    margin: 0 auto 30px;
}

/* ***** ESTILOS NUEVOS Y AJUSTADOS ***** */
.contact-info {
    margin-top: 40px; /* Espacio después del botón de WhatsApp */
}

.contact-email {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--secondary-color);
    background-color: #e9ecef;
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
    margin-bottom: 25px; /* Espacio hacia los íconos */
}


/* ***** FIN DE ESTILOS NUEVOS ***** */

.social-links a {
    font-size: 2rem;
    margin: 0 15px;
    color: var(--secondary-color);
    transition: color 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    color: var(--primary-color);
}


/* =================================
   FOOTER
   ================================= */
.footer {
    background-color: var(--secondary-color);
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

/* =================================
   DISEÑO RESPONSIVO
   ================================= */
@media (max-width: 992px) {
    .about-container {
        flex-direction: column;
    }
    
    .about-skills {
        position: static;
        width: 100%;
    }

    .about-intro .section-title {
        text-align: center;
    }

    .about-header {
        flex-direction: column;
        text-align: center;
    }

    .about-intro p,
    .about-details p {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* =================================
   ESTILOS SECCIÓN CERTIFICACIONES
   ================================= */
.certifications {
    padding: 80px 0;
    background-color: var(--background-color);
    text-align: center; /* <-- CORRECCIÓN: Esto centra el botón y todo el contenido. */
}

.certifications-subtitle {
    max-width: 600px;
    margin: 0 auto 30px;
}

/* =================================
   DISEÑO RESPONSIVO (para Certificaciones)
   ================================= */
@media (max-width: 768px) {
    .certifications {
        /* Reducimos el espacio vertical en pantallas pequeñas */
        padding: 60px 0;
    }
}

/* =================================
   PATRÓN DE COLORES DE FONDO ALTERNADOS
   ================================= */

/* El Hero y el Contacto se quedan con el gris por defecto (--background-color) */

/* Hacemos que la sección de proyectos sea blanca */
#proyectos {
    background-color: var(--card-bg); /* --card-bg es #ffffff */
}

/* La sección Sobre Mí vuelve al gris por defecto */
#sobre-mi {
    background-color: var(--background-color);
}

/* La nueva sección de Certificaciones será blanca para alternar */
#certificaciones {
    background-color: var(--card-bg);
}

/* ================================= */
/* DISEÑO RESPONSIVO PARA MÓVILES    */
/* ================================= */
@media (max-width: 768px) {
    .cert-grid {
        /* Reducimos el tamaño mínimo de las tarjetas en móvil */
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        
        /* Reducimos el espacio entre ellas */
        gap: 20px;
    }

    /* Opcional: Reducir un poco el texto del overlay para que no se vea tan grande */
    .cert-card .overlay {
        font-size: 1rem;
    }

    /* Ajustamos el padding del contenedor principal en móviles */
    .certs-main-content {
        padding: 60px 0;
    }
}