/* ===========================================================
   style.css  |  ÓleoArte – Cursos de Pintura al Óleo
   Diseño “Modern + Curved Grids”  –  Split-Complementary Colors
   =========================================================== */

/* ---------- RESET BÁSICO Y VARIABLES ---------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Tipografías */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;

    /* Paleta (Split–Complementary) */
    --clr-primary: #0066ff;          /* Azul vívido */
    --clr-primary-dark: #0044b3;
    --clr-secondary: #ff6600;        /* Naranja intenso */
    --clr-secondary-dark: #cc5200;
    --clr-accent-1: #21c55d;         /* Verde lima */
    --clr-accent-1-dark: #1a9a4a;
    --clr-bg: #f6f7fb;               /* Fondo neutro claro */
    --clr-surface: #ffffff;
    --clr-text: #222222;
    --clr-text-light: #ffffff;

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-secondary) 100%);
    --gradient-alt: linear-gradient(135deg, var(--clr-accent-1) 0%, var(--clr-primary) 100%);

    /* Sombras */
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);

    /* Transiciones */
    --transition-fast: 0.25s ease;
    --transition-slow: 0.6s cubic-bezier(.68,-0.55,.27,1.55); /* “Non-linear” */
}

/* ---------- TIPOGRAFÍA GLOBAL ----------------------------- */
body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--clr-text);
    background: var(--clr-bg);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--clr-text);
    line-height: 1.2;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); /* extra contrast */
}

.section-title {
    margin-bottom: 2rem;
    font-size: clamp(1.8rem, 2.5vw, 2.4rem);
}

/* ---------- UTILIDADES ------------------------------------ */
.container {
    width: min(90%, 1200px);
    margin-inline: auto;
}

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

/* Curved Grid – añade bordes inclinados a las secciones alternativas */
.section.alt-bg {
    background: var(--clr-surface);
    position: relative;
}
.section.alt-bg::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    background: var(--clr-surface);
    clip-path: polygon(0 100%, 100% 0, 100% 100%); /* curvado/diagonal */
}
.section.alt-bg::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    background: var(--clr-surface);
    clip-path: polygon(0 0, 0 100%, 100% 0);
}

/* ---------- HEADER Y NAVEGACIÓN --------------------------- */
.header {
    width: 100%;
    background: var(--clr-surface);
    position: fixed;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}
.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--clr-primary);
    text-decoration: none;
}
.nav {
    display: flex;
    gap: 1rem;
}
.nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}
.nav a {
    text-decoration: none;
    color: var(--clr-text);
    font-weight: 600;
    position: relative;
}
.nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--clr-primary);
    transition: width var(--transition-fast);
}
.nav a:hover::after,
.nav a:focus::after {
    width: 100%;
}

/* Burger para móviles */
.nav-toggle,
.burger {
    display: none;
}

/* ---------- HERO ------------------------------------------ */
.hero {
    position: relative;
    color: var(--clr-text-light);
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
.hero .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.3));
}
.hero-content {
    position: relative;
    padding: 160px 0 120px;
    text-align: center;
}
.hero-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
}
.hero-subtitle {
    font-size: 1.25rem;
    max-width: 720px;
    margin-inline: auto 2rem;
    margin-bottom: 2rem;
}

/* Estadísticas */
.stats-widget {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}
.stat {
    text-align: center;
}
.stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--clr-secondary);
    display: block;
}

/* ---------- BOTONES (GLOBAL) ------------------------------ */
.btn,
button,
input[type='submit'] {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    transition: transform var(--transition-slow), background var(--transition-fast);
}
.btn-primary {
    background: var(--clr-primary);
    color: var(--clr-text-light);
}
.btn-primary:hover,
.btn-primary:focus {
    background: var(--clr-primary-dark);
    transform: translateY(-3px);
}
.btn-secondary {
    background: var(--clr-secondary);
    color: var(--clr-text-light);
}
.btn-secondary:hover,
.btn-secondary:focus {
    background: var(--clr-secondary-dark);
    transform: translateY(-3px);
}

/* ---------- SECCIONES GENERALES --------------------------- */
.section {
    padding: 5rem 0;
}
.section p {
    margin-bottom: 1.2rem;
    text-align: justify;
}

/* ---------- TARJETAS / CARD ------------------------------- */
.card {
    background: var(--clr-surface);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform var(--transition-slow), box-shadow var(--transition-fast);
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.card-image,
.image-container {
    width: 100%;
    height: 230px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-image img,
.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0 auto;
}
.card-content {
    padding: 1.5rem;
}
.card-content h3 {
    margin-bottom: 0.8rem;
    color: var(--clr-primary-dark);
}
.card-content p {
    font-size: 0.95rem;
}

/* ---------- TIMELINE -------------------------------------- */
.timeline {
    position: relative;
    margin-top: 2rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--clr-primary);
    transform: translateX(-50%);
}
.timeline-item {
    position: relative;
    width: 48%;
    margin-bottom: 2rem;
}
.timeline-item:nth-child(odd) {
    left: 0;
}
.timeline-item:nth-child(even) {
    left: 52%;
}
.timeline-item .card {
    width: 100%;
}

