/*
====================================
COARQ CHILE - REORGANIZACIÓN 2025
Inspirado en Staging.cl
Diseño: Profesional, Limpio, Moderno
====================================
*/

/* ========================================
   1. VARIABLES Y CONFIGURACIÓN
======================================== */

:root {
    /* Colores Primarios */
    --color-primary: #1a1a1a;
    --color-secondary: #2d2d2d;
    --color-accent: #e74c3c;
    --color-accent-hover: #c0392b;
    
    /* Colores Neutros */
    --color-white: #ffffff;
    --color-gray-50: #fafafa;
    --color-gray-100: #f5f5f5;
    --color-gray-200: #eeeeee;
    --color-gray-300: #e0e0e0;
    --color-gray-400: #bdbdbd;
    --color-gray-500: #9e9e9e;
    --color-gray-600: #757575;
    --color-gray-700: #616161;
    --color-gray-800: #424242;
    --color-gray-900: #212121;
    
    /* Tipografía */
    --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Font Sizes - Más grandes y bold */
    --fs-hero: clamp(2.5rem, 8vw, 5.5rem);
    --fs-h1: clamp(2.25rem, 5vw, 4rem);
    --fs-h2: clamp(2rem, 4vw, 3rem);
    --fs-h3: clamp(1.5rem, 3vw, 2rem);
    --fs-h4: clamp(1.25rem, 2vw, 1.5rem);
    --fs-body: clamp(1rem, 1.5vw, 1.125rem);
    --fs-small: clamp(0.875rem, 1.2vw, 1rem);
    --fs-tag: 0.75rem;
    
    /* Espaciado - Más generoso */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --spacing-2xl: 6rem;
    --spacing-3xl: 8rem;
    
    /* Sombras */
    --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.16);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.20);
    
    /* Transiciones */
    --transition-fast: 200ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Container */
    --container-max: 1200px;
    --container-padding: 2rem;
}

/* ========================================
   2. HERO SECTION - REDISEÑADO
======================================== */

.hero-modern {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    overflow: hidden;
}

.hero-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-bg.jpg') center/cover no-repeat;
    opacity: 0.15;
    z-index: 0;
}

.hero-overlay-modern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(26, 26, 26, 0.8) 0%,
        rgba(26, 26, 26, 0.6) 50%,
        rgba(26, 26, 26, 0.9) 100%
    );
    z-index: 1;
}

.hero-content-modern {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: var(--spacing-xl) var(--container-padding);
    animation: fadeInUp 1s ease;
}

/* Badge de confianza */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    font-size: var(--fs-small);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--spacing-md);
    animation: fadeIn 1s ease 0.3s both;
}

.hero-badge i {
    color: #4CAF50;
    font-size: 1rem;
}

/* Título Hero - MUY GRANDE Y BOLD */
.hero-title-modern {
    font-family: var(--font-heading);
    font-size: var(--fs-hero);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 1s ease 0.5s both;
}

.hero-title-modern .highlight {
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtítulo Hero */
.hero-subtitle-modern {
    font-size: var(--fs-h4);
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--spacing-xl);
    animation: fadeInUp 1s ease 0.7s both;
}

/* Estadísticas en Hero */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    animation: fadeInUp 1s ease 0.9s both;
}

.hero-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.hero-stats .stat-number {
    font-family: var(--font-heading);
    font-size: var(--fs-h2);
    font-weight: 700;
    color: var(--color-white);
    line-height: 1;
}

.hero-stats .stat-label {
    font-size: var(--fs-small);
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Botones Hero - Más grandes */
.hero-buttons-modern {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-md);
    animation: fadeInUp 1s ease 1.1s both;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-base);
}

.btn-large i {
    font-size: 1.25rem;
}

/* ========================================
   3. SECTION TAG Y HEADERS MODERNOS
======================================== */

.section-tag {
    display: inline-block;
    font-size: var(--fs-tag);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-accent);
    background: rgba(231, 76, 60, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    margin-bottom: var(--spacing-sm);
}

.section-header-centered {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-xl);
}

.section-title-modern {
    font-family: var(--font-heading);
    font-size: var(--fs-h1);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.section-subtitle-modern {
    font-size: var(--fs-h4);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-gray-600);
}

/* ========================================
   4. ESTADÍSTICAS / NÚMEROS
======================================== */

