/* style.css - Concepto "Claridad Sofisticada" (Versión Mejorada) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;700;900&display=swap');

:root {
    --background-light: #F8F9FA;
    --text-dark: #212529;
    --text-secondary: #6C757D;
    --accent-orange: #FD7E14;
    --accent-yellow: #FFC107;
    --border-color: #969696;
    /* Un poco más claro */
    --card-background: #FFFFFF;
    --font-family: 'Inter', sans-serif;
}

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

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

body {
    background-color: var(--background-light);
    color: var(--text-dark);
    font-family: var(--font-family);
    overflow-x: hidden;
    cursor: none;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.loading {
    overflow: hidden;
}

/* --- Herramienta de Accesibilidad --- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* --- Preloader --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--text-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.preloader-logo {
    height: 60px;
    filter: brightness(0) invert(1);
    animation: pulse 1.5s ease-in-out infinite;
}

/* --- Cursor Personalizado --- */
.cursor {
    width: 25px;
    height: 25px;
    background: transparent;
    border: 2px solid var(--accent-orange);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, width 0.3s ease, height 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    z-index: 9999;
}

.cursor.is-hovering {
    transform: translate(-50%, -50%) scale(2.5);
    background: var(--background-light);
    mix-blend-mode: difference;
    border-color: transparent;
}

/* --- Header --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    z-index: 1000;
    background: transparent;
    transition: background-color 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
    border-bottom: 1px solid transparent;
}

.main-header.scrolled {
    background: rgba(248, 249, 250, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem 5%;
    border-bottom: 1px solid var(--border-color);
}

.logo img {
    height: 50px;
    width: auto;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.main-nav a {
    color: var(--text-dark);
    text-decoration: none;
    margin-left: 2.5rem;
    font-weight: 400;
    position: relative;
    padding-bottom: 0.5rem;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-yellow), var(--accent-orange));
    transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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

/* --- Botón de App Rediseñado (Elegante y Animado) --- */
.btn-app {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--card-background);
    /* Fondo inicial */
    color: var(--text-dark);
    /* Color de texto inicial */
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    overflow: hidden;
    z-index: 1;
    transition: color 0.4s ease-in-out;
}

.btn-app::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, var(--accent-yellow), var(--accent-orange));
    z-index: -1;
    border-radius: 50px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease-in-out;
}

.btn-app:hover::before {
    transform: scaleX(1);
}

.main-nav a.btn-app:hover,
.mobile-nav a.btn-app:hover {
    color: var(--card-background);
    /* Texto blanco al pasar el cursor */
}

.btn-app i {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn-app:hover i {
    transform: translateX(4px);
}

.main-nav .btn-app::after {
    display: none;
}

/* --- Menú Hamburguesa --- */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-menu .line {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 6px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-menu.is-active .line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger-menu.is-active .line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.is-active .line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--background-light);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.86, 0, 0.07, 1);
}

.mobile-nav.is-active {
    transform: translateX(0);
}

.mobile-nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 2rem;
    margin: 1.5rem 0;
    font-weight: 700;
}

.mobile-nav .btn-app {
    margin-top: 2rem;
    font-size: 1.5rem;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    position: relative;
    background-color: var(--background-light);
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-family: var(--font-family);
    font-weight: 900;
    font-size: clamp(3.5rem, 10vw, 8rem);
    line-height: 1.1;
    color: var(--text-dark);
}

.hero-content h1 .gradient-text {
    color: var(--accent-orange);
    /* Fallback para navegadores sin soporte */
    background: linear-gradient(90deg, var(--accent-yellow), var(--accent-orange));
    background-clip: text;
}


.hero-content p {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    margin-top: 2.5rem;
    max-width: 600px;
    font-weight: 300;
    text-align: justify;
    hyphens: auto;
}

