/* --- Base & Variables --- */
@font-face {
    font-family: "Mulish", sans-serif;
    src: url("/assets/font/Mulish-VariableFont_wght.ttf");
    font-optical-sizing: auto;
    font-weight: weight;
    font-style: normal;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-dark: #0a0a0a;
    --bg-medium: #141414;
    --bg-light: #222222;
    --text-primary: #f0f4f8;
    --text-secondary: #afafaf;
    --accent-primary: #00BFFF;
    --accent-secondary: #009acd;
    --font-primary: "Mulish", sans-serif, system-ui;
    --container-width: 1250px;
    --header-height: 70px;
    --border-radius: 6px;
    --shadow-light: 0 4px 10px rgba(0, 191, 255, 0.05);
    --shadow-medium: 0 6px 15px rgba(0, 191, 255, 0.1);
    --carousel-speed: 240s;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex: 1;
}

.back-to-top {
    z-index: 50;
    position: fixed;
    bottom: 20px;
    right: 20px;
    border: 2px solid var(--text-primary);
    padding: 5px 10px;
    transition: color, background, border-color ease-in-out 0.3s;
    cursor: pointer;
}

.back-to-top i {
    color: var(--text-primary);
    transition: color, background, border-color ease-in-out 0.3s;
}

.back-to-top &:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.back-to-top &:hover i {
    color: var(--text-primary);
}







/* --- Utilities --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 30px;
}

.container-lg,
.container-md,
.container-sm,
.container-xl,
.container-xxl {
    width: 100%;
    padding-right: var(--bs-gutter-x, .75rem);
    padding-left: var(--bs-gutter-x, .75rem);
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container-sm {
        max-width: 540px;
    }
}

@media (min-width: 768px) {

    .container-md,
    .container-sm {
        max-width: 720px;
    }
}

@media (min-width: 992px) {

    .container-lg,
    .container-md,
    .container-sm {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {

    .container-lg,
    .container-md,
    .container-sm,
    .container-xl {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {

    .container-lg,
    .container-md,
    .container-sm,
    .container-xl,
    .container-xxl {
        max-width: 1320px;
    }
}

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

.text-accent {
    color: var(--accent-primary);
}

.mb-1 {
    margin-bottom: .5rem
}

.mb-2 {
    margin-bottom: 1rem
}

.mb-3 {
    margin-bottom: 1.5rem
}

.mb-4 {
    margin-bottom: 2rem
}

.mb-5 {
    margin-bottom: 3rem
}

.mt-1 {
    margin-top: .5rem
}

.mt-2 {
    margin-top: 1rem
}

.mt-3 {
    margin-top: 1.5rem
}

.mt-4 {
    margin-top: 2rem
}

.mt-5 {
    margin-top: 3rem
}

.py-1 {
    padding-top: .5rem;
    padding-bottom: .5rem
}

.py-2 {
    padding-top: 1rem;
    padding-bottom: 1rem
}

.py-3 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem
}

.py-4 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem
}

.py-5 {
    padding-top: 4rem;
    padding-bottom: 4rem
}

.px-1 {
    padding-right: .5rem;
    padding-left: .5rem
}

.px-2 {
    padding-right: 1rem;
    padding-left: 1rem
}

.px-3 {
    padding-right: 1.5rem;
    padding-left: 1.5rem
}

.px-4 {
    padding-right: 2.5rem;
    padding-left: 2.5rem
}

.px-5 {
    padding-right: 4rem;
    padding-left: 4rem
}

.section {
    padding: 5rem 0;
    border-bottom: 1px solid var(--bg-light);
    position: relative;
    overflow: hidden;
}

.section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 100;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: 750px;
    margin: 0 auto 4rem auto;
    font-weight: 300;
}

.hidden {
    display: none !important;
}

.d-flex {
    display: flex;
}

.w-auto {
    width: auto;
}

.w-100 {
    width: 100%;
}

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

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

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

.m-auto {
    margin: auto;
}

.min-vh-100 {
    min-height: 100vh;
}

.min-vh-80 {
    min-height: 80vh;
}

.bg-medium {
    background-color: var(--bg-medium);
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.3;
    font-weight: 600;
    color: var(--text-primary)
}

h1 {
    font-size: 3.8rem;
    font-weight: 100;
    letter-spacing: -.02em
}

h2 {
    font-size: 2.5rem
}

h3 {
    font-size: 1.3rem;
    font-weight: 400;
}

h4 {
    font-size: 1.2rem
}

p {
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color .3s ease
}

a:focus,
a:hover {
    color: var(--accent-secondary);
    text-decoration: none
}

strong {
    font-weight: 600;
    color: var(--text-primary)
}



/* Specific styles for legal pages */

