/* Variables CSS mejoradas */
:root {
    --primary-red: #dc2626;
    --dark-red: #b91c1c;
    --light-red: #fef2f2;
    --light-gray: #f8fafc;
    --medium-gray: #e2e8f0;
    --dark-gray: #1e293b;
    --text-gray: #1c1e21;
    --white: #ffffff;
    --black: #000000;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --border-radius: 0.75rem;
    --border-radius-lg: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* HEADER Y NAVEGACIÓN MEJORADA CON CAMBIO DE COLOR */
header {
    background: transparent;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

/* Cuando está en la parte superior (sección hero) */
header.top {
    background: transparent;
    box-shadow: var(--shadow);
}

/* Cuando hace scroll fuera del hero */
header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.logo img {
    height: 100px;
    width: 250px;
    background-position: 10px;
    display: block;
    transition: var(--transition);

    background-clip: text;
    filter: drop-shadow(1px 1px 38px rgb(253, 253, 253));
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-links a {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--light-gray);
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

/* Color de los links cuando está en la parte superior */
header.top .nav-links a {
    color: var(--white);
}

header.top .nav-links a:hover {
    color: var(--primary-red);
}

/* Color de los links cuando hace scroll */
header.scrolled .nav-links a {
    color: var(--primary-red);
}

header.scrolled .nav-links a:hover {
    color: var(--dark-red);
}

.nav-links a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Botones del header */
.btn-red {
    background: transparent;
    color: var(--white);
    padding: 0.875rem 2rem;
    border: 2px solid #fff;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
}

.btn-red:hover {
    background: transparent;
    transform: translateY(-2px);
    color: var(--white);
}

.btn-outline {
    color: var(--light-gray);
    background: transparent;
    padding: 0.875rem 2rem;
    border: 2px solid var(--primary-red);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
}

/* Color del botón outline según el estado del header */
header.top .btn-outline {
    color: var(--white);
    border-color: var(--white);
}

header.scrolled .btn-outline {
    color: var(--primary-red);
    border-color: var(--primary-red);
}

.btn-outline:hover {
    background: var(--gradient-primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(220, 38, 38, 0.4);
}

/* MENÚ HAMBURGUESA */
.menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 32px;
    height: 32px;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    position: relative;
}

.menu-icon span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 3px 0;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Color del hamburger según el estado del header */
header.top .menu-icon span {
    background: var(--white);
}

header.scrolled .menu-icon span {
    background: var(--primary-red);
}

/* Secciones de ejemplo */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

#inicio.hero {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
}

.slider,
.slides {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
}

.slide {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center center;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    filter: brightness(0.7);
}

.slide.active {
    opacity: 1;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(220, 38, 38, 0.8);
    border: none;
    color: var(--white);
    font-size: 2rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    z-index: 3;
    transition: var(--transition);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.slider-btn:hover {
    background: rgba(185, 28, 28, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.prev {
    left: 2rem;
}

.next {
    right: 2rem;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--white);
    max-width: 900px;
    padding: 2rem;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.7);
    letter-spacing: -1px;
    line-height: 1.2;
}

.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: white;
    background-clip: text;
    filter: drop-shadow(8px 8px 18px rgb(253, 253, 253));
}

.hero-content p {
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin-bottom: 1rem;
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.6);
    font-weight: 500;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* HERO RESPONSIVE */
@media (max-width: 768px) {
    .navbar {
        background-color: transparent;
    }

    .button {
        color: var(--text-gray);
    }
    .nav-links a {
        text-decoration: none;
        font-weight: 600;
        font-size: 0.95rem;
        color: var(--text-gray);
        transition: var(--transition);
        position: relative;
        padding: 0.5rem 0;
    }
    .hero-content {
        padding: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .slider-btn {
        font-size: 1.5rem;
        padding: 0.75rem 1rem;
    }

    .prev {
        left: 1rem;
    }

    .next {
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 1rem;
    }

    .slider-btn {
        display: none;
    }
}

/* SECCIONES GENERALES MEJORADAS */
section {
    padding: 5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.seccion-bg {
    background: var(--light-gray);
    margin: 0;
    max-width: 100%;
    padding: 5rem 0;
    position: relative;
}

.seccion-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
}

.seccion-bg > * {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--dark-gray);
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    font-weight: 800;
    letter-spacing: -1px;
}

h2::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* QUIÉNES SOMOS MEJORADA */
#quienes-somos {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    margin: 4rem auto;
    padding: 6rem 3rem;
    max-width: 1300px;
    animation: fadeInUp 0.9s;
    overflow: hidden;
    position: relative;
}

#quienes-somos::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.quienes-somos-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    gap: 4rem;
    min-height: 500px;
}

