:root {
    --primary-color: #22A5E5;
    --secondary-color: #104A8D;

    --select-bg-color: #22A5E580;
    --select-text-color: #F5F5F5;

    --bg-color: #F3F3F3;

    --title-color: #1F1F1F;
    --title-size: 32px;
    --title-weight: 800;

    --subtitle-color: #2C2C2C;
    --subtitle-size: 20px;
    --subtitle-weight: 750;

    --text-color: #414141;
    --text-size: 18px;

    --link-color: #1497D8;
    --link-color-hover: #53C5FD;
--navbar-bg-color: var(--primary-color);
    --navbar-font-color: #E6E6E6;
    --navbar-font-color-hover: #FFFFFF;
    --navbar-menu-item-active-color: #2260D2;

    --scrolltotop-bg-color: var(--primary-color);

    --carousel-button-color: #656565;
    --carousel-button-color-hover: #D3D3D3;

    --section-bg-color: #FAF8F8;  /* This color is applied only to odd-numbered elements. */
    --section-title-size: 27px;
    --section-img-shadow-left: -20px 20px 0 0 #4E7272;
    --section-img-shadow-right: 20px 20px 0 0 #4E7272;
    --section-bg-img-title-color: #DADADA;
    --section-bg-img-color: #C5C5C5;

    --container-max-width: 1200px;

    --header-font-color: #F8F8F8;

    --item-bg-color: #F8F8F8;
    --item-border-radius: 8px;
    --item-padding: 15px;
    --item-image-bg-color-loading: #7A7A7A;
    --item-image-border-radius: 8px;
    --item-title-size: 18px;

    --wrapper-item-box-shadow: 0 0 10px 0 #00000030;

    --button-color: var(--secondary-color);
    --button-text-color: #E0E0E0;
    --button-text-size: 17px;
    --button-text-weight: 650;
    --button-padding: 10px 15px;
    --button-border-radius: 8px;
    --button-color-hover: #135DB1;
    --button-primary-color: #2274d2;
    --button-primary-color-hover: #3687e4;
    --button-secondary-color-hover: #D8D8D8;

    --form-bg-color: #E8E8E8;
    --input-error-color: #E65100;

    --notification-bg-color: #E3E3E3;
    --notification-info-color: #59bfef;
    --notification-success-color: #59ef72;
    --notification-warn-color: #ef9559;
    --notification-error-color: #EF596F;

    --color-instagram: #E1306C;
    --color-facebook: #4267B2;
    --color-phone: #4285F4;
    --color-whatsapp: #25D366;
    --color-email: #DB4437;

    --rate-color: #FFD037;

    --icon-color: #505050;

    --footer-bg-color: #232333;
    --footer-title-color: #E6E6E6;
    --footer-copyright-bg-color: #131323;
    --footer-p-color: #ACACAC;
    --footer-link-color: #8C8C8C;
}

* {
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Nunito";
    font-size: var(--text-size);
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    margin-top: 75px;
}

p {
    line-height: 1.6;
}

body::selection {
    background-color: var(--select-bg-color);
    color: var(--select-text-color);
}

a {
    text-decoration: none;
}

.info p {
    margin: 10px 0;
}

.link {
    text-decoration: none;
    color: var(--link-color);
    transition: .3s ease color;
}
.link:hover {
    color: var(--link-color-hover);
}

#main {
    min-height: 60vh;
    margin: 10vh 0 0 0;
}

.title {
    font-size: var(--title-size);
    font-weight: var(--title-weight);
    color: var(--title-color);
    text-align: center;
}

.subtitle {
    font-size: var(--subtitle-size);
    font-weight: var(--subtitle-weight);
    color: var(--subtitle-color);
    text-align: center;
}