/* --- Animación de texto con Splitting.js --- */
.splitting .char {
    opacity: 0;
    transform: translateY(40px) skewY(10deg);
    animation: reveal-char 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes reveal-char {
    to {
        opacity: 1;
        transform: translateY(0) skewY(0);
    }
}

/* --- Secciones Generales --- */
section {
    padding: 8rem 5%;
    position: relative;
    overflow: hidden;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

h2 {
    font-family: var(--font-family);
    font-weight: 900;
    font-size: clamp(3rem, 6vw, 4.5rem);
    margin-bottom: 4rem;
    text-align: center;
    color: var(--text-dark);
}

p {
    text-align: justify;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

/* --- About Section --- */
.about-section {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 7rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.about-content {
    text-align: left;
}

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

.about-content p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-secondary);
    max-width: 600px;
    font-weight: 300;
}

.image-hover-container {
    position: relative;
    width: 110%;
    height: 800px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.image-hover-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.7s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.image-hover-container .overlay-image {
    transform: translateY(101%);
}

.image-hover-container.is-visible .overlay-image {
    transform: translateY(0);
}

/* --- SECCIÓN QUIÉNES SOMOS FUTURISTA --- */
.about-section-futurista {
    position: relative;
    width: 100vw;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.about-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/static/bogota.webp') center center/cover no-repeat;
    z-index: 1;
    filter: brightness(0.7) blur(0.5px) saturate(1.2);
    transition: filter 0.5s;
}

.about-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(16, 38, 60, 0.85) 0%, rgba(16, 38, 60, 0.25) 60%, rgba(34, 211, 238, 0.10) 100%);
    z-index: 2;
    pointer-events: none;
}

.about-content-futurista {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    /* Alinea los elementos (texto e imagen) al final (abajo) */
    justify-content: space-between;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 80px 6vw 0 6vw;
    /* Se elimina el padding inferior para que la imagen llegue al borde */
    min-height: 480px;
}

.about-text-futurista {
    flex: 1 1 420px;
    color: #fff;
    text-align: left;
    padding-right: 40px;
    backdrop-filter: blur(2px);
}

.about-text-futurista h2 {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -1.5px;
    margin-bottom: 18px;
    color: #ca8b02;

}

.about-text-futurista p {
    font-size: 1.25rem;
    line-height: 1.7;
    color: #e0f7fa;
    font-weight: 400;
    text-shadow: 0 2px 16px rgba(16, 38, 60, 0.18);
}

.about-image-futurista {
    flex: 1 1 640px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    min-width: 0;
    /* Evita que el contenedor crezca más allá de su contenido */


}

.overlay-image-futurista {
    width: 640px;
    max-width: 100%;
    transition: filter 0.4s;
}

@keyframes floatY {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(-18px) scale(1.04);
    }
}

@media (max-width: 900px) {
    .about-content-futurista {
        flex-direction: column;
        align-items: center;
        /* Se reestablece el centrado para la vista móvil */
        padding: 48px 4vw 0;
        /* Eliminamos el padding inferior para que la imagen pueda pegarse abajo */
        min-height: 420px;
    }

    .about-text-futurista {
        padding-right: 0;
        margin-bottom: 32px;
        text-align: center;
    }

    .about-image-futurista {
        justify-content: center;
        min-width: 0;

        /* ===== INICIO DE LA CORRECCIÓN ===== */
        position: absolute;
        /* Hacemos que se pueda posicionar libremente */
        bottom: 0;
        /* La pegamos al borde inferior de la sección */
        left: 50%;
        /* La centramos horizontalmente */
        transform: translateX(-50%);
        /* Ajustamos el centrado */
        width: auto;
        /* Dejamos que el ancho lo defina la imagen interior */
        /* ===== FIN DE LA CORRECCIÓN ===== */
    }

    .overlay-image-futurista {
        width: 220px;
    }

    .about-text-futurista h2 {
        font-size: 2.1rem;
    }
}

/* --- Presence Section --- */
#presence {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--background-light);
}

.presence-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 5rem auto;
}

.presence-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    text-align: center;
}

.maps-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 3rem;
    flex-wrap: wrap;
    width: 100%;
}

.map-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    flex: 1;
    max-width: 500px;
    min-width: 320px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        border-color 0.4s ease;
}

.map-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-orange);
}

.map-card h4 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.map-card h4 strong {
    font-weight: 700;
}

.map-display {
    width: 100%;
    min-height: 350px;
    max-height: 450px;
    display: block;
    position: relative;
    text-align: center;
}

/* Botón Ver Mapa Completo */
.btn-fullscreen-map {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-yellow));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(253, 126, 20, 0.3);
}

.btn-fullscreen-map:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 126, 20, 0.4);
}

.btn-fullscreen-map svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    min-width: 16px;
    min-height: 16px;
    flex-shrink: 0;
}

.map-display>svg {
    width: 100%;
    height: 350px;
    max-width: 500px;
    margin: 0 auto;
    display: block;
}

.map-display>svg.active {
    opacity: 1;
}

.map-display svg path {
    fill: var(--border-color);
    stroke: var(--card-background);
    stroke-width: 1.5px;
    transition: fill 0.3s ease;
    cursor: pointer;
}

.map-display svg path:hover {
    fill: var(--accent-orange);
}

/* Tooltip para Mapas */
.map-tooltip {
    position: fixed;
    background-color: var(--text-dark);
    color: var(--background-light);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -150%);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10000;
    white-space: nowrap;
}