.quienes-somos-content img {
    width: 100%;
    max-width: 550px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--primary-red);
    transition: var(--transition);
    object-fit: cover;
    aspect-ratio: 4/3;
}

.quienes-somos-content img:hover {
    transform: scale(1.02) rotate(1deg);
    box-shadow: var(--shadow-xl);
}

#quienes-somos h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
    color: var(--primary-red);
    text-align: center;
    font-weight: 800;
}

#quienes-somos p {
    color: var(--text-gray);
    font-size: 1.15rem;
    margin-bottom: 2rem;
    line-height: 1.8;
    font-weight: 400;
}

#quienes-somos ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#quienes-somos ul li {
    background: var(--light-gray);
    margin-bottom: 1rem;
    border-left: 5px solid var(--primary-red);
    padding: 1.25rem 1.5rem;
    border-radius: var(--border-radius);
    color: var(--text-gray);
    font-size: 1.1rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

#quienes-somos ul li::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.1) 0%, transparent 100%);
    transition: width 0.3s ease;
}

#quienes-somos ul li:hover::before {
    width: 100%;
}

#quienes-somos ul li:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

#quienes-somos ul li strong {
    color: var(--primary-red);
    font-weight: 700;
    margin-right: 0.5em;
}

/* RESPONSIVE QUIÉNES SOMOS */
@media (max-width: 1024px) {
    #quienes-somos {
        padding: 4rem 2rem;
    }

    .quienes-somos-content {
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .quienes-somos-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .quienes-somos-content img {
        max-width: 400px;
        margin: 0 auto;
    }

    #quienes-somos h2 {
        text-align: center;
    }
}

@media (max-width: 480px) {
    #quienes-somos {
        padding: 2rem 1rem;
        margin: 2rem 0.5rem;
    }

    .quienes-somos-content img {
        max-width: 300px;
    }

    #quienes-somos ul li {
        padding: 1rem;
        font-size: 1rem;
    }
}

/* HISTORIA MEJORADA */
.historia {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    margin: 4rem auto;
    padding: 6rem 3rem;
    max-width: 1300px;
    animation: fadeInUp 0.9s;
    overflow: hidden;
    position: relative;
}

.historia.seccion-bg {
    background: var(--light-gray);
    max-width: 100%;
    padding: 6rem 0;
}

.historia-content {
    display: grid;
    grid-template-columns: 500px 1fr; /* Aumentado de 400px a 500px */
    align-items: center;
    gap: 4rem;
    min-height: 600px; /* Aumentado de 500px a 600px */
    max-width: 1300px;
    margin: 0 auto;
}

.historia-content img {
    height: 300px;
}

.historia h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
    color: var(--primary-red);
    text-align: center;
    font-weight: 800;
}

.historia p {
    color: var(--text-gray);
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-weight: 400;
}

/* RESPONSIVE HISTORIA */
@media (max-width: 1024px) {
    .historia {
        padding: 4rem 2rem;
    }

    .historia-content {
        grid-template-columns: 300px 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .historia-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .historia-content img {
        max-width: 300px;
        margin: 0 auto;
    }

    .historia h2 {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .historia {
        padding: 2rem 1rem;
        margin: 2rem 0.5rem;
    }

    .historia-content img {
        max-width: 250px;
    }

    .historia p {
        font-size: 1rem;
    }
}

/* EXPERIENCIA MEJORADA */
#experiencia {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 4rem 2rem;
    margin: 4rem auto;
    max-width: 1200px;
    animation: fadeInUp 0.9s;
    position: relative;
    overflow: hidden;
}

#experiencia::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.experiencia-header {
    text-align: center;
    margin-bottom: 3rem;
}

#experiencia h2 {
    color: var(--primary-red);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

#experiencia p {
    color: var(--text-gray);
    font-size: 1.2rem;
    margin: 0 auto;
    max-width: 800px;
    line-height: 1.8;
}

.stats-mejoradas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-mejorada {
    background: var(--light-gray);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-mejorada::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: translateY(-4px);
    transition: transform 0.3s ease;
}

.stat-mejorada:hover::before {
    transform: translateY(0);
}

