:root {
    --primary-color: #800020;
    --primary-light: #aa1c3a;
    --text-color: #2d2d2d;
    --light-bg: #ffffff;
    --white: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --burgundy: #800020;
    --burgundy-dark: #4a0012;
    --shadow-color: rgba(128, 0, 32, 0.1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --safe-area-inset-top: env(safe-area-inset-top);
    --safe-area-inset-bottom: env(safe-area-inset-bottom);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Estilos generales */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding-top: 160px;
    background-color: #f5f5f5;
    color: #333;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: clamp(2rem, 4vw, 4rem) clamp(1.5rem, 3vw, 3rem);
    background: linear-gradient(135deg, var(--burgundy), var(--burgundy-dark));
    border-radius: 16px;
    box-shadow: 
        0 10px 30px var(--shadow-color),
        0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    animation: headerReveal 1s ease-out;
    width: 100%; /* Ensure header takes full width */
}

.hero {
    width: 95%; /* Hace que la barra llegue casi al borde de la pantalla */
    max-width: none;
    margin: 0 auto; /* Centra la barra horizontalmente */
    padding: clamp(3rem, 5vw, 5rem) clamp(2rem, 4vw, 4rem); /* Aumenta el padding arriba y abajo */
    border-radius: 16px; /* Mantiene los bordes redondeados */
}




.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0.6;
}

@keyframes headerReveal {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}


/* Responsive Design - Hero Section */
@media (max-width: 768px) {
     .hero {
        width: 90%; /* Ajusta el ancho para móviles */
        margin: 3.5rem auto; /* Centra el hero section horizontalmente */
        padding: 2rem 1rem; /* Ajusta el padding para móviles */
        border-radius: 12px; /* Bordes redondeados para móviles */
    }

    .hero h1 {
        font-size: clamp(1.8rem, 5vw, 2.2rem); /* Ajusta el tamaño del texto para móviles */
    }
}

/* Servicios Section */
.services-section {
    background-color: #e6e6e6;
    padding: 60px 0;
}

.services-title {
    text-align: center;
    font-size: 2.5rem;
    margin: 40px 0;
    color: #8b0000;
}

.services {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-item {
    border-left: 5px solid #8b0000;
    width: calc(33.333% - 20px);
    box-sizing: border-box;
    background-color: white;
    margin: 15px auto;
    padding: 0;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
    border-radius: 15px;
    will-change: transform, box-shadow;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.service-item img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-item:hover img {
    transform: scale(1.05);
}

.service-content {
    padding: 25px;
    background-color: #f9f9f9;
    width: 100%;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.service-content:hover {
    background-color: rgba(139, 0, 0, 0.9);
    color: white;
}

.service-item h3 {
    color: #8b0000;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.service-content:hover h3 {
    color: white;
}

.service-content p {
    text-align: justify;
}

.service-item p {
    font-size: 1rem;
    color: #666;
}

.service-content:hover p {
    color: #f0f0f0;
}

.service-item a {
    text-decoration: none;
}

/* Responsive Design - Servicios Section */
@media (max-width: 768px) {
    html, body {
        margin: 0 !important;
        padding: 0 !important;
        width: 100%;
    }

    body {
        padding-top: 100px;
    }

    .services-title {
        margin-top: 60px;
        padding-top: 0;
    }

    .services-section {
        padding-top: 5px;
        background: none;
    }

    .services {
        flex-direction: column;
    }

    .service-item {
        width: 90%;
        max-width: 400px;
        margin: 15px auto;
    }
}

/* Responsive Design - Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    body {
        padding-top: 130px;
    }

    .hero {
        width: 92%;
        margin: 5rem auto 3rem;
        padding: 3.5rem 2rem;
    }

    .hero h1 {
        font-size: clamp(2rem, 4vw, 2.3rem);
    }

    .services {
        padding: 0 10px;
        gap: 10px;
        justify-content: center;
    }

    .service-item {
        width: calc(50% - 8px);
        margin: 4px;
    }

    .services-title {
        font-size: 2.2rem;
        margin: 30px 0;
    }

    .service-item h3 {
        font-size: 1.6rem;
    }

    .service-content {
        padding: 20px;
    }
}

/* Estilos para computadoras */
@media (min-width: 769px) {
    .services {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .service-item {
        width: calc(33.333% - 20px);
    }
}