/* --- Stats Section --- */
.stats-section .section-container {
    display: flex;
    justify-content: space-around;
    text-align: center;
    flex-wrap: nowrap;
    /* Evita que los elementos se dividan en varias líneas */
    gap: 2rem;
    /* Para pantallas muy pequeñas, permite el desplazamiento horizontal */
    overflow-x: auto;
    padding-bottom: 1rem;
    /* Espacio para la barra de scroll si aparece */
}

.stat-item h3 {
    font-family: var(--font-family);
    font-weight: 900;
    font-size: clamp(3.5rem, 7vw, 5rem);
    background: linear-gradient(90deg, var(--accent-yellow), var(--accent-orange));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-item p {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    text-align: center;
}

/* --- Services Section --- */
.services-section {
    background-color: var(--background-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

.service-card {
    background: var(--card-background);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: left;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1), border-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-orange);
}

.service-card h4 {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-weight: 300;
}

.icon-container {
    margin-bottom: 1.5rem;
    color: var(--accent-orange);
    /* Se define el color aquí para que el SVG lo herede */
}

.icon-container svg {
    width: 48px;
    height: 48px;
    stroke-width: 2;
    /* 'stroke' ya es 'currentColor' por defecto, por lo que hereda el naranja del padre */
}

#otros-servicios {
    background-color: var(--card-background);
}

#otros-servicios {
    background-color: var(--card-background);
}

/* --- Gallery Section (Accordion) --- */
.gallery-section {
    background-color: var(--background-light);
}

.gallery-subtitle {
    text-align: center;
    max-width: 700px;
    margin: -3rem auto 4rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.accordion-gallery {
    display: flex;
    gap: 1rem;
    width: 100%;
    height: 60vh;
    max-height: 550px;
    min-height: 400px;
}

.accordion-item {
    flex: 1;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.accordion-item:hover {
    flex: 5;
}

.accordion-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    transition: height 0.5s ease;
}

.accordion-item:hover::after {
    height: 60%;
}

.accordion-content {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    color: var(--card-background);
    z-index: 2;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.6s 0.2s ease, opacity 0.6s 0.2s ease;
}

.accordion-item:hover .accordion-content {
    transform: translateY(0);
    opacity: 1;
}

.accordion-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.accordion-content p {
    font-size: 1rem;
    font-weight: 300;
    max-width: 80%;
    text-align: left;
    hyphens: none;
    color: rgba(255, 255, 255, 0.85);
}

/* --- Collaborators Section --- */
.collaborators-section {
    padding-top: 10rem;
    padding-bottom: 10rem;
    background-color: var(--background-light);
    /* Cambiado para usar el fondo claro principal */
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.collaborators-section h2 {
    color: var(--text-dark);
    /* Cambiado para usar el color de texto oscuro principal */
    margin-bottom: 5rem;
}

.carousel-viewport {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    gap: 2.5rem;
    /* 40px */
    width: fit-content;
    animation: scroll 40s linear infinite;
}

/* Se aplica una animación diferente para el carrusel en móviles */
@media (max-width: 768px) {
    .carousel-track {
        animation-name: scroll-mobile;
    }
}

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

.collaborator-card {
    width: 380px;
    flex-shrink: 0;
    background: var(--card-background);
    padding: 2.5rem;
    border-radius: 16px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.collaborator-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

.collaborator-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.collaborator-logo {
    height: 45px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
}

.collaborator-header h3 {
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--text-dark);
}

.collaborator-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 300;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

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

    100% {
        transform: translateX(calc(-420px * 5));
    }
}

/* Animación del carrusel para móviles, con tarjetas más pequeñas */
@keyframes scroll-mobile {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-314px * 5));
        /* (290px de tarjeta + 24px de espacio) */
    }
}

/* --- Footer --- */
.main-footer {
    background-color: var(--text-dark);
    color: var(--background-light);
    padding: 8rem 5% 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    text-align: left;
    margin: 0 auto 6rem;
    max-width: 1200px;
}

.main-footer h2 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    color: var(--background-light);
    text-align: left;
}

.footer-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-yellow);
    margin-bottom: 1.5rem;
}

.footer-info .slogan {
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 90%;
}

.footer-details p,
.footer-details a {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: color 0.3s ease;
}

.footer-details a:hover {
    color: var(--accent-orange);
}

.footer-details svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--accent-yellow);
}

.footer-copyright {
    margin-top: 5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-top: 1px solid #444;
    padding-top: 3rem;
    text-align: center;
}

/* --- Botón Volver Arriba --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--text-dark);
    color: var(--background-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 998;
    opacity: 0;
    transform: translateY(100px);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease, background-color 0.3s ease;
}

.back-to-top:hover {
    background-color: var(--accent-orange);
}

.back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* --- Animaciones de Scroll --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    transition-delay: var(--delay, 0s);
}

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


/* ===== INICIO DRONE (VERSIÓN CINEMÁTICA) ===== */
.drone-wrapper {
    padding: 0;
    height: 100vh;
    /* Altura para controlar el "pinning" del scroll */

}

