/* --- VARIABLES Y ESTILOS GLOBALES --- */
:root {
    --primary-color: #8e44ad; /* Morado principal */
    --secondary-color: #c8a2c8; /* Lila suave */
    --text-color: #333;
    --dark-text: #2c3e50; /* Texto oscuro para contraste */
    --bg-color: #fdf9ff; /* Fondo casi blanco con un toque de morado */
    --heading-font: 'Playfair Display', serif;
    --body-font: 'Montserrat', sans-serif;

    /* Paleta de colores pastel para los proyectos */
    --pastel-1: #a8e6cf; /* Menta suave */
    --pastel-2: #dcedc1; /* Lima claro */
    --pastel-3: #ffd3b6; /* Melocotón */
    --pastel-4: #ffaaa5; /* Salmón rosado */
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

body {
    font-family: var(--body-font);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
}

.page-content {
  padding-top: 80px;
  padding-bottom: 110px;
}

/* --- RESET Y ESTILOS BASE --- */
* {
    box-sizing: border-box;
    padding: 7px;
}

html {
      height: 100%;
}

img {
    max-width: 100%;
    height: auto;
  
}

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

/* --- BARRA DE NAVEGACIÓN --- */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
     position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    max-width: 100%;
    padding: 0 40px;
}

.nav-brand {
    font-family: var(--heading-font);
    font-size: 2rem;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-brand img {
    height: 90px;
    width: 100px;
    border-radius: 155px;
}

.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;
    font-size: 20px;
}

.nav-menu a.active {
    color: #8A2BE2; /* Púrpura */
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none; /* Oculto por defecto */
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
} 
.hero-multipage {
    text-align: center;
}

.about-me h2 {
    font-family: var(--heading-font);
    font-size: 4rem;
    color: var(--primary-color);
    text-align: center;
}


.hero-profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 60px;
    border: 5px solid var(--secondary-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- ESTRUCTURA DE PÁGINA Y SOLUCIÓN DE SOLAPAMIENTO --- */

h1, .section-title {
    font-family: var(--heading-font);
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
    padding-top: 10px;
    margin-top: 5px;
}

h3, .section-title {
    font-family: var(--heading-font);
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
}

.section-subtitle {
    text-align: justify;
    font-size: 1rem;
    color: #666;
    max-width: 500px;
    margin: 0 auto 10px auto;
}

/* --- ESTILOS GENERALES DE TARJETAS (CARDS) --- */
.card {
    background-color: white;
    border-radius: 35px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card h3 {
    font-family: var(--heading-font);
    color: var(--primary-color);
    font-size: 2rem;
    margin: 0 0 10px 0;
    text-align: center;
}

.card p {
    line-height: 1.6;
    margin: 0;
    color: #555;
    text-align: justify;
}

.card .card-subtitle {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(142, 68, 173, 0.12);
}

.category-card:hover, .card-link-wrapper:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(142, 68, 173, 0.12);
}

.category-card {
    min-height: 150px; 
}

.category-card .card-content, .card-link-wrapper .card-content {
    flex-grow: 1;
}

.card .button-cv {
    margin-top: 15px;
}

.card-container {
    align-items: stretch;
}

.card-content {
    flex-grow: 1;
}

/* --- BOTÓN VOLVER A CATEGORÍAS --- */
.button-cv {
    display: inline-block;
    background-color: var(--primary-color);
    color: white !important;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 5px 15px rgba(142, 68, 173, 0.3);
    border: none;
}

.button-cv:hover {
    background-color: #5a379b;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(142, 68, 173, 0.5);
}

/* --- ESTILOS PARA PÁGINA DE CATEGORÍAS (proyectos.html) Y LÓGICA --- */
.category-container, .card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.category-card, .card-link-wrapper {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover, .card-link-wrapper:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(142, 68, 173, 0.12);
}

.category-card .card-content, .card-link-wrapper .card-content {
    flex-grow: 1;
}

.category-card h3, .card-link-wrapper h3 {
    font-family: var(--heading-font);
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 0 0 10px 0;
}

.category-card p, .card-link-wrapper p {
    line-height: 1.6;
    margin: 0;
    color: #555;
}

.category-card .card-arrow, .card-link-wrapper .card-arrow {
    font-size: 2.5rem;
    color: var(--secondary-color);
    transition: color 0.3s ease, transform 0.3s ease;
}

.category-card:hover .card-arrow, .card-link-wrapper:hover .card-arrow {
    color: var(--primary-color);
    transform: translateX(10px);
}
.card-link {
    display: inline-block;
    transition: background-color 0.3s ease;
}

.card-link-wrapper {
    text-decoration: none;
}

.card-link:hover {
    background-color: var(--primary-color);
}

.card-link.disabled {
    background-color: #ccc;
    cursor: not-allowed;
    pointer-events: none;
}

.card-link-wrapper .card {
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
}

/* --- ESTILOS PARA GALERÍAS DE PROYECTOS (Sub-páginas) --- */
.proyectos-gallery .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 40px auto 0 auto;
}