.stats-section {
    background: var(--color-gray-50);
    padding: var(--spacing-2xl) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.stat-card {
    background: var(--color-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card .stat-icon i {
    font-size: 2rem;
    color: var(--color-white);
}

.stat-card .stat-number {
    font-family: var(--font-heading);
    font-size: var(--fs-h1);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: var(--spacing-sm);
}

.stat-card .stat-label {
    font-size: var(--fs-body);
    color: var(--color-gray-600);
    font-weight: 500;
}

/* ========================================
   5. SERVICIOS - REDISEÑADOS
======================================== */

.servicios-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.servicio-card-modern {
    position: relative;
    min-height: 400px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-base);
}

.servicio-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    background-size: cover;
    background-position: center;
    transition: transform var(--transition-slow);
}

.servicio-card-modern:hover::before {
    transform: scale(1.1);
}

.servicio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(26, 26, 26, 0.5) 0%,
        rgba(26, 26, 26, 0.8) 100%
    );
    z-index: 1;
}

.servicio-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: var(--color-white);
}

.servicio-icon-large {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.servicio-icon-large i {
    font-size: 1.75rem;
    color: var(--color-white);
}

.servicio-card-modern h3 {
    font-family: var(--font-heading);
    font-size: var(--fs-h3);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.servicio-card-modern p {
    font-size: var(--fs-body);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
}

.servicio-price {
    display: inline-block;
    font-size: var(--fs-small);
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border-radius: 50px;
    margin-bottom: var(--spacing-md);
}

.servicio-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--color-white);
    text-decoration: none;
    transition: gap var(--transition-fast);
}

.servicio-cta:hover {
    gap: 1rem;
}

/* ========================================
   6. PROCESO DE TRABAJO
======================================== */

.proceso-section {
    background: var(--color-white);
    padding: var(--spacing-2xl) 0;
}

.proceso-timeline {
    position: relative;
    max-width: 900px;
    margin: var(--spacing-xl) auto 0;
}

.proceso-timeline::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-gray-200);
}

.proceso-step {
    position: relative;
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.proceso-step:last-child {
    margin-bottom: 0;
}

.step-number {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: var(--fs-h2);
    font-weight: 700;
    color: var(--color-white);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
}

.step-content {
    flex: 1;
    background: var(--color-gray-50);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--color-accent);
}

.step-content h3 {
    font-family: var(--font-heading);
    font-size: var(--fs-h3);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.step-content p {
    font-size: var(--fs-body);
    color: var(--color-gray-600);
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
}

.step-duration {
    display: inline-block;
    font-size: var(--fs-small);
    font-weight: 600;
    color: var(--color-accent);
    background: rgba(231, 76, 60, 0.1);
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
}

/* ========================================
   7. FILTROS MODERNOS
======================================== */

.proyectos-filtros-modern {
    background: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-xl);
}

.filtros-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.filtros-header h3 {
    font-family: var(--font-heading);
    font-size: var(--fs-h3);
    font-weight: 700;
    color: var(--color-primary);
}

.proyectos-count {
    font-size: var(--fs-small);
    color: var(--color-gray-600);
    font-weight: 600;
}

.filtros-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.filtro-btn-modern {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--color-gray-50);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    font-weight: 600;
    color: var(--color-gray-700);
    cursor: pointer;
    transition: all var(--transition-base);
}

.filtro-btn-modern:hover {
    background: var(--color-gray-100);
    transform: translateY(-2px);
}

.filtro-btn-modern.active {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.filtro-icon {
    font-size: 1.25rem;
}

.filtro-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.filtro-btn-modern.active .filtro-count {
    background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   8. ANIMACIONES
======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   9. RESPONSIVE
======================================== */

@media (max-width: 768px) {
    :root {
        --container-padding: 1.5rem;
        --spacing-xl: 3rem;
        --spacing-2xl: 4rem;
        --spacing-3xl: 5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .hero-buttons-modern {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-large {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .servicios-grid-modern {
        grid-template-columns: 1fr;
    }
    
    .proceso-timeline::before {
        left: 35px;
    }
    
    .step-number {
        width: 70px;
        height: 70px;
        font-size: var(--fs-h3);
    }
    
    .proceso-step {
        gap: var(--spacing-md);
    }
    
    .filtros-header {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: flex-start;
    }
    
    .filtros-buttons {
        width: 100%;
    }
    
    .filtro-btn-modern {
        flex: 1;
        min-width: calc(50% - 0.5rem);
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .filtro-btn-modern {
        min-width: 100%;
    }
}

/* ========================================
   10. UTILIDADES
======================================== */

.text-center {
    text-align: center;
}

.section-modern {
    padding: var(--spacing-2xl) 0;
}

.container-modern {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.mb-xl {
    margin-bottom: var(--spacing-xl);
}

.mt-xl {
    margin-top: var(--spacing-xl);
}