.drone-sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

#escena {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #000;
}

.vignette-overlay {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 15;
    transition: opacity 1s ease;
}

#fondo-dron {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
    transform: scale(8.5) rotate(5deg);
    /* 👇 LÍNEA CORREGIDA: Se añadió "filter" a la transición */
    transition: transform 6s cubic-bezier(0.25, 1, 0.5, 1), filter 6s cubic-bezier(0.25, 1, 0.5, 1);
    filter: blur(6px);
}

.drone-wrapper.is-visible #fondo-dron {
    transform: scale(1) rotate(0deg);
    filter: blur(0px);
}

#contenedor-dron {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: clamp(250px, 30vw, 350px);
    height: auto;
    animation: drone-hover 5s ease-in-out infinite;
    /* Añadir esto para asegurar que el contenedor se ajuste correctamente */
    max-width: 90vw;
}

@keyframes drone-hover {
    0% {
        transform: translate(-50%, -50%) rotateZ(0deg) translateX(0);
    }

    25% {
        transform: translate(-50%, -50%) rotateZ(0.5deg) translateX(5px);
    }

    50% {
        transform: translate(-50%, -50%) rotateZ(0deg) translateX(0);
    }

    75% {
        transform: translate(-50%, -50%) rotateZ(-0.5deg) translateX(-5px);
    }

    100% {
        transform: translate(-50%, -50%) rotateZ(0deg) translateX(0);
    }
}

#dron-img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.helice {
    position: absolute;
    width: 200px;
    z-index: 1;
    transition: filter 0.3s ease, animation-play-state 0.3s ease;
    animation-play-state: paused;
    animation: rotar-helice 0.08s linear infinite;
}


#helice1 {
    top: -47px;
    left: -15px;
}

#helice2 {
    top: -43px;
    left: 167px;
}

#helice3 {
    top: 145px;
    left: -25px;
}

#helice4 {
    top: 145px;
    left: 170px;
}

@keyframes rotar-helice {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {

    /* Reducir tamaño de las hélices para móviles */
    .helice {
        width: 150px;
    }

    /* Ajustar posiciones para móviles medianos */
    #helice1 {
        top: -38px;
        left: -27px;
    }

    #helice2 {
        top: -38px;
        left: 77px;
    }

    #helice3 {
        top: 73px;
        left: -31px;
    }

    #helice4 {
        top: 71px;
        left: 82px;
    }

    /* Ajustar el mensaje para móviles */
    .mensaje-dron {
        font-size: clamp(2rem, 7vw, 3.5rem);
        top: 110%;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {

    /* Reducir aún más el tamaño de las hélices para móviles pequeños */
    .helice {
        width: 120px;
    }

    /* Ajustar posiciones para móviles pequeños */
    #helice1 {
        top: -30px;
        left: -17px;
    }

    #helice2 {
        top: -30px;
        left: 75px;
    }

    #helice3 {
        top: 68px;
        left: -19px;
    }

    #helice4 {
        top: 68px;
        left: 80px;
    }

    /* Ajustar mensaje para móviles pequeños */
    .mensaje-dron {
        font-size: clamp(1.5rem, 8vw, 2.8rem);
        top: 105%;
        line-height: 1.2;
    }
}


/* Ajustar altura de la sección dron para móviles */
@media (max-width: 768px) {
    .drone-wrapper {
        height: 110vh;
        /* Un poco más alto para mejor scroll en móviles */
    }

    #contenedor-dron {
        width: clamp(200px, 25vw, 280px);
    }
}

@media (max-width: 480px) {
    .drone-wrapper {
        height: 100vh;
    }

    #contenedor-dron {
        width: clamp(180px, 30vw, 250px);
    }
}

/* Modificación del mensaje del dron */
/* style.css */

/* --- Modificación del mensaje del dron (MEJORADO) --- */
/* style.css */

/* --- Modificación del mensaje del dron (CORREGIDO) --- */
/* style.css */