.stat-mejorada:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-red);
    filter: drop-shadow(0 2px 8px rgba(220, 38, 38, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
}

.nro-mejorada {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.desc-mejorada {
    font-size: 1.1rem;
    color: var(--text-gray);
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
}

/* RESPONSIVE EXPERIENCIA */
@media (max-width: 768px) {
    .stats-mejoradas {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    #experiencia {
        padding: 3rem 1.5rem;
        margin: 3rem 1rem;
    }
}

@media (max-width: 480px) {
    .stats-mejoradas {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    #experiencia {
        padding: 2rem 1rem;
        margin: 2rem 0.5rem;
    }

    .stat-mejorada {
        padding: 2rem 1.5rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .nro-mejorada {
        font-size: 2rem;
    }

    .desc-mejorada {
        font-size: 1rem;
    }
}

/* SERVICIOS MEJORADOS */
.servicios {
    background: var(--light-gray);
    padding: 6rem 0;
    position: relative;
}

.servicios::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.servicios-header {
    text-align: center;
    margin-bottom: 4rem;
}

.servicios-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: var(--primary-red);
    margin-bottom: 1rem;
    font-weight: 800;
}

.servicios-subtitle {
    color: var(--text-gray);
    font-size: 1.3rem;
    font-weight: 500;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.servicio-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border-top: 4px solid transparent;
}

.servicio-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.servicio-card:hover::before {
    transform: scaleX(1);
}

.servicio-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-10px) scale(1.02);
}