.section {
    padding: 20px 0;
}
.section:nth-child(odd) {
    background-color: var(--section-bg-color);
}
.section.section-row .container {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 20px;
}
.section.section-background {
    position: relative;
    background-color: var(--secondary-color);
    background-image: var(--section-bg-image);
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    background-blend-mode: soft-light;
    text-align: center;
    color: var(--section-bg-img-color);
    padding: 110px 0;
    clip-path: ellipse(110% 120% at 50% -20%);
}

.section.section-background .section-background-title {
    color: var(--section-bg-img-title-color);
    font-size: 20px;
}

.section.section-background .button {
    display: block;
    position: relative;
    left: auto;
    transform: none;
    width: fit-content;
    margin: 50px auto 0;
}

.section.section-background .contact {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* CTA curvada: misma respiración vertical que las páginas de servicios */
.section.section-background.section-cta {
    padding: 80px 0 110px;
}

.section-title {
    max-width: var(--container-max-width);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    font-size: var(--section-title-size);
    color: var(--title-color);
    font-weight: var(--title-weight);
    margin-bottom: 20px;
}

.section-description {
    max-width: var(--container-max-width);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    font-size: var(--text-size);
    color: var(--text-color);
    margin-bottom: 15px;
}

.section .item-image {
    margin-top: 35px;
}

.container {
    position: relative;
    max-width: var(--container-max-width);
    width: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 30px;
}

.item {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.item-image {
    width: 50%;
    border-radius: var(--item-border-radius);
    overflow: hidden;
    background-color: var(--item-image-bg-color-loading);
    user-select: none;
}
.item-image.shadow-left {
    box-shadow: var(--section-img-shadow-left);
    margin-bottom: 20px;
}
.item-image.shadow-right {
    box-shadow: var(--section-img-shadow-right);
    margin-bottom: 20px;
}

.item-image .img-loading {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    filter: blur(10px);
    transition: .2s ease opacity, .4s ease filter;
}

.item-image .img-loaded {
    opacity: 1;
    filter: blur(0);
}
.item-image .img-error {
    opacity: 0;
}

.item-content {
    width: 50%;
    display: flex;
    flex-direction: column;
    color: var(--text-color);
    gap: 5px;
    padding: 10px;
}

.item-title {
    font-size: var(--item-title-size);
    font-weight: var(--title-weight);
    color: var(--title-color);
}

a .item-title {
    transition: .2s ease color;
}
a:hover .item-title {
    color: var(--primary-color);
}

.wrapper {
    position: relative;
    width: fit-content;
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.wrapper-item {
    width: fit-content;
    max-width: 280px;
    display: table;
    background-color: var(--item-bg-color);
    border-radius: var(--item-border-radius);
    box-shadow: var(--wrapper-item-box-shadow);
    overflow: hidden;
}
.wrapper-item:has(a) {
    transition: .3s ease transform;
}
.wrapper-item:has(a):hover {
    transform: translateY(-2%);
}

.wrapper-item .item-image {
    width: 100%;
    border-radius: 0;
}

.wrapper .item-content {
    width: 90%;
}

.button {
    display: block;
    width: fit-content;
    text-decoration: none;
    color: var(--button-text-color);
    font-weight: var(--button-text-weight);
    font-size: var(--button-text-size);
    padding: var(--button-padding);
    border-radius: var(--button-border-radius);
    background-color: var(--button-color);
    transition: .2s ease background-color;
    cursor: pointer;
    outline: none;
    border: none;
    user-select: none;
}
.button:hover {
    background-color: var(--button-color-hover);
}
.button:disabled {
    background-color: var(--bg-color);
    border: 2px solid var(--text-color);
    color: var(--text-color);
    cursor: not-allowed;
}
.button:disabled:hover {
    background-color: var(--bg-color);
}
.button-primary {
    background-color: var(--button-primary-color);
}
.button-primary:hover {
    background-color: var(--button-primary-color-hover);
}
.button-secondary {
    background-color: var(--bg-color);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}
.button-secondary:hover {
    background-color: var(--button-secondary-color-hover);
}

.carousel {
    position: relative;
    transform: translateX(-50%);
    left: 50%;
    height: 100%;
    aspect-ratio: 16 / 9;
}

.carousel-button {
    position: absolute;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 30px;
    color: var(--carousel-button-color);
    transition: .3s ease left, .3s ease right, .2s ease color;
    padding: 0 15px;
    cursor: pointer;
    z-index: 1;
}
.carousel-button.button-prev {
    left: 0;
}
.carousel-button.button-prev:hover {
    left: -5px;
    color: var(--carousel-button-color-hover);
}
.carousel-button.button-next {
    right: 0;
    justify-content: end;
}
.carousel-button.button-next:hover {
    right: -5px;
    color: var(--carousel-button-color-hover);
}

.carousel-items {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}
.carousel-items.animate {
    transition: .3s ease left;
}

.carousel-item {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    opacity: .4;
}
.carousel-item.active {
    opacity: .8;
}

.section.reviews .wrapper-item {
    max-width: 385px;
    transition: .3s ease transform;
}
.section.reviews .wrapper-item:hover {
    transform: translateY(-2%);
}

.section.reviews .item-image {
    width: 150px;
    height: 150px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    margin: 10px 0;
}

.section.reviews .rate {
    font-size: var(--section-title-size);
    text-align: center;
    color: var(--rate-color);
}

.section.reviews .item-content .name {
    font-size: var(--section-title-size);
    font-weight: var(--title-weight);
    color: var(--title-color);
    transition: .2s ease color;
}
.section.reviews .wrapper-item:hover .item-content .name {
    color: var(--secondary-color);
}

.section.reviews .button {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 50px;
}

#scrollToTop {
    display: none;
    width: 50px;
    height: 50px;
    position: fixed;
    right: 1em;
    bottom: 1em;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: var(--button-text-color);
    background-color: var(--scrolltotop-bg-color);
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    z-index: 99;
}

form {
    background-color: var(--form-bg-color);
    padding: 10px;
    border-radius: 8px;
}

.field-multiple {
    display: flex;
    gap: 15px;
}

.field-multiple .field {
    width: 100%;
}

.field {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 15px 0;
}

.field input, .field select {
    --input-color: var(--text-color);

    background-color: transparent;
    outline: none;
    border: 2px solid var(--input-color);
    border-radius: 8px;
    padding: 12px;
    z-index: 2;
    transition: .2s ease border;
}
.field input:focus, .field select:focus {
    --input-color: var(--primary-color);
}
.field input::placeholder {
    opacity: 0;
}
.field::after {
    content: attr(data-label);
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--form-bg-color);
    color: var(--input-color);
    padding: 0 4px;
    transition: .2s ease top, .2s ease font-size, .2s ease color;
    z-index: 1;
}
.field:has(input:not(:placeholder-shown))::after, .field:has(select:valid)::after {
    --input-color: var(--text-color);

    top: -9px;
    font-size: 12px;
    z-index: 2;
}
.field:has(input:focus)::after, .field:has(select:focus)::after {
    --input-color: var(--primary-color);

    top: -9px;
    font-size: 12px;
    z-index: 2;
}
.field:has(.error) input, .field:has(.error):has(input:focus)::after, .field:has(.error):has(input:not(:placeholder-shown))::after,
.field:has(.error) select, .field:has(.error):has(select:focus)::after, .field:has(.error):has(select:valid)::after {
    --input-color: var(--input-error-color);
}

.field select option {
    background-color: var(--form-bg-color);
}
.field select option:checked {
    background-color: var(--primary-color);
    color: white;
}

.field .error {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--input-error-color);
}