/* --- Modificación del mensaje del dron (CORRECIÓN FINAL PC Y MÓVIL) --- */
.mensaje-dron {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    max-width: 800px;
    font-size: clamp(1rem, 8vw, 4.5rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #FFF;
    text-align: center;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5), 0 4px 20px rgba(0, 0, 0, 0.4);
    white-space: normal;
    text-wrap: balance;
    -webkit-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;

    /* CORRECCIÓN: Posición inicial para la animación (PC Y Móvil) */
    opacity: 0;
    transform: translate(-50%, 120%);
    /* Empieza un poco más abajo */
    transition: transform 1s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* CORRECCIÓN: Posición final de la animación para PC (justo debajo del dron) */
.drone-wrapper.is-visible .mensaje-dron.animar {
    opacity: 1;
    transform: translate(-50%, 105%);
}

/* AJUSTE ESPECIAL SOLO PARA MÓVILES */
@media (max-width: 768px) {
    .mensaje-dron {
        /* En móvil el texto puede ser más grande, así que le damos más espacio */
        font-size: clamp(1.8rem, 9vw, 3rem);
    }

    /* Posición final de la animación para MÓVIL */
    .drone-wrapper.is-visible .mensaje-dron.animar {
        transform: translate(-50%, 95%);
    }
}

/* Ajuste de la animación en JS para que se vea el deslizamiento */
.drone-wrapper.is-visible .mensaje-dron.animar {
    opacity: 1;
    transform: translate(-50%, 100%);
    /* El texto se desliza hacia arriba a su posición final */
}

/* Ajuste para pantallas pequeñas */
@media (max-width: 768px) {
    .mensaje-dron {
        line-height: 1.2;
        transform: translate(-50%, 110%);
    }

    .drone-wrapper.is-visible .mensaje-dron.animar {
        transform: translate(-50%, 90%);
    }
}

/*#mensaje2 { top: 40%; right: 5%; text-align: right; }
#mensaje3 { top: 60%; left: 5%; }
#mensaje4 { top: 80%; right: 5%; text-align: right; }

/* ===== FIN DRONE ===== */


/* --- Media Queries --- */
@media (max-width: 1200px) {
    .main-header {
        padding: 2rem 4%;
    }

    .main-nav a {
        margin-left: 2rem;
        font-size: 0.95rem;
    }

    section {
        padding: 7rem 4%;
    }

    .section-container {
        padding: 0 0.5rem;
    }
}

@media (max-width: 992px) {
    body {
        cursor: auto;
    }

    .cursor {
        display: none;
    }

    .main-nav {
        display: none;
    }

    .hamburger-menu {
        display: block;
    }

    .main-header {
        padding: 1.8rem 4%;
    }

    /* Hero Section Improvements */
    .hero {
        padding: 0 4%;
    }

    .hero-content h1 {
        font-size: clamp(2.8rem, 8vw, 6rem);
    }

    .hero-content p {
        font-size: clamp(1rem, 2.2vw, 1.15rem);
        margin-top: 2rem;
    }

    /* About Section */
    .about-section {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .about-image {
        margin-top: 4rem;
    }

    .image-hover-container {
        width: 100%;
    }

    .about-content h2 {
        text-align: center;
    }

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

    /* Stats Section */
    .stats-section .section-container {
        gap: 1.8rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    .stat-item {
        min-width: 140px;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2rem;
    }

    /* Maps */
    .maps-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .map-card {
        max-width: 600px;
        width: 100%;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .main-footer h2,
    .footer-info h3 {
        text-align: center;
    }

    .footer-info .slogan {
        max-width: 100%;
        margin: 0 auto 3rem auto;
    }

    .footer-details p,
    .footer-details a {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    section {
        padding: 5rem 4%;
    }

    h2 {
        font-size: clamp(2.2rem, 6vw, 3.2rem);
        margin-bottom: 3rem;
    }

    /* Header */
    .main-header {
        padding: 1.5rem 4%;
    }

    .main-header.scrolled {
        padding: 1.2rem 4%;
    }

    .logo img {
        height: 45px;
    }

    /* Hero Section */
    .hero {
        padding: 0 4%;
        min-height: 100vh;
    }

    .hero-content h1 {
        font-size: clamp(2.5rem, 9vw, 4.5rem);
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: clamp(1rem, 2.5vw, 1.1rem);
        margin-top: 1.5rem;
        line-height: 1.6;
    }

    /* About Section Futurista */
    .about-content-futurista {
        padding: 40px 4vw 40px 4vw;
        min-height: 380px;
    }

    .about-text-futurista h2 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    .about-text-futurista p {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .overlay-image-futurista {
        width: 200px;
    }

    /* Stats Section - Mejoras importantes */
    .stats-section .section-container {
        gap: 1rem;
        padding: 0 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .stat-item {
        min-width: 120px;
        flex-shrink: 0;
        padding: 0 0.5rem;
    }

    .stat-item h3 {
        font-size: clamp(2.2rem, 7vw, 3.2rem);
        margin-bottom: 0.3rem;
    }

    .stat-item p {
        font-size: 0.75rem;
        letter-spacing: 0.3px;
        line-height: 1.3;
        hyphens: auto;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 3rem;
    }

    .service-card {
        padding: 2rem 1.5rem;
        margin: 0 auto;
        max-width: 500px;
    }

    .service-card h4 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .service-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .icon-container {
        margin-bottom: 1rem;
    }

    .icon-container svg {
        width: 40px;
        height: 40px;
    }

    /* Maps */
    .maps-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .map-card {
        max-width: 100%;
        width: 100%;
        padding: 2rem 1.5rem;
        margin: 0 auto;
    }

    .map-card h4 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }

    .map-display {
        height: 280px;
    }

    /* Collaborators */
    .collaborator-card {
        width: 280px;
        padding: 1.8rem;
        margin: 0 auto;
    }

    .collaborator-header h3 {
        font-size: 1.3rem;
    }

    .collaborator-text {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .carousel-track {
        gap: 1.2rem;
    }

    /* Gallery - Accordion */
    .gallery-section {
        padding: 4rem 4%;
    }

    .gallery-subtitle {
        margin: -2rem auto 3rem;
        font-size: 1rem;
        line-height: 1.7;
        padding: 0 1rem;
    }

    .accordion-gallery {
        flex-direction: column;
        height: auto;
        gap: 1rem;
    }

    .accordion-item {
        flex: none;
        height: 220px;
        border-radius: 12px;
    }

    .accordion-item:hover {
        flex: none;
    }

    .accordion-content {
        opacity: 1;
        transform: translateY(0);
        bottom: 1.2rem;
        left: 1.2rem;
        right: 1.2rem;
    }

    .accordion-content h3 {
        font-size: 1.3rem;
        margin-bottom: 0.3rem;
    }

    .accordion-content p {
        font-size: 0.85rem;
        line-height: 1.4;
        max-width: 90%;
    }

    /* Footer */
    .main-footer {
        padding: 5rem 4% 2rem;
    }

    .footer-grid {
        gap: 2.5rem;
    }

    .footer-details p,
    .footer-details a {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }

    .footer-details svg {
        width: 20px;
        height: 20px;
    }

    .footer-copyright {
        margin-top: 3rem;
        padding-top: 2rem;
        font-size: 0.85rem;
    }

    /* Drone Section */
    .drone-wrapper {
        height: 120vh;
    }

    #contenedor-dron {
        width: clamp(200px, 25vw, 280px);
    }

    .mensaje-dron {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }

    /* Back to top button */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    section {
        padding: 4rem 3%;
    }

    /* Header */
    .main-header {
        padding: 1.2rem 3%;
    }

    .logo img {
        height: 40px;
    }

    /* Hero */
    .hero {
        padding: 0 3%;
    }

    .hero-content h1 {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .hero-content p {
        font-size: clamp(0.9rem, 3vw, 1rem);
    }

    /* Stats - Optimización para pantallas muy pequeñas */
    .stats-section .section-container {
        gap: 0.8rem;
        padding: 0 0.5rem;
    }

    .stat-item {
        min-width: 100px;
        padding: 0 0.3rem;
    }

    .stat-item h3 {
        font-size: clamp(1.8rem, 8vw, 2.8rem);
    }

    .stat-item p {
        font-size: 0.65rem;
        letter-spacing: 0.2px;
        word-break: break-word;
    }

    /* Services */
    .service-card {
        padding: 1.5rem 1rem;
    }

    .service-card h4 {
        font-size: 1.2rem;
    }

    .service-card p {
        font-size: 0.9rem;
    }

    /* Maps */
    .map-card {
        padding: 1.5rem 1rem;
    }

    .map-display {
        height: 250px;
    }

    /* Gallery */
    .accordion-item {
        height: 180px;
    }

    .accordion-content h3 {
        font-size: 1.1rem;
    }

    .accordion-content p {
        font-size: 0.8rem;
    }

    /* Footer */
    .main-footer {
        padding: 4rem 3% 2rem;
    }

    .footer-details p,
    .footer-details a {
        font-size: 0.9rem;
    }

    /* Collaborators */
    .collaborator-card {
        width: 260px;
        padding: 1.5rem;
    }

    /* Drone */
    .drone-wrapper {
        height: 100vh;
    }

    #contenedor-dron {
        width: clamp(180px, 30vw, 250px);
    }

    .mensaje-dron {
        font-size: clamp(2rem, 9vw, 3.5rem);
    }
}

/* Mejoras adicionales para accesibilidad y UX */
@media (max-width: 768px) {

    /* Mejorar el área de toque para elementos interactivos */
    .hamburger-menu {
        padding: 15px;
        min-width: 44px;
        min-height: 44px;
    }

    .mobile-nav a {
        padding: 1rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .back-to-top {
        min-width: 44px;
        min-height: 44px;
    }

    /* Mejorar legibilidad del texto */
    p {
        text-align: left;
        hyphens: auto;
        word-break: break-word;
    }

    /* Optimizar imágenes para móviles */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* Scroll horizontal suave para stats en móviles */
@media (max-width: 768px) {
    .stats-section .section-container::-webkit-scrollbar {
        height: 4px;
    }

    .stats-section .section-container::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.1);
        border-radius: 2px;
    }

    .stats-section .section-container::-webkit-scrollbar-thumb {
        background: var(--accent-orange);
        border-radius: 2px;
    }
}

/* Ajuste para elevar el texto en la sección "¿Quiénes somos?" */
.about-text-futurista {
    /* Con esta línea empujamos el texto hacia arriba.
       Puedes cambiar 4rem por otro valor como 5rem o 60px si lo quieres más arriba. */
    margin-bottom: 4rem;
}

/* Ajuste para que el espacio no sea excesivo en la vista móvil */
@media (max-width: 900px) {
    .about-text-futurista {
        margin-bottom: 2.5rem;
        /* Reducimos el margen para pantallas pequeñas */
    }
}


/* =======================================================
  CORRECCIÓN DEFINITIVA PARA SECCIÓN "QUIÉNES SOMOS" EN MÓVIL
==========================================================
*/

/* --- SECCIÓN DE PORTAFOLIO INTERACTIVA --- */
/* --- SECCIÓN DE PORTAFOLIO INTERACTIVA REPARADA --- */
/* === INICIO: ESTILOS DE PORTAFOLIO === */
/*
/*
/*
============================================================
== DIRECTIVAS PORTAFOLIO ==
============================================================
*/
/* ============================================================
   PROTOCOLO "DESPLIEGUE ROTATORIO" - SECCIÓN PORTAFOLIO
============================================================ */
/* ============================================================
   PROTOCOLO "DESPLIEGUE ROTATORIO" - SECCIÓN PORTAFOLIO
============================================================ */

:root {
    --text-dark: #212529;
    --text-light: #f8f9fa;
    --text-secondary: #6c757d;
    --accent-orange: #fd7e14;
    --accent-yellow: #ffc107;
    --accent-yellow-light: #fff3cd;
    --accent-orange-light: #ffe5d0;
    --card-background: #ffffff;
    --bg-gradient: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-yellow) 100%);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: white;
    color: var(--text-dark);
    line-height: 1.6;
}

/* ===============================================
           NUEVO DISEÑO: MURAL INTERACTIVO HEXAGONAL
        =============================================== */

.portfolio-section {
    position: relative;
    min-height: 100vh;
    padding: 5rem 0;
    overflow: hidden;
    background: white;
}

.portfolio-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 4rem;
    position: relative;
    z-index: 10;
}

.portfolio-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 5px;
    background: var(--bg-gradient);
    margin: 15px auto 0;
    border-radius: 5px;
}

/* Fondo de partículas animadas en amarillo/naranja */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    animation: float 15s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-100vh) translateX(50px) rotate(360deg);
        opacity: 0;
    }
}