.servicio-imagen {
    width: 100%;
    max-width: 280px;
    height: 180px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border: 3px solid var(--primary-red);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.servicio-imagen:hover {
    transform: scale(1.05);
}

.servicio-titulo {
    font-size: 1.4rem;
    color: var(--primary-red);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 700;
    line-height: 1.3;
}

.servicio-descripcion {
    color: var(--text-gray);
    font-size: 1.05rem;
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.servicio-caracteristicas {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    width: 100%;
}

.servicio-caracteristicas li {
    padding: 0.75rem 0 0.75rem 2rem;
    position: relative;
    color: var(--text-gray);
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid var(--medium-gray);
}

.servicio-caracteristicas li:last-child {
    border-bottom: none;
}

.servicio-caracteristicas li::before {
    content: "✓";
    color: var(--primary-red);
    font-weight: 700;
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: 0.75rem;
}

.servicio-btn {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: auto;
    transition: var(--transition);
    box-shadow: 0 4px 14px 0 rgba(220, 38, 38, 0.39);
    letter-spacing: 0.5px;
}

.servicio-btn:hover {
    background: linear-gradient(135deg, var(--dark-red) 0%, #991b1b 100%);
    transform: scale(1.05);
    box-shadow: 0 8px 25px 0 rgba(220, 38, 38, 0.5);
}

.servicios-cta {
    text-align: center;
    margin-top: 3rem;
    padding: 3rem 2rem;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.servicios-cta h3 {
    font-size: 1.8rem;
    color: var(--primary-red);
    margin-bottom: 1rem;
    font-weight: 700;
}

.servicios-cta p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px 0 rgba(220, 38, 38, 0.39);
    letter-spacing: 0.5px;
}

.cta-button.secondary {
    background: transparent;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    box-shadow: none;
}

.cta-button:hover {
    background: linear-gradient(135deg, var(--dark-red) 0%, #991b1b 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(220, 38, 38, 0.5);
}

.cta-button.secondary:hover {
    background: var(--gradient-primary);
    color: var(--white);
}

/* RESPONSIVE SERVICIOS */
@media (max-width: 1024px) {
    .servicios-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .servicios-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .servicio-card {
        padding: 2rem 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-button {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .servicios {
        padding: 4rem 0;
    }

    .container {
        padding: 0 1rem;
    }

    .servicio-imagen {
        height: 150px;
    }

    .servicio-card {
        padding: 1.5rem 1rem;
    }

    .servicios-cta {
        padding: 2rem 1rem;
    }
}

.clientes {
    background: var(--light-red);
    padding: 6rem 0;
    position: relative;
}
.clientes-header {
    text-align: center;
    margin-bottom: 4rem;
}
.clientes-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: var(--primary-red);
    margin-bottom: 1rem;
    font-weight: 800;
}
.clientes-subtitle {
    color: var(--text-gray);
    font-size: 1.3rem;
    font-weight: 500;
}
.clientes-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 2.5rem;
    align-items: center;
    justify-items: center;
}
.cliente-logo-item {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-top: 4px solid transparent;
    height: 110px;
}
.cliente-logo-item:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px) scale(1.04);
    border-top: 4px solid var(--primary-red);
}
.cliente-logo-item img {
    max-width: 120px;
    max-height: 70px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    transition: var(--transition);
    filter: grayscale(0.2);
}
.cliente-logo-item img:hover {
    filter: none;
    transform: scale(1.05);
}
@media (max-width: 1024px) {
    .clientes-logos {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}
@media (max-width: 768px) {
    .clientes-logos {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .cliente-logo-item {
        height: 90px;
        padding: 1.2rem 0.5rem;
    }
}
@media (max-width: 480px) {
    .clientes {
        padding: 4rem 0;
    }
    .clientes-logos {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .cliente-logo-item {
        height: 70px;
        padding: 1rem 0.2rem;
    }
    .cliente-logo-item img {
        max-width: 90px;
        max-height: 50px;
    }
}

/* GALERÍA MEJORADA */
.galeria {
    padding: 6rem 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--primary-red);
    margin-bottom: 1rem;
    font-weight: 800;
}

.section-title p {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

.galeria-slider-wrapper {
    position: relative;
    width: 80%;
    max-width: 1000px;
    margin: 2rem auto;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    background: var(--white);
}

.galeria-slider {
    position: relative;
    width: 100%;
    height: 550px; /* Aumenta la altura aquí */
    overflow: hidden;
}

.galeria-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    border-radius: var(--border-radius-lg);
}

.galeria-slide.active {
    opacity: 1;
    z-index: 2;
}

.galeria-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(220, 38, 38, 0.9);
    color: var(--white);
    border: none;
    font-size: 1.8rem;
    padding: 1rem 1.2rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.galeria-slider-btn:hover {
    background: rgba(185, 28, 28, 1);
    transform: translateY(-50%) scale(1.1);
}

.galeria-slider-btn.prev {
    left: 20px;
}

.galeria-slider-btn.next {
    right: 20px;
}

/* RESPONSIVE GALERÍA */
@media (max-width: 768px) {
    .galeria-slider {
        height: 280px;
    }

    .galeria-slider-btn {
        font-size: 1.5rem;
        padding: 0.8rem 1rem;
    }

    .galeria-slider-btn.prev {
        left: 15px;
    }

    .galeria-slider-btn.next {
        right: 15px;
    }
}

@media (max-width: 480px) {
    .galeria-slider {
        height: 220px;
    }

    .galeria-slider-btn {
        font-size: 1.3rem;
        padding: 0.7rem 0.9rem;
    }

    .galeria-slider-btn.prev {
        left: 10px;
    }

    .galeria-slider-btn.next {
        right: 10px;
    }
}

/* VALORES MEJORADOS */
.valores {
    padding: 6rem 2rem;
    background: var(--light-gray);
    position: relative;
}

.valores::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
}

.valores h2 {
    text-align: center;
    color: var(--primary-red);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 4rem;
    font-weight: 800;
}

.valores-detallados {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin: 3rem 0;
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
}

.valor-detalle {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    padding: 3rem 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border-top: 4px solid transparent;
}

.valor-detalle::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.valor-detalle:hover::before {
    transform: scaleX(1);
}

.valor-detalle:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.valor-icono {
    font-size: 3rem;
    color: var(--primary-red);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 12px rgba(220, 38, 38, 0.2));
}

.valor-detalle h3 {
    color: var(--primary-red);
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.valor-detalle p {
    color: var(--text-gray);
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 0;
}

.valores-adicionales {
    margin-top: 3rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.valores-adicionales h3 {
    font-size: 1.5rem;
    color: var(--primary-red);
    margin-bottom: 2rem;
    font-weight: 700;
}

.valores-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.valores-list li {
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: var(--border-radius);
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 4px 14px 0 rgba(220, 38, 38, 0.39);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.valores-list li:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px 0 rgba(220, 38, 38, 0.5);
}

.valores-list li i {
    font-size: 1.3rem;
}

/* RESPONSIVE VALORES */
@media (max-width: 768px) {
    .valores {
        padding: 4rem 1.5rem;
    }

    .valores-detallados {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .valor-detalle {
        padding: 2.5rem 1.5rem;
    }

    .valores-list {
        gap: 1rem;
    }

    .valores-list li {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .valores {
        padding: 3rem 1rem;
    }

    .valor-detalle {
        padding: 2rem 1rem;
    }

    .valor-icono {
        font-size: 2.5rem;
    }

    .valores-list {
        flex-direction: column;
        align-items: center;
    }

    .valores-list li {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}

/* FILOSOFÍA MEJORADA */
.filosofia {
    padding: 6rem 0;
    background: white;
    color: var(--text-gray);
    position: relative;
    overflow: hidden;
}

.filosofia::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgb(255, 255, 255) 100%);
    pointer-events: none;
}

.filosofia .container {
    position: relative;
    z-index: 2;
}

.filosofia-content {
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.filosofia-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--text-gray);
    position: relative;
}

.filosofia-title::after {
    content: "";
    width: 100px;
    height: 4px;
    background: var(--text-gray);
    display: block;
    margin: 2rem auto 0;
    border-radius: 2px;
}

.filosofia-text {
    max-width: 900px;
    margin: 0 auto 4rem;
}

.filosofia-description {
    font-size: 1.3rem;
    line-height: 1.8;
    opacity: 0.95;
    color: var(--text-gray);
}

.filosofia-valores {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.valor-item {
    text-align: center;
    transition: var(--transition);
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.valor-item:hover {
    transform: translateY(-10px) scale(1.05);
    background: rgba(255, 255, 255, 0.1);
}

.valor-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.valor-item h3 {
    font-size: 1.3rem;
    font-weight: 700;
    opacity: 0.95;
    margin: 0;
}

/* RESPONSIVE FILOSOFÍA */
@media (max-width: 768px) {
    .filosofia {
        padding: 4rem 0;
    }

    .filosofia-valores {
        gap: 2rem;
        flex-direction: column;
        align-items: center;
    }

    .valor-item {
        padding: 1.5rem;
        width: 100%;
        max-width: 300px;
    }

    .valor-icon {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .filosofia-description {
        font-size: 1.1rem;
    }

    .valor-icon {
        font-size: 2.5rem;
    }

    .valor-item h3 {
        font-size: 1.1rem;
    }
}

/* GARANTÍAS MEJORADAS */
.garantias {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 4rem 2rem;
    margin: 4rem auto;
    max-width: 1200px;
    animation: fadeInUp 0.9s;
    position: relative;
    overflow: hidden;
}

.garantias::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.garantias h2 {
    color: var(--primary-red);
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
}

.garantias-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.garantia-detalle {
    background: var(--light-gray);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    padding: 3rem 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.garantia-detalle::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.garantia-detalle:hover::before {
    transform: scaleX(1);
}

.garantia-detalle:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.garantia-icon {
    font-size: 2.5rem;
    color: var(--primary-red);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 12px rgba(220, 38, 38, 0.2));
}

.garantia-detalle h3 {
    color: var(--primary-red);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.garantia-detalle p {
    font-size: 1.1rem;
    color: var(--text-gray);
    line-height: 1.7;
    margin: 0;
}

.garantia-detalle strong {
    color: var(--primary-red);
    font-weight: 700;
}

/* RESPONSIVE GARANTÍAS */
@media (max-width: 768px) {
    .garantias {
        padding: 3rem 1.5rem;
        margin: 3rem 1rem;
    }

    .garantias-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .garantia-detalle {
        padding: 2.5rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .garantias {
        padding: 2rem 1rem;
        margin: 2rem 0.5rem;
    }

    .garantia-detalle {
        padding: 2rem 1rem;
    }

    .garantia-icon {
        font-size: 2rem;
    }

    .garantia-detalle h3 {
        font-size: 1.2rem;
    }

    .garantia-detalle p {
        font-size: 1rem;
    }
}

/* CONTACTO MEJORADO */
.contacto-section {
    background: var(--light-gray);
    padding: 5rem 0 4rem 0;
    height: 1300px;
}

.contacto-grid-v2 {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
    background: none;
    align-items: flex-start;
}

.contacto-form-block,
.contacto-info-block {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem 2rem 2rem 2rem;
    box-shadow: var(--shadow-lg);
    position: left;
    min-width: 0;
}

.contacto-title {
    color: var(--primary-red);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    letter-spacing: 1px;
}

.contacto-desc {
    color: var(--text-gray);
    font-size: 1.02rem;
    margin-bottom: 2rem;
}

.contacto-info-block .info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.2rem;
    gap: 1.1rem;
    background: var(--light-gray);
    padding: 0.8rem 1rem;
    border-radius: 9px;
}

.contacto-info-block .info-item i {
    color: var(--light-gray);
    font-size: 1.2rem;
    margin-top: 2px;
}

.contacto-info-block .info-item h4 {
    margin: 0 0 4px 0;
    color: var(--primary-red);
    font-size: 1.04rem;
    font-weight: 700;
}
.contacto-info-block .info-item a,
.contacto-info-block .info-item p {
    margin: 0;
    color: var(--text-gray);
    font-size: 0.99rem;
    text-decoration: none;
    font-weight: 500;
    word-break: break-word;
}

.contacto-info-block .info-item a:hover {
    color: var(--primary-red);
}

.contacto-mapa-tarjeta-v2 {
    margin: 1.5rem 0 1.2rem 0;
}

.mapa-wrapper {
    border-radius: 9px;
    overflow: hidden;
    box-shadow: 0 2px 12px 0 rgba(198, 0, 126, 0.08);
    margin-bottom: 8px;
}

.btn-mapa {
    display: inline-block;
    margin-top: 7px;
    padding: 0.5rem 1.2rem;
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--primary-red) 100%);
    color: #fff;
    font-weight: 700;
    border-radius: 20px;
    font-size: 1rem;
    text-decoration: none;
    transition: filter 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 10px 0 rgba(198, 0, 126, 0.15);
}

.btn-mapa:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 18px 0 rgba(198, 0, 126, 0.22);
}

.social-links {
    margin-top: 1.2rem;
    display: flex;
    gap: 0.8rem;
    justify-content: flex-start;
}

.social-links a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--primary-red) 0%, #e50061 100%);
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s, box-shadow 0.12s;
    box-shadow: 0 2px 8px 0 rgba(198, 0, 126, 0.18);
}

.social-links a:hover {
    transform: translateY(-2px) scale(1.12);
    box-shadow: 0 6px 17px 0 rgba(198, 0, 126, 0.25);
}

/* Formulario */
.contacto-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    color: var(--primary-red);
    font-weight: 700;
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.required {
    color: var(--primary-red);
}

.contacto-form input,
.contacto-form select,
.contacto-form textarea {
    width: 100%;
    padding: 0.8rem 1.1rem;
    border: 2px solid var(--medium-gray);
    border-radius: 7px;
    font-size: 1rem;
    background: var(--white);
    color: var(--text-gray);
    outline: none;
    font-family: inherit;
    transition: border 0.15s;
}

.contacto-form input:focus,
.contacto-form select:focus,
.contacto-form textarea:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(198, 0, 126, 0.08);
}

.contacto-form textarea {
    height: 110px;
    resize: vertical;
    font-family: inherit;
}

.btn-enviar {
    width: 100%;
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--primary-red) 100%);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 7px;
    font-size: 1.09rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, transform 0.12s;
    box-shadow: 0 3px 13px 0 rgba(198, 0, 126, 0.13);
    letter-spacing: 0.5px;
}

