/* VARIABLES DE DISEÑO (Tu paleta de colores) */
:root {
    --bg-color: #ffffff;       /* Fondo claro y limpio */
    --text-color: #1a1a1a;     /* Texto principal legible */
    --primary-color: #ff529a;  /* Tu Rosa característico */
    --accent-color: #cdee70;   /* Tu Verde agua / turquesa de Cubi 2026 */
    --card-bg: #cdee70;        /* Fondo de tarjetas */
    --font-main: 'Finlandica Text', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* MENÚ DE NAVEGACIÓN */
header {
    background-color: var(--bg-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: #f0218a;
}

/* HERO SECTION (INICIO) */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero h1 span {
    color: var(--primary-color);
}

.hero p {
    font-size: 1.2rem;
    color: #1a1a1a;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    background-color: var(--card-bg);
    color: #fff;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.hero-image img {
    max-width: 400px;
    width: 100%;
    border-radius: 30px;
    border: 8px solid var(--accent-color);
}

/* CONTENEDORES GENERALES */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.section-title span {
    color: var(--primary-color);
}

/* SECCIÓN DE PROYECTOS (Caso de Estudio) */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-img {
    width: 100%;
    height: 250px;
    background-color: #ddd;
    object-fit: cover;
}

.project-info {
    padding: 2rem;
}

.project-tag {
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.tag-social { background-color: rgba(255, 82, 154, 0.1); color: var(--primary-color); }
.tag-identidad { background-color: rgba(255, 82, 154, 0.1);; color: var(--primary-color); }

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

/* SOBRE MÍ & HERRAMIENTAS */
.about-wrapper {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}

.about-text {
    flex: 1;
}

.tools-section {
    margin-top: 3rem;
}

.tools-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}

.tool-badge {
    background-color: var(--card-bg);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-left: 4px solid var(--primary-color);
}

/* FORMULARIO DE CONTACTO */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-color);
}

.contact-info a {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.contact-info a:hover {
    color: var(--primary-color);
}

/* FOOTER */
footer {
    text-align: center;
    padding: 3rem;
    background-color: #f0218a;
    color: #fff;
    margin-top: 4rem;
}

/* RESPONSIVE (Móviles) */
@media (max-width: 768px) {
    .hero, .about-wrapper, .contact-container {
        flex-direction: column;
        grid-template-columns: 1fr;
        text-align: center;
    }
    nav { flex-direction: column; gap: 1rem; }
    .hero-image img { order: -1; }
}
/* ==========================================================================
   SISTEMA DE SUB-PESTAÑAS DINÁMICAS (CASOS DE ESTUDIO)
   ========================================================================== */

.project-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.view-more-text {
    color: var(--primary-color);
    font-weight: bold;
    display: block;
    margin-top: 1rem;
    transition: transform 0.3s;
}

.project-card:hover .view-more-text {
    transform: translateX(5px);
}

/* Ocultar las sub-pestañas por defecto */
.sub-project-pane {
    display: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.5s ease, max-height 0.5s ease;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 3px dashed #ddd;
}

/* El truco mágico: Cuando la URL contenga el #ID del proyecto, se activa y se muestra */
.sub-project-pane:target {
    display: block;
    opacity: 1;
    max-height: 5000px; /* Permite que crezca según el contenido */
}

/* Contenido interno de la sub-pestaña */
.pane-content {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    position: relative;
}

.close-pane-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background-color: var(--text-color);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.close-pane-btn:hover {
    background-color: var(--primary-color);
}

.pane-title {
    font-size: 3rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.pane-subtitle {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    font-size: 1.2rem;
}

.pane-banner {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 3rem;
}

.pane-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.pane-grid h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.pane-sidebar {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 20px;
    height: fit-content;
}

.pane-sidebar h3 {
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 0.5rem;
    font-size: 1.4rem;
}

.pane-sidebar p {
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.gallery-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.pane-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.pane-gallery img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.pane-gallery img:hover {
    transform: scale(1.03);
}

/* Ajustes Responsivos */
@media (max-width: 768px) {
    .pane-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .pane-content {
        padding: 1.5rem;
    }
    .close-pane-btn {
        position: static;
        display: inline-block;
        margin-bottom: 1.5rem;
    }
}
/* ==========================================================================
   ESTILOS PARA EL CARRUSEL ANIMADO EN EL HOME
   ========================================================================== */

.hero-image {
    max-width: 400px;
    width: 100%;
    height: 400px; 
    border-radius: 30px;
    border: 8px solid var(--accent-color);
    overflow: hidden; 
    position: relative;
}

.carousel-track {
    display: flex;
    width: 300%; /* El espacio horizontal para las 3 fotos */
    height: 100%;
    animation: carruselAnimacion 12s infinite ease-in-out; 
}

.carousel-track img {
    width: 33.333%; 
    height: 100%;
    object-fit: cover; 
}

/* Animación para cambiar de foto con efecto de pausa */
@keyframes carruselAnimacion {
    0%, 25% {
        transform: translateX(0); /* Muestra Imagen 1 (Tu ilustración) */
    }
    30%, 60% {
        transform: translateX(-33.333%); /* Muestra Imagen 2 (Acciones Solidarias) */
    }
    65%, 95% {
        transform: translateX(-66.666%); /* Muestra Imagen 3 (Cubi 2026) */
    }
    100% {
        transform: translateX(0); /* Reinicia el ciclo */
    }
}