/* Contenedor principal del mural hexagonal */
.hexagonal-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 5;
}

/* Estilo base para todas las tarjetas */
.portfolio-card {
    position: relative;
    height: 300px;
    background: var(--card-background);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition);
    transform-style: preserve-3d;
    transform: translateZ(0);
    backface-visibility: hidden;
    border: 1px solid rgba(253, 126, 20, 0.1);
}

/* Efecto de elevación en hover */
.portfolio-card:hover {
    transform: translateY(-10px) translateZ(20px) scale(1.05);
    box-shadow: 0 20px 40px rgba(253, 126, 20, 0.15);
    z-index: 10;
}

/* Capa de superposición con gradiente */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(253, 126, 20, 0.1) 50%, rgba(255, 193, 7, 0.15) 100%);
    opacity: 0;
    transition: var(--transition);
}

.portfolio-card:hover .card-overlay {
    opacity: 1;
}

/* Contenido de la tarjeta */
.card-content {
    position: relative;
    height: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: var(--transition);

}

.portfolio-card:hover .card-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-yellow) 100%);
}

.portfolio-card:hover .card-icon svg {
    color: white;
    stroke-width: 2;
}

.card-icon svg {
    width: 32px;
    height: 32px;
    stroke-width: 1.5;
    color: var(--accent-orange);
    transition: var(--transition);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
    transition: var(--transition);
}