.field .field-checkbox {
    display: flex;
    align-items: center;
}
.field .field-checkbox input {
    width: 15px;
    height: 15px;
}
.field .field-checkbox label {
    padding-left: 5px;
}

.field.checkboxes-simplified:has(.field-checkbox) .wrapper {
    gap: 5px;
}

.field.checkboxes-simplified input[type=checkbox] {
    display: none;
}
.field.checkboxes-simplified:has(input[type=checkbox]) label {
    padding: 5px;
    border: 2px solid var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    transition: .2s ease border-color, .2s ease background-color, .2s ease color;
}
.field.checkboxes-simplified:has(input[type=checkbox]) label:hover {
    background-color: var(--bg-color);
}
.field.checkboxes-simplified .field-checkbox:has(input[type=checkbox]:disabled) label {
    cursor: not-allowed;
    opacity: 0.5;
}
.field.checkboxes-simplified .field-checkbox:has(input[type=checkbox]:checked) label {
    border-color: var(--primary-color);
    background-color: var(--bg-color);
    color: var(--primary-color);
}

.switches .field:not(:first-of-type)::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 1px;
    background-color: var(--text-color);
    opacity: .5;
}

.field:has(.switch) {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 0;
}

.field .switch {
    --switch-color: var(--text-color);
    --switch-border-size: 2px;

    position: relative;
    width: 50px;
    aspect-ratio: 5 / 2;
    border: var(--switch-border-size) solid var(--switch-color);
    border-radius: 50px;
    transition: .2s ease border-color;
}
.field .switch:has(input[type=checkbox]:checked) {
    --switch-color: var(--primary-color);
}
.field .switch:has(input[type=checkbox]:disabled) {
    opacity: .5;
}
.field .switch::before {
    content: "";
    position: absolute;
    top: var(--switch-border-size);
    left: var(--switch-border-size);
    display: inline-block;
    height: calc(100% - (var(--switch-border-size) * 2));
    aspect-ratio: 1 / 1;
    background-color: var(--switch-color);
    border-radius: 50%;
    transition: .2s ease background-color, .2s ease left, .2s ease transform;
}
.field .switch:has(input[type=checkbox]:checked) {
    background-color: var(--primary-color);
}
.field .switch:has(input[type=checkbox]:checked)::before {
    left: calc(100% - var(--switch-border-size));
    background-color: var(--bg-color);
    transform: translateX(-100%);
}

