/* ==========================================
   1. VARIABLES Y RESET (GLOBAL)
   ========================================== */
:root {
    /* Paleta Principal */
    --primary-color: #004d40;
    --primary-light: #00695c;
    --primary-lighter: #00897b;
    --accent-color: #0277bd;
    --highlight-color: #d81b60;
    
    /* Textos y Fondos */
    --text-dark: #263238;
    --text-medium: #546e7a;
    --text-light: #78909c;
    --bg-white: #ffffff;
    --bg-light: #f5f7fa;
    --bg-off-white: #fafafa;
    
    /* Efectos */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
    
    /* Tipografías */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-tech: 'Rajdhani', sans-serif; /* Tu fuente Rajdhani */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--bg-light);
    -webkit-font-smoothing: antialiased;
}

/* ==========================================
   2. MARGENES DINÁMICOS (TU SOLICITUD)
   ========================================== */
/* Aplicamos el 5vw para que nada toque los bordes, pero
   mantenemos el centrado en pantallas ultra-grandes */

.container, 
.hero-content, 
.about-content, 
.grid-clean,
footer > div,    /* Para el contenido del footer */
.section-header { 
    margin-right: 2vw;
    margin-left: 2vw;
    /* Aseguramos que no crezca infinito */
    max-width: 90vw;
}

/* En pantallas grandes, centramos el bloque en vez de usar margen lateral */
@media (min-width: 1250px) {
    .container, .hero-content, .about-content, .grid-clean, footer > div, .section-header {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ==========================================
   3. ESTILOS ESPECÍFICOS DEL INDEX
   ========================================== */
   
/* Hero Pantalla Completa */
.hero-fullscreen {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(to bottom, #ffffff 0%, #f1f8e9 100%);
    padding: 20px 0; /* Quitamos padding lateral aquí, lo maneja .hero-content */
    position: relative;
    overflow: hidden;
}

.hero-name {
    font-family: var(--font-tech) !important; /* Rajdhani */
    font-size: clamp(3rem, 7vw, 5.5rem); /* Un poco más grande para impactar */
    color: var(--primary-color);
    margin-bottom: 10px;
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.1;
}

.hero-title {
    font-size: clamp(1rem, 2.3vw, 1.4rem);
    color: var(--text-medium);
    margin-top: 15px;
    min-height: 1.5em; /* Para que no salte al borrar texto */
}

/* Grid Limpio */
.grid-clean {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 50px;
    width: auto; /* Para respetar los márgenes 5vw definidos arriba */
}

/* Tarjetas Minimalistas */
.card-minimal {
    background: white;
    padding: 30px;
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-minimal:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(0, 77, 64, 0.2);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 2px solid #e0f2f1;
    display: inline-block;
    padding-bottom: 5px;
}

.btn-text {
    display: inline-block;
    margin-top: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-light);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border 0.3s;
    align-self: flex-start;
}

.btn-text:hover {
    border-bottom-color: var(--primary-light);
}

.scroll-down {
    position: absolute;
    bottom: 40px;
    opacity: 0.5;
    animation: bounce 2s infinite;
}

/* ==========================================
   4. EFECTO TYPEWRITER
   ========================================== */
.cursor {
    display: inline-block;
    width: 2px;
    background-color: var(--primary-color);
    animation: blink 1s step-end infinite;
    margin-left: 5px;
    vertical-align: middle;
    height: 1.2em; /* Altura ajustada al texto */
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ==========================================
   5. ESTILOS LEGACY (PÁGINAS INTERNAS)
   ========================================== */

.header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    padding: 60px 0; /* Aumentado aire vertical */
    text-align: center;
}

.header h1 {
    font-family: var(--font-heading);
    color: white;
    font-size: 2.2rem;
    margin-bottom: 10px;
}

/* Secciones Generales */
section {
    padding: 80px 0;
}

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

/* Tarjetas de Proyectos */
.project-card {
    background: var(--bg-white);
    margin: 40px 0; /* Más separación */
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--primary-color);
    position: relative;
}

.project-card.featured {
    border-left-color: var(--highlight-color);
    background: #fffcfc;
}

/* Cajas Destacadas */
.highlight-box {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-lighter));
    padding: 30px;
    border-radius: 12px;
    color: white;
    margin: 25px 0;
}

.highlight-box h3, .highlight-box p {
    color: white;
}

.stats-box {
    background: #e0f2f1;
    padding: 25px;
    border-radius: 8px;
    margin: 25px 0;
}

.stats-box h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Botones y Enlaces */
.back-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 15px;
    display: inline-block;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.project-link {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 28px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: transform 0.2s;
}

.project-link:hover {
    transform: translateY(-2px);
    background: var(--primary-dark);
}

.btn-outline {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid currentColor;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

/* Animaciones */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Footer Minimalista */
.footer-minimal {
    background: white !important;
    color: var(--text-medium) !important;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 40px 0;
    text-align: center;
}

/* Footer Standard */
footer {
    background: var(--primary-color);
    color: white;
    padding: 40px 0;
    text-align: center;
}

/* ==========================================
   SECCIÓN DE CONTACTO (ESTILO PREMIUM)
   ========================================== */
.cta-section-premium {
    background: linear-gradient(135deg, var(--primary-color) 0%, #00796b 100%);
    border-radius: 20px; /* Bordes redondeados como en la captura */
    padding: 80px 40px;
    text-align: center;
    color: white;
    margin-top: 60px;
    margin-bottom: 60px;
    box-shadow: 0 15px 40px rgba(0, 77, 64, 0.2);
    position: relative;
    overflow: hidden;
}

/* Título Serif elegante (blanco) */
.cta-section-premium h2 {
    font-family: var(--font-heading); /* Playfair Display */
    font-size: 2.5rem;
    color: white;
    margin-bottom: 15px;
}

/* Subtítulo */
.cta-section-premium p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 40px auto;
}

/* Contenedor botones */
.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Botón 1: Blanco sólido (Contactar) */
.btn-pill-white {
    background: white;
    color: var(--primary-color);
    padding: 14px 40px;
    border-radius: 50px; /* Forma de pastilla */
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid white;
}

.btn-pill-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Botón 2: Outline (LinkedIn) */
.btn-pill-outline {
    background: transparent;
    color: white;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,0.8);
    transition: all 0.2s ease;
}

.btn-pill-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}