.portfolio-card:hover .card-title {
    color: var(--accent-orange);
}

.card-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    hyphens: none;
    transition: var(--transition);
}

/* Animación de entrada */
.portfolio-card {
    opacity: 0;
    transform: translateY(30px) rotateX(10deg);
}

.portfolio-card.animate {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
}

/* Botón de acción */
.card-action {
    font-size: 0.9rem;
    color: var(--accent-orange);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
    opacity: 0;
    transition: var(--transition);
}

.card-action svg {
    width: 16px;
    height: 16px;
    margin-left: 5px;
    transition: var(--transition);
    stroke: var(--accent-orange);
}

.portfolio-card:hover .card-action {
    opacity: 1;
    color: var(--accent-yellow);
}

.portfolio-card:hover .card-action svg {
    transform: translateX(3px);
    stroke: var(--accent-yellow);
}

/* Modal para detalles completos */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--card-background);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: var(--transition);
    border: 2px solid var(--accent-yellow);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 30px;
    background: var(--bg-gradient);
    color: var(--text-light);
    position: relative;
}

.modal-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-services {
    list-style: none;
    margin: 20px 0;
}

.modal-services li {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    line-height: 1.6;
    transition: var(--transition);
}

.modal-services li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-orange);
    font-weight: bold;
    font-size: 1.2rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-services li:hover {
    color: var(--text-dark);
    transform: translateX(5px);
}