/* Forzar dos columnas en las páginas de lógica */
body.logica-page .proyectos-gallery .gallery {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    grid-auto-rows: 1fr;
}

.proyectos-gallery .card {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid;
    filter: grayscale(0%);
    opacity: 1;
}

.proyectos-gallery .card:hover {
    transform: translateY(-12px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.proyectos-gallery .card-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
     text-align: center;
}

.proyectos-gallery .card-title {
    margin: 0 0 15px 0;
    font-family: var(--heading-font);
    color: var(--dark-text);
    font-size: 1.6rem;
}

.proyectos-gallery .card-description {
    flex-grow: 1;
    margin: 0 0 30px 0;
    line-height: 1.7;
    color: #666;
    text-align: center;
}

.proyectos-gallery .card-link {
    align-self: center;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid;
    background-color: transparent;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.proyectos-gallery .card-link:hover {
    color: var(--dark-text) !important;
    transform: scale(1.05);
}

/* Aplicando los colores pastel */
.proyectos-gallery .card:nth-child(4n+1) { border-color: var(--pastel-1); }
.proyectos-gallery .card:nth-child(4n+1) .card-link { border-color: var(--pastel-1); color: var(--pastel-1); }
.proyectos-gallery .card:nth-child(4n+1) .card-link:hover { background-color: var(--pastel-1); }

.proyectos-gallery .card:nth-child(4n+2) { border-color: var(--pastel-2); }
.proyectos-gallery .card:nth-child(4n+2) .card-link { border-color: var(--pastel-2); color: var(--pastel-2); }
.proyectos-gallery .card:nth-child(4n+2) .card-link:hover { background-color: var(--pastel-2); }

.proyectos-gallery .card:nth-child(4n+3) { border-color: var(--pastel-3); }
.proyectos-gallery .card:nth-child(4n+3) .card-link { border-color: var(--pastel-3); color: var(--pastel-3); }
.proyectos-gallery .card:nth-child(4n+3) .card-link:hover { background-color: var(--pastel-3); }

.proyectos-gallery .card:nth-child(4n+4) { border-color: var(--pastel-4); }
.proyectos-gallery .card:nth-child(4n+4) .card-link { border-color: var(--pastel-4); color: var(--pastel-4); }
.proyectos-gallery .card:nth-child(4n+4) .card-link:hover { background-color: var(--pastel-4); }

/* --- ESTILOS PARA PÁGINAS GENERALES (VIDA, ESTUDIOS, DEPORTISTA) --- */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    row-gap: 35px;
    column-gap: 35px;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 250px;
    object-fit:cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.1);
}

.skill-item p {
    margin: 0px;
    font-weight: 600;
    font-family: var(--body-font);
    font-size: 1rem;
}

.skill-item {
    padding: 0.4px;
   
}

/* --- NUEVA SECCIÓN "MI HISTORIA" (INDEX.HTML) --- */
.about-me h2 {
    font-family: var(--heading-font);
    font-size: 1rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 50px;
}

.story-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px; 
}

.story-item {
    display: flex;
    flex-direction: column; 
    align-items: center;
    gap: 20px; 
}

/* Alternar la dirección de los elementos */
.story-item:nth-child(even) {
    flex-direction: row-reverse;
}

