/*
* File: style.css
* Description: Estilos para el sitio web de Cursos de Diseño.
* Design System: Glassmorphism, Biomorphic Design
* Color Scheme: Split-Complementary
* Animation Style: Parallax
*/

/* ---------------------------------- */
/*          VARIABLES CSS             */
/* ---------------------------------- */
:root {
    /* Esquema de Color (Dividido-Complementario) */
    --primary-color: #0d9488; /* Teal */
    --primary-color-dark: #0f766e;
    
    --accent-color-1: #f97316; /* Orange */
    --accent-color-1-dark: #ea580c;

    --accent-color-2: #db2777; /* Fuchsia */
    
    /* Paleta Neutral */
    --dark-bg: #111827;
    --light-bg: #f3f4f6;
    --text-dark: #1f2937;
    --text-light: #e5e7eb;
    --text-light-secondary: #9ca3af;
    --white: #FFFFFF;
    --border-color-light: rgba(0, 0, 0, 0.1);
    --border-color-dark: rgba(255, 255, 255, 0.2);

    /* Tipografía */
    --font-heading: 'Roboto', sans-serif;
    --font-body: 'Lato', sans-serif;

    /* Propiedades de Glassmorphism */
    --glass-blur: 12px;
    
    /* Espaciado */
    --spacing-xs: 0.5rem;   /* 8px */
    --spacing-sm: 1rem;     /* 16px */
    --spacing-md: 1.5rem;   /* 24px */
    --spacing-lg: 3rem;     /* 48px */
    --spacing-xl: 5rem;     /* 80px */

    /* Transiciones */
    --transition-fast: 0.2s ease-in-out;
    --transition-medium: 0.4s ease-in-out;
}

/* ---------------------------------- */
/*          ESTILOS GLOBALES          */
/* ---------------------------------- */
html {
    scroll-behavior: smooth;
    font-size: 100%; /* 16px */
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--light-bg);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 900;
    line-height: 1.3;
    color: var(--text-dark);
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.5rem, 3vw, 1.75rem); }

p {
    margin-bottom: var(--spacing-sm);
    max-width: 70ch;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--primary-color-dark); }

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

/* ---------------------------------- */
/*          MAQUETACIÓN               */
/* ---------------------------------- */
.main-container {
    width: 100%;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.content-section, .content-section-dark {
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

.content-section-dark {
    background-color: var(--dark-bg);
    color: var(--text-light);
}

.content-section-dark h1,
.content-section-dark h2,
.content-section-dark h3 {
    color: var(--white);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.columns {
    display: flex;
    flex-wrap: wrap;
    margin: calc(var(--spacing-md) / -2);
}

.column {
    padding: calc(var(--spacing-md) / 2);
    flex: 1 1 100%;
}

.is-vcentered { align-items: center; }

@media (min-width: 768px) {
    .is-one-third { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .is-two-thirds { flex: 0 0 66.6667%; max-width: 66.6667%; }
}

.section-title, .section-title-left {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title-left { text-align: left; }

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 800px;
    margin: calc(var(--spacing-md) * -1) auto var(--spacing-lg) auto;
}

.content-section-dark .section-subtitle {
    color: var(--text-light-secondary);
}

/* ---------------------------------- */
/*          COMPONENTES GLOBALES      */
/* ---------------------------------- */

/* Botones */
.cta-button, button, input[type='submit'] {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(45deg, var(--accent-color-1), var(--accent-color-1-dark));
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-fast);
    transform: translateY(0);
}

.cta-button:hover, button:hover, input[type='submit']:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4);
}

/* Tarjetas (Glassmorphism) */
.card, .glassmorphic-card {
    border-radius: 16px;
    padding: var(--spacing-md);
    height: 100%;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
    display: flex;
    flex-direction: column;
    text-align: center;
    overflow: hidden;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.content-section .card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-color-light);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.content-section-dark .glassmorphic-card {
    background: rgba(31, 41, 55, 0.4);
    border: 1px solid var(--border-color-dark);
}

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

.card .card-image {
    width: 100%;
    height: 220px;
    margin-bottom: var(--spacing-md);
    border-radius: 10px;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
}

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

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.card-content h3 {
    margin-bottom: var(--spacing-xs);
}

/* Formularios */
.contact-form-container {
    padding: var(--spacing-lg);
    max-width: 700px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 700;
    color: var(--text-dark);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color-light);
    background-color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background: var(--dark-bg);
    margin: 10% auto;
    padding: var(--spacing-lg);
    border-radius: 16px;
    max-width: 600px;
    position: relative;
    color: var(--text-light);
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    color: var(--text-light);
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

/* ---------------------------------- */
/*          CABECERA Y NAVEGACIÓN     */
/* ---------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    transition: background-color var(--transition-medium);
    background: rgba(17, 24, 39, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--white);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.logo span { color: var(--accent-color-1); }

.nav-links-desktop a {
    color: var(--white);
    margin-left: var(--spacing-md);
    font-weight: 700;
    position: relative;
    padding-bottom: 5px;
}

.nav-links-desktop a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color-1);
    transition: width var(--transition-fast);
}

.nav-links-desktop a:hover::after { width: 100%; }

.burger-menu {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    z-index: 1001;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--white);
    transition: all var(--transition-medium);
}

/* ---------------------------------- */
/*          SECCIONES ESPECÍFICAS     */
/* ---------------------------------- */

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.parallax-container {
    background-attachment: fixed;
}

.hero-section .overlay, .parallax-container .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(17, 24, 39, 0.7), rgba(0, 0, 0, 0.5));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content h1 {
    color: var(--white);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
}

