/* style.css */

/* --------------------------------------------------------------------- */
/* 1. CSS Variables & Root Configuration
/* --------------------------------------------------------------------- */
:root {
    /* Paleta de Colores Pasteles */
    --color-background: #FDF6EC;       /* Beige muy claro */
    --color-background-alt: #F1E4E8;   /* Rosa pastel */
    --color-surface: #FFFFFF;          /* Blanco para tarjetas y superficies */
    --color-primary: #B4CDE6;          /* Azul pastel */
    --color-primary-dark: #93b5d8;      /* Azul pastel oscuro para hover */
    --color-secondary: #EAE0D5;        /* Gris-beige para footer/secciones */
    --color-accent: #C3E2C2;           /* Verde pastel para acentos */
    
    /* Paleta de Texto */
    --color-text-base: #3D405B;        /* Azul oscuro/gris para texto principal */
    --color-text-heading: #222831;     /* Casi negro para títulos */
    --color-text-subtle: #8D99AE;       /* Gris claro para texto secundario */
    --color-text-inverted: #FFFFFF;    /* Blanco para texto sobre fondos oscuros */

    /* Tipografía */
    --font-family-headings: 'Oswald', sans-serif;
    --font-family-body: 'Nunito', sans-serif;

    /* Sombras y Bordes */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 0.75rem; /* 12px */
    
    /* Transiciones */
    --transition-fast: all 0.2s ease-in-out;
    --transition-medium: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --------------------------------------------------------------------- */
/* 2. Estilos Base y Tipografía Adaptativa
/* --------------------------------------------------------------------- */
body {
    background-color: var(--color-background);
    color: var(--color-text-base);
    font-family: var(--font-family-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
    color: var(--color-text-heading);
    text-wrap: balance;
}

/* Tipografía Adaptativa */
h1 { font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem); }
h2 { font-size: clamp(2.2rem, 4vw + 1rem, 3.2rem); }
h3 { font-size: clamp(1.5rem, 2vw + 1rem, 2rem); }
p, li, a, span { font-size: clamp(1rem, 0.5vw + 0.8rem, 1.1rem); }

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

a:hover {
    color: var(--color-primary-dark);
}

/* --------------------------------------------------------------------- */
/* 3. Estilos Globales para Componentes
/* --------------------------------------------------------------------- */

/* Estilo global para botones */
.btn, button, input[type='submit'] {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px; /* Estilo píldora */
    font-family: var(--font-family-body);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition-medium);
    transform: perspective(1px) translateZ(0); /* Promueve la aceleración por hardware */
    box-shadow: var(--shadow-sm);
}

/* Botón Primario */
.btn-primary, button[type='submit'] {
    background-color: var(--color-primary);
    color: var(--color-text-inverted);
}

.btn-primary:hover, button[type='submit']:hover {
    background-color: var(--color-primary-dark);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

/* Estilo para las tarjetas */
.card {
    background-color: var(--color-surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition-medium);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* Contenedor de imagen en tarjeta */
.card .card-image {
    width: 100%;
    height: 200px; /* Altura fija para consistencia */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.card .card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* --------------------------------------------------------------------- */
/* 4. Estilos por Sección
/* --------------------------------------------------------------------- */

/* --- Header --- */
header#header {
    transition: background-color 0.3s ease-in-out;
}

/* --- Hero Section --- */
#hero {
    position: relative;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: var(--color-text-inverted);
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

#hero > * {
    position: relative;
    z-index: 2;
}


/* --- History / Timeline Section --- */
#history .wrap {
    margin: 0 auto;
    position: relative;
    max-width: 1000px;
}
#history .border {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: var(--color-primary);
    border-radius: 2px;
    margin-left: -1.5px;
}
#history .timeline-item-container {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}
/* Items a la derecha */
#history .right-timeline {
    left: 50%;
}
/* Items a la izquierda */
#history .left-timeline {
    left: 0;
}
#history .timeline-item {
    padding: 20px;
    background: var(--color-surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    position: relative;
    transition: var(--transition-medium);
}
#history .timeline-item:hover {
    transform: scale(1.05);
}

/* --- Pricing Section --- */
#pricing .card[data-scroll-animation] {
    transform: scale(0.95) translateY(20px);
    opacity: 0;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}
#pricing .card.visible {
    transform: scale(1) translateY(0);
    opacity: 1;
}
/* Delay para cada tarjeta */
#pricing .card:nth-child(2).visible { transition-delay: 0.1s; }
#pricing .card:nth-child(3).visible { transition-delay: 0.2s; }

/* --- Resources Section --- */
#resources a.font-bold {
    display: inline-block;
    position: relative;
    text-decoration: none;
    color: var(--color-text-base);
    font-weight: 700;
}
#resources a.font-bold::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-primary);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}
#resources a.font-bold:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* --- Contact Section --- */
#contact input, #contact textarea, #contact select {
    background-color: #f3f4f6;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 0.9rem 1rem;
    transition: var(--transition-fast);
    font-family: var(--font-family-body);
}

#contact input:focus, #contact textarea:focus, #contact select:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: var(--color-surface);
    box-shadow: 0 0 0 3px rgba(180, 205, 230, 0.5);
}

/* --- Footer --- */
footer a {
    color: var(--color-text-base);
}

footer a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* --------------------------------------------------------------------- */
/* 5. Estilos Específicos de Páginas
/* --------------------------------------------------------------------- */
/* --- success.html --- */
body.success-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* --- privacy.html & terms.html --- */
body.legal-page main {
    padding-top: 120px; /* Espacio para el header fijo */
    padding-bottom: 60px;
}
.prose h2 {
    margin-top: 2em;
    margin-bottom: 1em;
    font-size: 1.8rem;
    color: var(--color-text-heading);
}

/* --------------------------------------------------------------------- */
/* 6. Animaciones y Clases Utilitarias
/* --------------------------------------------------------------------- */
[data-scroll-animation] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-scroll-animation].visible {
    opacity: 1;
    transform: translateY(0);
}