/* === ESTILOS GENERALES === */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    background-color: #ffffff;
}

button {
    border: initial;
    background: initial;
    color: initial;
    padding: initial;
    margin: initial;
    text-decoration: initial;
    cursor: pointer;
}

a {
    text-decoration: none;
    color: inherit;
}

textarea {
    resize: none;
}

*:focus {
    outline: none;
}

h1 {
    font-family: "Oswald", serif;
    font-size: 38px;
    font-weight: 600;
}

h2 {
    font-family: "Oswald", serif;
    font-size: 32px;
    font-weight: 600;
}

h3 {
    font-family: "Oswald", serif;
    font-size: 18px;
    font-weight: 400;
}

p {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* === MENÚ DE NAVEGACIÓN === */
.menu{
    width: 100%;
    padding: 0;
    margin: 0;
    min-height: 100px;
    background-color: white;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.nav-item {
    display: flex;
    align-items: center;
}
.nav-link {
    font-family: "Oswald", serif;
    padding: 5px 25px;
    color: #4D4D4D;
    cursor: pointer;
    white-space: nowrap;
    transition-duration: 0.3s;
    border-right: solid 2px #C6C6C6;
    width: 120px;
    text-align: center;
}
.nav-link.active, .dropdown-toggle.active {
    color: #EA3325;
}
.nav-item:last-child .nav-link {
    border-right: none;
}
.nav-link.nav-link-wrapper{
    padding: 5px 20px;
    background: #555555;
    color: white;
    border-radius: 300px;
    margin-left: 20px;
    transition-duration: 0.3s;
    border: none;
}
.nav-link.nav-link-wrapper:hover{
    background: #6F201C;
    color: white;
}
.navbar-brand{
    height: 100px;
    width: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}
.navbar-brand img{
    height: 42px;
}
.dropdown-menu {
    border-radius: 0;
    border: 1px solid #eee;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.dropdown-item {
    font-family: "Oswald", serif;
    color: #4D4D4D;
    padding: 10px 20px;
}
.dropdown-item:hover {
    background-color: #6F201C;
    color: white;
}
/* Estilo para el icono del menú de hamburguesa */
.navbar-toggler-icon{
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* === BOTONES SOCIALES === */
.social-container {
    position: fixed;
    right: 0px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1031;
}

.social-container img {
    margin-bottom: 5px;
    border-radius: 8px 0px 0px 8px;
    transition: transform 0.3s ease;
}
.social-container a:hover img {
    transform: translateX(-5px);
}

/* === ENCABEZADO (MASTHEAD) === */
.masthead {
    height: 600px;
    box-sizing: border-box;
    background-image: url(../img/servicios/hero-servicios.jpg);
    background-size: cover;
    background-position: center;
    color: white;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.masthead::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
}
.masthead .row {
    position: relative;
    z-index: 1;
}

.masthead h1 {
    margin-bottom: 20px;
}

/* === CONTENEDOR DE SERVICIOS === */
.servicio-container {
    padding: 80px 15px;
}

.servicio-header {
    margin-bottom: 80px;
}

.servicio-container hr {
    background-color: #6F201C;
    height: 3px;
    width: 80px;
    margin: 20px auto 0 auto;
    opacity: 1;
}

.servicio-row {
    margin-bottom: 120px;
    align-items: center;
}

.servicio-img {
    padding: 0;
    height: 380px;
    width: 380px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.servicio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.servicio-text-wrapper {
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.servicio-title {
    margin-bottom: 20px;
}

.servicio-title-icon {
    height: 80px;
    width: 80px;
    background-color: #333333;
    padding: 15px;
    margin-right: 25px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.servicio-title-icon img {
    max-width: 100%;
    max-height: 100%;
}

/* --- TARJETAS INFERIORES --- */
.servicio-card-row {
    margin-top: 40px;
}

.servicio-card-wrapper {
    padding: 15px;
    margin-bottom: 20px;
}

.servicio-card {
    background-color: #6F201C;
    border-radius: 10px;
    color: white;
    overflow: hidden;
    height: 380px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.servicio-card:hover{
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.servicio-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.servicio-card h3 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    padding: 20px;
}

.bi-check-circle-fill {
    margin-right: 10px;
    font-size: 20px;
    vertical-align: middle;
}

/* === CTA CON VIDEO DE FONDO === */
.cta-container-wrapper {
    position: relative;
    height: 500px;
    overflow: hidden;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: -2;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.cta-container {
    position: relative;
    z-index: 1;
}

.cta-container-wrapper button {
    margin-top: 20px;
    padding: 18px 40px;
    background-color: #6F201C;
    border-radius: 100px;
    color: white;
    font-family: "Oswald", serif;
    font-size: 16px;
    transform: translateY(0px);
    transition: all 0.3s ease;
    box-shadow: 0px 8px 20px -10px rgba(111,32,28,0.5);
}

.cta-container-wrapper button:hover {
    transform: translateY(-5px);
    background-color: white;
    color: #6F201C;
    box-shadow: 0px 10px 25px -10px rgba(0,0,0,0.4);
}

/* === FOOTER (ESTILOS RESTAURADOS) === */
footer{
    padding: 30px 0px;
    background-color: white;
    color: #1A1A1A;
}
footer img{
    margin-bottom: 20px;
    height: 60px;
}

/* === RESPONSIVE === */

/* --- AJUSTES PARA EL MENÚ MÓVIL (PUNTO DE QUIEBRE LG) --- */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 15px;
        background-color: #f8f9fa;
        border-radius: 0.25rem;
        padding: 1rem 0;
    }
    .nav-link {
        border-right: none;
        padding: 12px 15px;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #ddd;
    }
    .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    .nav-link.nav-link-wrapper {
        margin: 0;
        padding: 12px 15px;
        background: transparent;
        color: #4D4D4D;
        border-radius: 0;
    }
    .dropdown-menu {
        box-shadow: none;
        border: none;
        background-color: #e9ecef;
        text-align: center;
        width: 100%;
    }
    .dropdown-item {
        text-align: center;
        border-bottom: 1px solid #ddd;
    }
    .dropdown-item:last-child {
        border-bottom: none;
    }

    /* Ajustes específicos de la página de servicios */
    .servicio-row {
        text-align: center;
    }
    .servicio-img {
        margin-bottom: 30px;
        height: 250px;
        width: 250px;
    }
    .servicio-text-wrapper {
        padding: 0 15px;
    }
    
    /* === INICIO CAMBIO SOLICITADO === */
    .servicio-title {
        justify-content: center;
        flex-direction: column; /* Apila el icono y el título verticalmente */
    }
    .servicio-title-icon {
        margin-right: 0; /* Elimina el margen derecho */
        margin-bottom: 20px; /* Añade espacio debajo del icono */
    }
    /* === FIN CAMBIO SOLICITADO === */
}

@media (max-width: 767px) {
    h1 { font-size: 32px; }
    h2 { font-size: 28px; }

    .masthead {
        height: 450px;
        padding: 0 20px;
    }
    
    .servicio-container {
        padding: 60px 15px;
    }

    .servicio-row {
        margin-bottom: 60px;
    }

    .servicio-img {
        height: 200px;
        width: 200px;
    }

    .cta-container-wrapper {
        height: auto;
        padding: 80px 20px;
    }
    .cta-container-wrapper h1 {
        font-size: 28px;
    }
}