/* Responsive */
@media (max-width: 1024px) {
    .hexagonal-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .portfolio-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .hexagonal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .portfolio-title {
        font-size: 2.8rem;
        margin-bottom: 3rem;
    }

    .card-content {
        padding: 20px;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .card-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hexagonal-grid {
        grid-template-columns: 1fr;
    }

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

/* --- Portafolio Grid --- */
.hexagonal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 32px;
    justify-items: center;
    align-items: stretch;
    margin: 48px auto 0 auto;
    max-width: 1200px;
    width: 100%;
}

@media (max-width: 900px) {
    .hexagonal-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 24px;
    }
}

/* --- Estilos del Mapa Interactivo (Integrado) --- */
/* NOTA: Estilos principales del mapa están definidos arriba en .map-display svg */

.map-display svg path {
    fill: #D4D4D8;
    stroke: #FFFFFF;
    stroke-width: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.map-display svg path:hover {
    fill: var(--accent-orange);
    stroke: #FFFFFF;
    stroke-width: 2;
    transform: translateY(-2px);
    filter: drop-shadow(0 10px 20px rgba(255, 107, 0, 0.4));
    z-index: 10;
}

/* Tooltip estilo Google */
.tooltip {
    position: absolute;
    background: #FFFFFF;
    color: #202124;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Roboto', 'Arial', sans-serif;
    font-size: 13px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    transform: translateY(5px);
    min-width: 200px;
    max-width: 600px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border: 1px solid #DADCE0;
}

.tooltip.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.tooltip-title {
    font-weight: 500;
    font-size: 15px;
    margin-bottom: 8px;
    color: #202124;
    border-bottom: 1px solid #F1F3F4;
    padding-bottom: 6px;
}

.tooltip-content {
    display: grid;
    gap: 0 15px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.tooltip-content::-webkit-scrollbar {
    width: 6px;
}

.tooltip-content::-webkit-scrollbar-track {
    background: #F1F3F4;
    border-radius: 3px;
}

.tooltip-content::-webkit-scrollbar-thumb {
    background: #DADCE0;
    border-radius: 3px;
}

.tooltip-content::-webkit-scrollbar-thumb:hover {
    background: #BDC1C6;
}

.cols-1 {
    grid-template-columns: 1fr;
}

.cols-2 {
    grid-template-columns: 1fr 1fr;
    min-width: 350px;
}

.cols-3 {
    grid-template-columns: 1fr 1fr 1fr;
    min-width: 500px;
}

.tooltip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    border-bottom: 1px dashed #F8F9FA;
}

.tooltip-municipality {
    color: #5F6368;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.tooltip-count {
    background: #FFF0E6;
    color: #E37400;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 12px;
    font-size: 11px;
    margin-left: 8px;
    flex-shrink: 0;
}

.tooltip-total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #F1F3F4;
    font-weight: 500;
    font-size: 13px;
    color: #202124;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tooltip-total span:last-child {
    font-size: 14px;
    color: #E37400;
    font-weight: 700;
}

.legend {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 40px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: #666;
    background: white;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid #F0F0F0;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-color.normal {
    background: #D4D4D8;
    border: 1px solid #E5E5E5;
}

.legend-color.hover {
    background: var(--accent-orange);
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.4);
}

/* Media Queries para Mapa */
@media (max-width: 768px) {
    .legend {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        margin-top: 30px;
    }

    .tooltip.mobile-fixed {
        position: fixed;
        left: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
        border: none;
        border-top: 1px solid #E5E5E5;
        z-index: 2000;
        padding-bottom: 30px;
    }

    .tooltip.mobile-fixed.active {
        transform: translateY(0);
    }

    .tooltip.mobile-fixed .tooltip-content {
        max-height: 40vh;
    }
}