.field .switch input {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110%;
    height: 150%;
    opacity: 0;
    transform: translate(-50%, -50%);
}

input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px var(--form-bg-color) inset !important;
}

.notifications {
    position: fixed;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px;
    z-index: 3;
}

.notification {
    position: relative;
    width: fit-content;
    background-color: var(--notification-bg-color);
    padding: 10px 40px 10px 20px;
    border-radius: 8px;
    overflow: hidden;
    animation: slideInLeft .5s ease-out forwards, fadeIn .6s ease-in forwards;
}
.notification::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 100%;
    background-color: var(--bg-color);
}
.notification.info::after {
    background-color: var(--notification-info-color);
}
.notification.success::after {
    background-color: var(--notification-success-color);
}
.notification.warn::after {
    background-color: var(--notification-warn-color);
}
.notification.error::after {
    background-color: var(--notification-error-color);
}

.notification-title {
    font-weight: var(--title-weight);
    color: var(--title-color);
}

.notification-subtitle {
    font-weight: var(--subtitle-weight);
    color: var(--subtitle-color);
}

.notification-description {
    margin: 0 !important;
}

.notification-timer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: 1s linear width;
}

.notification-delete {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    padding: 5px;
    text-align: center;
    border-radius: 50%;
    transition: .2s ease background-color;
    cursor: pointer;
}
.notification-delete:hover {
    background-color: #FFFFFF30;
}

.cookie-pop-up {
    width: fit-content;
    max-width: 450px;
    background-color: var(--section-bg-color);
    border-radius: 10px;
    box-shadow: 0 0 6px -2px;
    padding: 10px;
    z-index: 3;
}

.cookie-pop-up .wrapper {
    justify-self: end;
    gap: 10px;
    margin-top: 10px;
}

.iframe {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7;
    background-color: var(--item-image-bg-color-loading);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 8px;
    border: 0;
    overflow: hidden;
}
.iframe-map {
    background-image: url('/public/img/mapa.png');
}