.legal-content h2 {
    text-align: left;
    margin-bottom: 2rem;
}

.legal-content h3,
.legal-content p strong:first-child {
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
    display: block;
    color: var(--text-primary);
}

.legal-content p,
.legal-content li {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.legal-content ol,
.legal-content ul {
    margin-left: 2rem;
    margin-bottom: 1.2rem;
}

.legal-content ul li {
    margin-bottom: 0.5rem;
}

.legal-content ol>li {
    margin-bottom: 1rem;
}

.legal-content ol ol li,
.legal-content ol ul li {
    margin-bottom: 0.5rem;
}





/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    background-image: linear-gradient(to right, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: transform .3s ease, box-shadow .3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 191, 255, .2)
}

.btn:focus,
.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 191, 255, .3);
    color: #fff
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    background-image: none;
    box-shadow: none
}

.btn-secondary:focus,
.btn-secondary:hover {
    background-color: rgba(0, 191, 255, .1);
    color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: none
}

.btn-small {
    padding: 8px 18px;
    font-size: 0.9rem;
}





/* --- Header --- */
.main-header {
    background-color: rgba(10, 10, 10, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0 25px;
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: 0.02em;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-primary);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.8rem;
    cursor: pointer;
}




/* --- Hero Section --- */
.page-section {
    padding-bottom: 5rem;
}

.inicio-container {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: var(--header-height);
    border-bottom: none;
    overflow: hidden;
}

.hero-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    background-color: var(--bg-dark);
}

.hero-video-background video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.inicio-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background: rgba(10, 10, 10, 0.2);*/
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
    margin: unset;
    margin-top: auto;
    width: 40rem;
}

.hero-title {
    font-size: 2rem;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    font-weight: 900;
}

.hero-title-h1 {
    font-size: 5rem;
}