.btn-enviar:hover {
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--primary-red) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px 0 rgba(198, 0, 126, 0.24);
}

.confirmation-message {
    display: none;
    text-align: center;
    padding: 2rem;
    background: #f0f9ff;
    border: 2px solid #22c55e;
    border-radius: 7px;
    margin-top: 1rem;
}

.confirmation-message i {
    color: #22c55e;
    font-size: 2.4rem;
    margin-bottom: 0.8rem;
}

.confirmation-message p {
    color: #166534;
    font-size: 1.08rem;
    font-weight: 600;
    margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .contacto-grid-v2 {
        gap: 1.5rem;
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .contacto-grid-v2 {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 96vw;
    }
    .contacto-form-block,
    .contacto-info-block {
        padding: 1.5rem 1rem;
    }
    .contacto-section {
        padding: 2.5rem 0;
    }
}

@media (max-width: 480px) {
    .contacto-form-block,
    .contacto-info-block {
        padding: 1rem 0.5rem;
    }
    .contacto-title {
        font-size: 1.17rem;
    }
}

/* FOOTER MEJORADO */
.main-footer {
    background: var(--light-gray);
    color: var(--text-gray);
    padding: 4rem 0 2rem;
    position: relative;
}

.main-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

.footer-section h4 {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h4::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.75rem;
}
.fab fa-facebook-f {
    color: wheat;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1rem;
    line-height: 1.6;
}

a {
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1rem;
    line-height: 1.6;
}

.footer-section a:hover {
    color: var(--text-gray);
    transform: translateX(3px);
}

.footer-section p {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    font-size: 1.3rem;
    transition: var(--transition);
    box-shadow: 0 4px 14px 0 rgba(220, 38, 38, 0.39);
}

.footer-social-links a:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px 0 rgba(220, 38, 38, 0.5);
}