.iframe a {
    position: absolute;
    width: 100%;
    height: 100%;
}

@media (max-width: 800px) {

    .container,
    .section-title,
    .section-description {
        max-width: 90%;
    }

    .wrapper {
        justify-content: center;
    }

    .services .wrapper {
        width: 100%;
        max-width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .services .wrapper-item {
        width: 100%;
        max-width: 360px;
    }

}

.section.section-background .section-background-description {
    color: var(--section-bg-img-color);
    max-width: 850px;
    margin: 15px auto 0;
    text-align: center;
    font-size: 18px;
}

/* ==========================================
   MAPA
========================================== */

.location-container{
    margin-top:40px;
}

.location-map{
    width:100%;
    max-width:1000px;
    margin:0 auto;
}

.location-map .iframe{
    width:100%;
    min-height:430px;
    border-radius:12px;
    overflow:hidden;
}

.location-button{
    width:100%;
    display:flex;
    justify-content:center;
    margin-top:30px;
}

@media (max-width:800px){

    .location-map{
        max-width:100%;
    }

    .location-map .iframe{
        min-height:320px;
    }

}

/* ==================================================
   AJUSTES FINALES DE CABECERAS Y SECCIONES
   ================================================== */

/* Unión limpia entre navegación y hero */
#navbar {
    margin-bottom: 0 !important;
    border-bottom: 0 !important;
}

#header {
    margin-top: -4px !important;
    border-top: 0 !important;
}

/* Curva superior exclusiva de Sobre Nosotros */
.section.section-background.about-background {
    clip-path: ellipse(110% 120% at 50% 120%);
}

/* Cabeceras de las secciones con imagen */
.section.section-background {
    padding-top: 50px;
    padding-bottom: 50px;
}

.section.section-background .section-background-title {
    font-size: 26px;
    line-height: 1.2;
    margin: 0 auto;
}

.section.section-background .section-background-description,
.section.section-background p {
    font-size: 18px;
    line-height: 1.6;
}

/* Botones de las secciones con imagen */
.section.section-background .button {
    font-size: 17px;
    padding: 12px 20px;
}

/* Centrado y posición estable del contenido de las franjas */
.section.section-background .container {
    position: relative;
    width: min(90%, 1200px);
    max-width: 1200px;
    left: auto;
    transform: none;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
    text-align: center;
}

/* Mantener el desplazamiento vertical original de estas franjas */
.section.section-background.section-cta .container,
.section.section-background.about-background .container,
.section.section-background.precios-background .container {
    top: 20px;
}

/* El contenido interno también queda centrado respecto a la franja */
.section.section-background .section-background-title,
.section.section-background .section-background-description,
.section.section-background .button {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Ajustes específicos para móvil */
@media (max-width: 800px) {
    .section.section-background {
        padding-top: 50px;
        padding-bottom: 50px;
    }

    .section.section-background .container {
        width: 90%;
        max-width: 90%;
        left: auto;
        transform: none;
        margin-left: auto;
        margin-right: auto;
        padding-left: 0;
        padding-right: 0;
        box-sizing: border-box;
        text-align: center;
    }

    .section.section-background .section-background-title,
    .section.section-background .section-background-description,
    .section.section-background p {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        box-sizing: border-box;
    }

}

/* FADE IN */
.fade-in {
    animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.section.section-background .section-background-title {
    font-size: 26px;
    margin-bottom: 12px;
}

.section.section-background .section-background-description {
    margin: 0 auto;
}

@media (max-width: 800px) {

    #main .notifications + .section > .section-title,
    #main .notifications + .section > .section-description {
        text-align: center;
    }

}

@media (max-width: 800px) {

    #main .section.reviews > .section-title,
    #main .section.reviews > .section-description {
        text-align: center;
    }

    #main .section.location > .section-title,
    #main .section.location > .section-description {
        text-align: center;
    }
    
}