.hero-title-politicas {
    font-size: 1.5rem;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.btn-trapecio {
    margin: 0;
    display: inline-block;
    padding: 15px 60px;
    font-size: 18px;
    font-weight: bold;
    border: 0;
    border-radius: 0;
    color: var(--accent-primary);
    width: 100%;
    /* Color del texto parecido */
    background: var(--bg-dark);
    /* Fondo del botón */
    text-align: center;
    text-decoration: none;
    clip-path: polygon(8% 0, 92% 0, 100% 100%, 0% 100%);
    transition: all 0.3s ease;
    transform: translateY(2px);
}

.mapWorksEnserio .mapboxgl-map .mapboxgl-ctrl-logo {
    display: none;
}

.mapWorksEnserio .mapboxgl-map .marker span {
    display: flex;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.mapWorksEnserio .mapboxgl-map .map-enserio {
    z-index: 100;
}

.mapWorksEnserio .mapboxgl-map .map-enserio span {
    width: 50px;
    height: 50px;
}

.mapWorksEnserio .mapboxgl-map .mapboxgl-popup {
    max-width: 200px;
    margin-top: -10px;
}

.mapWorksEnserio .mapboxgl-map .mapboxgl-ctrl-logo {
    display: none;
}

.mapWorksEnserio .mapboxgl-map .mapboxgl-popup-content {
    text-align: center;
    font-family: var(--font-primary);
    padding: 0 15px 10px;
}

.mapWorksEnserio .mapboxgl-map .mapboxgl-popup-content .h5,
.mapWorksEnserio .mapboxgl-map .mapboxgl-popup-content h5 {
    background: var(--accent-primary);
    color: var(--text-primary);
    margin: 0;
    padding: 10px;
    border-radius: 3px;
    font-weight: 700;
    margin-top: -15px;
    font-size: 1rem;
    margin-bottom: 5px;
}

.mapWorksEnserio .mapboxgl-map .mapboxgl-popup-content img {
    max-height: 50px;
}

.mapWorksEnserio .mapboxgl-map .mapboxgl-popup-content p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.mapWorksEnserio .mapboxgl-map .mapboxgl-popup-content+div {
    padding: 10px;
}

.mapWorksEnserio .mapboxgl-map .mapboxgl-popup-close-button {
    font-size: 20px;
    padding: 0 2px;
    transition: .3s;
    color: #000;
}

.mapWorksEnserio .mapboxgl-map .mapboxgl-popup-close-button:hover {
    transform: rotate(90deg);
}

.mapWorksEnserio .mapboxgl-map .mapboxgl-popup-close-button:focus {
    outline: 0;
}

.mapWorksEnserio .mapboxgl-map .mapboxgl-popup-anchor-top>.mapboxgl-popup-content {
    margin-top: 15px;
}

.mapWorksEnserio .mapboxgl-scroll-zoom-blocker,
.mapWorksEnserio .mapboxgl-touch-pan-blocker {
    pointer-events: none;
}


/* --- Success Stories Home --- */

.success-stories-container {
    padding: 2rem 0;
    border-top: 1px solid var(--bg-light);
    background-color: var(--bg-medium);
}

.success-stories-title {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3.5rem;
    color: var(--text-primary);
}

.success-stories-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.success-story-item {
    background-color: var(--bg-dark);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .success-story-item {
        flex-direction: row;
        align-items: stretch;
    }

    .success-story-item .video-thumbnail {
        flex-basis: 40%;
        flex-shrink: 0;
        padding-bottom: 0;
        height: auto;
    }

    .success-story-item .story-info {
        flex-basis: 60%;
        padding: 2rem 2.5rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .success-story-item:nth-child(even) {
        flex-direction: row-reverse;
    }
}

.success-story-item:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.story-info {
    padding: 1.5rem;
}

.story-info .story-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.story-info p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}



/* --- Portfolio Section --- */

.portfolio {
    background-color: var(--bg-medium);
    padding: 50px 0;
}


.portfolio-grid,
.awards-gallery {
    display: grid;
    gap: 2rem;
    justify-content: center;
}

.portfolio-grid {
    margin-top: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.awards-gallery {
    grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 992px) {

    .portfolio-grid,
    .awards-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {

    .portfolio-grid,
    .awards-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

.portfolio-grid.line-1,
.awards-gallery.line-1 {
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

.portfolio-grid.line-2,
.awards-gallery.line-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 576px) {

    .portfolio-grid.line-1-sm,
    .awards-gallery.line-1-sm {
        grid-template-columns: repeat(1, 1fr);
        gap: 1.5rem;
    }
}


.portfolio-item {
    background-color: var(--bg-dark);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
}

.portfolio-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.video-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background-color: var(--bg-light);
    cursor: pointer;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.4s ease;
    z-index: 1;
}

.video-thumbnail video.portfolio-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 3;
    background-color: #000;
}


.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 👇 aseguramos que SIEMPRE se vea */
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10;
}

.video-play-button::before {
    content: "";
    border-left: 22px solid #fff;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}

.portfolio-info {
    padding: 1.2rem 1.5rem;
}

.portfolio-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.portfolio-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.4;
}

.portfolio-category {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--accent-primary);
    background-color: rgba(0, 191, 255, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}


.video-thumbnail {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background-color: #000;
    aspect-ratio: 16 / 9;
}

.video-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    /* Para que llene el contenedor con aspect-ratio */
    object-fit: cover;
    /* Cubre el área sin distorsionar */
    position: absolute;
    /* Para que esté en el flujo normal antes del click */
    top: 0;
    left: 0;
    transition: opacity 0.3s ease;
    /* Transición suave si la ocultas en hover */
}

.video-thumbnail:hover img {
    opacity: 0.7;
    /* Efecto al pasar el ratón */
}

/* Estilos para el iframe una vez cargado */
.video-thumbnail iframe {
    position: absolute;
    /* Posiciona sobre el contenedor */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    /* Quita cualquier borde por defecto */
}

.video-cabecera {
    margin: auto;
    text-align: center;
    width: fit-content;
}

.video-cabecera video {
    width: 100%;
}

.award-icon {
    top: 12px;
    left: 12px;
    width: 35px;
    height: auto;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    padding: 3px;
    z-index: 5;
}

.oro {
    color: #d4af37;
    background-color: rgba(212, 175, 55, 0.1);
}

.plata {
    color: #C0C0C0;
    background-color: rgba(192, 192, 192, 0.1);
}

.bronce {
    color: #b87333ff;
    background-color: rgba(184, 115, 51, 0.1);
}

.awards-info {
    padding: 1.5rem 0.8rem;
}

.awards-category {
    display: inline-block;
    font-size: .8rem;
    padding: 3px 8px;
    border-radius: 4px;
    margin: 0 10px;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.awards-icons {
    display: flex;
    align-items: center;
    margin-top: 1rem;
}

/* --- Contact Section --- */
#contacto {
    background-color: var(--bg-medium);
    padding: 50px 0;
}

#contacto .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    margin-top: 4rem;
    align-items: start;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px 18px;
    margin-bottom: 1.2rem;
    border: 1px solid var(--bg-light);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.2);
}