.footer-copyright {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-gray);
    font-size: 1.1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-copyright a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.footer-copyright a:hover {
    color: #f87171;
}

/* RESPONSIVE FOOTER */
@media (max-width: 768px) {
    .main-footer {
        padding: 3rem 0 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1.5rem;
    }

    .footer-section {
        text-align: center;
    }

    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-content {
        padding: 0 1rem;
    }

    .footer-social-links a {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* ANIMACIONES Y EFECTOS ADICIONALES */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%,
    20%,
    53%,
    80%,
    100% {
        transform: translateY(0);
    }
    40%,
    43% {
        transform: translateY(-10px);
    }
    70% {
        transform: translateY(-5px);
    }
    90% {
        transform: translateY(-2px);
    }
}

/* CLASES UTILITARIAS */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.pulse-animation {
    animation: pulse 2s infinite;
}

.bounce-animation {
    animation: bounce 2s infinite;
}

/* EFECTOS DE HOVER MEJORADOS */
.card-hover {
    transition: var(--transition);
}

.card-hover:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* LOADING STATES */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* MODAL MEJORADO */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.modal-content img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 2rem;
    color: var(--white);
    font-size: 3rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2001;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary-red);
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* TESTIMONIOS MEJORADOS */
.testimonio {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    margin: 2rem 0;
    border-left: 5px solid var(--primary-red);
    position: relative;
    transition: var(--transition);
}