.story-image {
    border-radius: 35px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: transform 0.4s ease;
}

/* --- WHATSAPP LINK --- */
.whatsapp-link {
    color: #8A2BE2; 
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.whatsapp-link:hover {
    color: #6A1B9A; 
}

.whatsapp-link i {
    margin-right: 8px;
    font-size: 1.2em;
}

/* --- DEPORTISTA CAROUSEL --- */
.sport-carousel-container {
    margin-bottom: 60px;
}

.sport-carousel-container h3 {
    font-family: var(--heading-font);
    font-size: 2rem;
    color: var(--dark-text);
    margin-bottom: 5px;
}

.sport-carousel-container p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    min-width: 100%;
    box-sizing: border-box;
}

.carousel-item img,
.carousel-item video {
    width: 100%;
    height: 500px; 
    object-fit: cover;
    display: block;
}

/* --- DEPORTISTA SWIPER --- */
.sport-swiper-container {
    margin-bottom: 80px;
}

.sport-swiper-container h3 {
    font-family: var(--heading-font);
    font-size: 2.2rem;
    color: var(--dark-text);
    margin-bottom: 10px;
    text-align: center;
}

.sport-swiper-container p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    text-align: center;
}

.swiper-container {
    width: 100%;
    height: 500px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; 
}

.swiper-button-next, .swiper-button-prev {
    color: var(--primary-color) !important;
}

.swiper-pagination-bullet-active {
    background: var(--primary-color) !important;
}

/* Galería para la sección de deportes */

.sport-section h3 {
    font-size: 25px;
    color: var(--secondary-color);
    text-align: center;
    padding-top: 0.1PX;
}

.sport-sect h3 {
    font-size: 25px;
    color: var(--secondary-color);
    text-align: center;
    padding-top: 45px;
}

.sport-section p {
    line-height: 1.7;
    max-width: 1800px;
    text-align: justify;
    font-size: 16px;
}

.sport-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 2fr));
    gap: 0.1px;
}

.sport-gal{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 2fr));
    gap: 1px;
}

.sport-gallery-item img,
.sport-gallery-item video {
    width: 80%;
    height: 250px;
    object-fit: cover;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sport-gal-item img,
.sport-gal-item video {
    width: 80%;
    height: 300px;
    object-fit: contain;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sport-gal-item:hover img,
.sport-gal-item:hover video {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.sport-gal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 2fr));
    gap: 0.1px;
}


/* Galería para habilidades en la página de inicio */
.skills-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1px;
    padding: 20px 0;
}

.skill-item {
    text-align: center;
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: scale(1.05);
}

.skill-item img {
    width: 100%;
    height: 130px;
    object-fit: contain;
   
 
}

.skill-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* --- FOOTER --- */
.footer {
    background-color: #333;
    color: #f4f4f4;
    text-align: center;
    height: 90px;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer .container p {
    margin: 0.5px;
    padding: 0.5px;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-fixed {
    height: 200px;
    width: 100px;
    background-color: #333;
    color: #f4f4f4;
    text-align: center;
}

.social-link-inline {
    color: var(--secondary-color);
    text-decoration: underline;
    font-weight: bold;
}

.social-link-inline:hover {
    text-decoration: underline;
}

.copyright {
    font-size: 0.9rem;
    color: #aaa;
}

/* --- PAGINACIÓN --- */
.pagination-controls {
    text-align: center;
}

.pagination-controls button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    margin: 0 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pagination-controls button:hover,
.pagination-controls button.active {
    background-color: var(--secondary-color);
}

.pagination-controls button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* --- DISEÑO RESPONSIVO --- */
@media (max-width: 768px) {
    h1, .section-title { font-size: 2.2rem; }
    .nav-menu { display: none; }
    .nav-toggle {
        display: block; /* Mostrar en móvil */
    }

    .nav-menu { 
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        padding: 10px 0;
    }

    .nav-menu.show {
        display: flex; /* Mostrar menú al hacer clic */
    }
.nav-menu a.active {
    color: #e6e6fa; /* Lila claro */
}

    .nav-menu li {
        text-align: center;
        padding: 10px 0;
    }
}