.contact-form textarea {
    min-height: 160px;
    resize: vertical;
}

.contact-form button {
    width: 100%;
    margin-top: 0.5rem;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.contact-info p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-info ul {
    list-style: none;
    padding: 0;
}

.contact-info li {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 1.05rem;
}

.contact-info .icon-placeholder {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background-color: rgba(0, 191, 255, 0.1);
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    border-radius: 50%;
    font-size: 1rem;
    font-weight: bold;
}

.contact-info a:hover {
    color: var(--text-primary);
}

.contact-form .check-privacy input {
    width: auto;
}


/* reCAPTCHA container */
.grecaptcha-badge {
    width: 70px !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    left: 0 !important;
    bottom: 0 !important;
    transform: scale(0.95);
    transform-origin: 0 0;
    z-index: 5;
}

.grecaptcha-badge:hover {
    width: 256px !important;
}

@media (max-width: 400px) {
    .grecaptcha-badge {
        transform: scale(0.85);
    }
}


/* --- ERROR PAGE --- */

.full-page-bg {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}



/* --- Client Logo Carousel --- */
#client-carousel-section {
    padding: 3rem 0;
    background-color: var(--bg-dark);
    border-bottom: none;
    overflow: hidden;
}

.carousel-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.carousel-track {
    display: flex;
    width: max-content;
    animation: scrollLogos var(--carousel-speed) linear infinite;
    will-change: transform;
}

.carousel-wrapper:hover .carousel-track {
    animation-play-state: paused;
}

.logo-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    flex-shrink: 0;
}

.logo-slide img {
    max-height: 70px;
    max-width: 180px;
    width: auto;
    filter: grayscale(100%) brightness(0.7) opacity(0.6);
    transition: filter 0.4s ease, opacity 0.4s ease;
}

.logo-slide:hover img {
    filter: grayscale(0%) brightness(1) opacity(1);
}

@keyframes scrollLogos {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-1 * ((70px + 2rem) * (172*(1)))));
    }
}

@media (max-width: 576px) {
    @keyframes scrollLogos {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-1 * ((70px + 2rem) * (172*(1/2)))));
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .carousel-track {
        animation: none;
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
    }

    .logo-slide {
        margin-bottom: 1rem;
    }

    .carousel-wrapper {
        mask-image: none;
        -webkit-mask-image: none;
    }
}

/* --- Footer --- */
.main-footer {
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid var(--bg-light);
}

.main-footer .logo {
    justify-content: center;
    margin-bottom: .5rem;
}

.main-footer .logo img {
    height: 60px;
}

.footer-socials a {
    color: var(--text-secondary);
    margin: 0 12px;
    font-size: 1.6rem;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.footer-socials a:hover {
    color: var(--accent-primary);
    transform: translateY(-3px);
}

.main-footer p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.main-footer a {
    color: var(--text-secondary);
}

.main-footer a:hover {
    color: var(--accent-primary);
}

.footer-socials img {
    width: 25px;
    height: 25px;
}

.footer-socials a:hover img {
    filter: invert(53%) sepia(45%) saturate(1677%) hue-rotate(159deg) brightness(100%) contrast(109%);
}


/* --- Cookie Consent Banner --- */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text-primary);
    padding: 1.5rem 2rem;
    z-index: 1100;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    transition: transform 0.5s ease-in-out;
}