.testimonio::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--primary-red);
    opacity: 0.3;
    font-family: serif;
}

.testimonio:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.testimonio h4 {
    color: var(--primary-red);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.testimonio p {
    color: var(--text-gray);
    font-style: italic;
    line-height: 1.8;
    font-size: 1.1rem;
    margin: 0;
}

/* SCROLL TO TOP BUTTON */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px 0 rgba(220, 38, 38, 0.39);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px 0 rgba(220, 38, 38, 0.5);
}

/* MEJORAS RESPONSIVE GENERALES */
@media (max-width: 1200px) {
    section {
        padding: 4rem 1.5rem;
    }

    .seccion-bg > * {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    section {
        padding: 3rem 1rem;
    }

    .seccion-bg {
        padding: 4rem 0;
    }

    .seccion-bg > * {
        padding: 0 1rem;
    }

    h2 {
        margin-bottom: 2rem;
    }

    .scroll-to-top {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

@media (max-width: 480px) {
    section {
        padding: 2rem 0.5rem;
    }

    .seccion-bg {
        padding: 3rem 0;
    }

    .seccion-bg > * {
        padding: 0 0.5rem;
    }

    .pe {
        font-size: 1rem;
    }

    .scroll-to-top {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        bottom: 1rem;
        right: 1rem;
    }
}

/* OPTIMIZACIONES DE RENDIMIENTO */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
}

/* MEJORAS DE ACCESIBILIDAD */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* FOCUS STATES MEJORADOS */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* HIGH CONTRAST MODE */
@media (prefers-contrast: high) {
    :root {
        --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
        --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* DARK MODE SUPPORT */
@media (prefers-color-scheme: dark) {
    /* Variables para modo oscuro */
    :root {
        --light-gray: #ffffff;
        --medium-gray: #374151;
        --text-gray: #313234;
        --dark-gray: #f9fafb;
    }

    /* Ajustes específicos para modo oscuro */
    .hero-content {
        color: var(--white);
    }

    .slide {
        filter: brightness(0.8);
    }
}

/* PRINT STYLES */
@media print {
    * {
        background: rgb(0, 0, 0) !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .navbar,
    .hero,
    .scroll-to-top,
    .modal {
        display: none !important;
    }

    section {
        page-break-inside: avoid;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        page-break-after: avoid;
    }
}

/* CUSTOM SCROLLBAR */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--dark-red) 0%, #991b1b 100%);
}

/* SELECTION STYLES */
::selection {
    background: var(--primary-red);
    color: var(--white);
}

::-moz-selection {
    background: var(--primary-red);
    color: var(--white);
}