/* Research (Stats) Section */
.stats-widgets .stat-widget {
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: center;
}
.stat-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent-color-1);
}
.stat-label {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

/* Testimonials Section */
.testimonial-card {
    padding: var(--spacing-lg);
}

.testimonial-card blockquote {
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    border-left: 4px solid var(--accent-color-1);
    padding-left: var(--spacing-md);
}
.testimonial-card cite {
    display: flex;
    align-items: center;
    font-style: normal;
}
.testimonial-card cite img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: var(--spacing-sm);
    object-fit: cover;
}
.testimonial-card cite span {
    font-weight: 700;
    display: block;
}

/* Resources Section */
.resource-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}
.resource-link {
    display: block;
    padding: var(--spacing-md);
    text-align: left;
}
.resource-link h3 { color: var(--text-dark); }
.resource-link p { color: #4b5563; }
.resource-link:hover h3 { color: var(--primary-color); }

/* Custom Slider (Placeholder Styles) */
.custom-slider-container {
    position: relative;
}
.slider-wrapper {
    display: flex;
    overflow-x: auto; /* Change to hidden if controlled by JS */
    scroll-snap-type: x mandatory;
    gap: var(--spacing-md);
    padding-bottom: var(--spacing-sm); /* For scrollbar */
}
.slider-wrapper > * {
    flex: 0 0 100%;
    scroll-snap-align: center;
}
@media (min-width: 768px) {
    .slider-wrapper > * {
        flex-basis: calc(50% - var(--spacing-md) / 2);
    }
    #projects .slider-wrapper > * {
        flex-basis: 100%;
    }
}
.slider-controls {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}
.slider-controls button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ---------------------------------- */
/*          PIE DE PÁGINA             */
/* ---------------------------------- */
.site-footer {
    background-color: var(--dark-bg);
    color: var(--text-light-secondary);
    padding: var(--spacing-lg) 0 0 0;
}

.site-footer .columns > .column {
    margin-bottom: var(--spacing-md);
}

.site-footer h3, .site-footer h4 {
    color: var(--white);
    margin-bottom: var(--spacing-sm);
}
.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.site-footer ul li a {
    color: var(--text-light-secondary);
    padding: 5px 0;
    display: inline-block;
}
.site-footer ul li a:hover {
    color: var(--accent-color-1);
}
.footer-bottom {
    border-top: 1px solid var(--border-color-dark);
    padding: var(--spacing-md) 0;
    margin-top: var(--spacing-md);
    text-align: center;
    font-size: 0.9rem;
}

/* ---------------------------------- */
/*          PÁGINAS ESTÁTICAS         */
/* ---------------------------------- */
.static-page-content, .success-page-content {
    padding-top: 120px; /* Offset for fixed header */
    padding-bottom: var(--spacing-xl);
}

.success-page-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.success-page-content h1 {
    color: var(--primary-color);
}

/* ---------------------------------- */
/*          ANIMACIONES Y EFECTOS     */
/* ---------------------------------- */
/* Animación de entrada */
.animate-on-scroll {
    opacity: 1;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.column.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.column.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.column.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }

/* Formas Biomórficas */
.biomorphic-shape {
    position: absolute;
    z-index: 0;
    opacity: 1.2;
    background: linear-gradient(135deg, var(--accent-color-1), var(--accent-color-2));
    filter: blur(80px);
    animation: morph 20s infinite linear alternate;
    will-change: transform, border-radius;
}
.shape1 {
    width: 400px;
    height: 400px;
    top: 10%;
    left: 5%;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}
.shape2 {
    width: 300px;
    height: 300px;
    bottom: 15%;
    right: 10%;
    border-radius: 80% 20% 50% 50% / 40% 60% 40% 60%;
    animation-direction: alternate-reverse;
}

@keyframes morph {
    0% {
        transform: rotate(0deg) scale(1);
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    100% {
        transform: rotate(360deg) scale(1.2);
        border-radius: 80% 20% 50% 50% / 40% 60% 40% 60%;
    }
}

/* ---------------------------------- */
/*          MEDIA QUERIES             */
/* ---------------------------------- */
@media (max-width: 768px) {
    .nav-links-desktop {
        display: none;
    }

    .burger-menu {
        display: block;
    }

    .mobile-nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--dark-bg);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 999;
    }

    .mobile-nav-menu.is-active {
        display: flex;
    }

    .mobile-nav-menu a {
        color: var(--white);
        font-size: 1.5rem;
        margin: var(--spacing-sm) 0;
    }

    .columns {
        flex-direction: column;
    }

    .column {
        flex-basis: 100% !important;
        max-width: 100% !important;
        margin-bottom: var(--spacing-md);
    }
    
    .is-vcentered {
        flex-direction: column;
    }

    .content-section, .content-section-dark {
        padding: var(--spacing-lg) 0;
    }
    
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 1.1rem; }

    .section-title-left { text-align: center; }

}