.cookie-consent-banner.hidden {
    transform: translateY(100%);
    visibility: hidden;
}

.cookie-consent-text {
    flex-grow: 1;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-right: 1rem;
}

.cookie-consent-text a {
    color: var(--accent-primary);
    text-decoration: underline;
}

.cookie-consent-text a:hover {
    color: var(--accent-secondary);
}

.cookie-consent-buttons {
    display: flex;
    gap: 0.8rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .cookie-consent-banner {
        flex-direction: column;
        text-align: center;
        padding: 1rem 1.5rem;
    }

    .cookie-consent-text {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .cookie-consent-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* --- Animations on Scroll --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    :root {
        --container-width: 960px;
    }

    h1 {
        font-size: 3.5rem;
    }

    .hero-title-h1 {
        font-size: 3.8rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .section {
        padding: 4rem 0;
    }

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

    .page-section {
        padding-bottom: 4rem;
    }

    .story-info .story-title {
        font-size: 1.5rem;
    }

    .story-info p {
        font-size: 0.9rem;
    }

    #contacto .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .success-stories-grid {
        gap: 2rem;
    }

    .logo-slide {
        padding: 0 1rem;
    }

    .legal-content {
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 65px;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: rgba(20, 20, 20, 0.98);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        display: none;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
        z-index: 999;
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
        text-align: center;
    }

    .main-nav li {
        width: 100%;
    }

    .main-nav a {
        padding: 15px 20px;
        display: block;
        width: 100%;
        font-size: 1.1rem;
    }

    .main-nav a::after {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
        z-index: 1001;
        position: relative;
    }

    h1 {
        font-size: 2.8rem;
    }

    .hero-title-h1 {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .section-subtitle {
        font-size: 1.1rem;
    }

    .success-story-item {
        flex-direction: column;
        max-width: 90%;
    }

    .success-story-item .video-thumbnail {
        flex-basis: auto;
    }

    .success-story-item .story-info {
        flex-basis: auto;
        padding: 1.5rem;
    }

    .success-story-item:nth-child(even) {
        flex-direction: column;
    }

    .success-stories-title {
        font-size: 1.8rem;
        margin-bottom: 2.5rem;
    }

    .portfolio-info h3,
    .story-info .story-title {
        font-size: 1.2rem;
    }

    .portfolio-info p,
    .story-info .story-text {
        font-size: 0.85rem;
    }

    .logo-slide {
        padding: 0 1rem;
    }

}

@media (max-width: 576px) {
    .container {
        padding: 0 20px;
    }

    h1 {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-title-h1 {
        font-size: 2.5rem;
    }

    .page-section p {
        font-size: 1.1rem;
    }

    .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    .logo img {
        height: 35px;
    }

    .section {
        padding: 3rem 0;
    }

    .page-section {
        padding-bottom: 3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .portfolio-info,
    .story-info {
        padding: 1rem 1.2rem;
    }

    .logo-slide {
        padding: 0 0.8rem;
    }

    .legal-content {
        padding: 0 10px;
    }

    .cookie-consent-buttons .btn {
        width: 45%;
        font-size: 0.85rem;
        padding: 10px 15px;
    }
}

/* --- PAGINAS PORTFOLIO --- */
.hero-section {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: var(--header-height);
    overflow: hidden;
    border-bottom: 1px solid var(--bg-light);
}

.hero-section-fitted {
    min-height: 70vh;
}

.hero-section-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    background-color: #1a1a1a;
    /* Estilo movido desde inline */
    background-image: url('/img/hosteleria/hero.jpg');
    background-position: 50.46% 98.96%;
    background-size: cover;
    /* Asegura que cubra */
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.65);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    padding: 0 20px;
}

.hero-subtitle {
    /* Estilo movido desde inline (parcialmente) */
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}