/* ---------- PROGRESS GROUP -------------------------------- */
.progress-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.progress-group progress {
    flex: 1;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}
progress::-webkit-progress-bar {
    background: #d9d9d9;
}
progress::-webkit-progress-value {
    background: var(--clr-accent-1);
}
progress::-moz-progress-bar {
    background: var(--clr-accent-1);
}

/* ---------- ICONO ANIMADO & SWITCH ------------------------ */
.animated-icon {
    width: 60px;
    height: 60px;
    background: var(--clr-primary);
    border-radius: 50%;
    margin-right: 1rem;
    animation: pulse 2.5s infinite cubic-bezier(.68,-0.55,.27,1.55);
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.2); opacity: 0.4; }
    100% { transform: scale(1); opacity: 0.9; }
}
/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin: 0 10px;
}
.switch input { display: none; }
.slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 34px;
    transition: background var(--transition-fast);
}
.slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--clr-surface);
    transition: transform var(--transition-fast);
    border-radius: 50%;
}
input:checked + .slider {
    background: var(--clr-primary);
}
input:checked + .slider::before {
    transform: translateX(24px);
}

/* ---------- FORMULARIO ----------------------------------- */
form {
    display: grid;
    gap: 1rem;
}
.form-group {
    display: flex;
    flex-direction: column;
}
label {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
input[type="text"],
input[type="email"],
textarea {
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: var(--font-body);
    transition: border var(--transition-fast), box-shadow var(--transition-fast);
}
input:focus,
textarea:focus {
    outline: none;
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.2);
}

/* ---------- FOOTER --------------------------------------- */
.footer {
    background: var(--clr-primary-dark);
    color: var(--clr-text-light);
    padding: 2.5rem 0;
    text-align: center;
}
.footer-flex {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}
.footer nav a,
.footer .social a {
    color: var(--clr-text-light);
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color var(--transition-fast);
}
.footer nav a:hover,
.footer .social a:hover {
    color: var(--clr-accent-1);
}

/* ---------- ENLACES “Leer más” ---------------------------- */
.read-more {
    color: var(--clr-secondary);
    font-weight: 600;
    text-decoration: none;
    position: relative;
}
.read-more::after {
    content: '→';
    margin-left: 4px;
    transition: transform var(--transition-fast);
}
.read-more:hover::after {
    transform: translateX(4px);
}

/* ---------- SUCCESS PAGE --------------------------------- */
.success-page {
    min-height: 100vh;
    background: var(--gradient-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--clr-text-light);
    padding: 2rem;
}

/* ---------- PRIVACY & TERMS PAGES ------------------------ */
.page-simple {
    padding-top: 100px;
}

/* ---------- MEDIA QUERIES -------------------------------- */
@media (max-width: 920px) {
    /* Burger visible */
    .nav-toggle,
    .burger {
        display: block;
    }
    .burger {
        cursor: pointer;
        width: 24px;
        height: 18px;
        position: relative;
    }
    .burger span {
        position: absolute;
        height: 3px;
        width: 100%;
        background: var(--clr-text);
        transition: transform var(--transition-fast);
    }
    .burger span:nth-child(1) { top: 0; }
    .burger span:nth-child(2) { top: 7px; }
    .burger span:nth-child(3) { bottom: 0; }

    .nav {
        position: fixed;
        top: 64px;
        right: -100%;
        background: var(--clr-surface);
        height: calc(100vh - 64px);
        width: 240px;
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        gap: 1rem;
        box-shadow: var(--shadow-lg);
        transition: right var(--transition-fast);
    }
    .nav ul {
        flex-direction: column;
    }
    .nav-toggle:checked ~ .nav {
        right: 0;
    }
    .nav-toggle:checked + .burger span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .nav-toggle:checked + .burger span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle:checked + .burger span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Timeline mobile */
    .timeline::before,
    .timeline-item {
        left: 0 !important;
        width: 100%;
    }
}

/* ---------- ANIMACIONES SCROLL --------------------------- */
[data-motion] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
[data-motion].visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-subtitle{
    margin: 0 auto;
}

.btn-primary{
    display: block;
    text-decoration: none;
    border-radius: 1rem;
    max-width: 15rem;
    margin: 1rem auto;
    padding: 1rem;
}

textarea{
    resize: vertical;
}

.curved-bottom{
    justify-content: center;
}

.nav ul{
    flex-wrap: wrap;
    justify-content: flex-end;
}