/* ======================
   Variables CSS
   ====================== */
:root {
    /* Paleta de colores */
    --primary: #050840;
    --secondary: #75AABF;
    --accent: #99E9F2;
    --background: #F2F2F2;
    --surface: #FFFFFF;

    /* Fuentes */
    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Bordes */
    --border-radius: 1rem;
    --border-radius-lg: 1.5rem;
    --border-radius-xl: 2.5rem;
    --border-radius-full: 9999px;
}

/* ======================
   Reset y Base
   ====================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

html {
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    /* Fix para altura en iOS Safari */
    height: -webkit-fill-available;

    /* Scrollbar personalizada para Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

/* ======================
    Scrollbar Personalizada
    ====================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(5, 8, 64, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--primary);
    overflow-x: hidden;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    position: relative;
}

body.menu-open {
    overflow: hidden !important;
    height: 100vh !important;
    height: 100dvh !important;
    position: fixed !important;
    width: 100% !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
}

html.menu-open {
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: 100% !important;
}

/* ======================
   Material Symbols
   ====================== */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ======================
   Header
   ====================== */
header {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 50;
    background-color: rgba(242, 242, 242, 0.95);
    backdrop-filter: blur(12px);
    border-radius: var(--border-radius-xl);
    transition: all 0.4s ease;
    opacity: 0;
    box-sizing: border-box;
    overflow: visible;
}

header.visible {
    top: 1.5rem;
    opacity: 1;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.header-container {
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-svg {
    width: 3rem;
    height: 3rem;
    color: var(--accent);
}

.logo-img {
    height: 2.75rem;
    width: auto;
    object-fit: contain;
}

.empresa-nombre {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    font-family: var(--font-display);
}

nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav a {
    color: rgba(5, 8, 64, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

nav a:hover {
    color: var(--primary);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    height: 2.5rem;
    padding: 0 1.5rem;
    border-radius: var(--border-radius-full);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: var(--font-body);
    letter-spacing: 0.02em;
}

.btn-primary:hover {
    background-color: var(--secondary);
    transform: scale(1.05);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.5rem;
    z-index: 100;
    position: relative;
}

.mobile-menu {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    width: 100% !important;
    max-width: none !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    min-height: -webkit-fill-available !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: rgba(5, 8, 64, 0.98);
    backdrop-filter: blur(20px);
    z-index: 99999 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    overflow: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box !important;
    transform: translateZ(0) !important;
    border-radius: 0 !important;
}

.mobile-menu.show {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    transform: translateY(30px);
    transition: transform 0.4s ease 0.1s;
    width: 100%;
    padding: 2rem;
    box-sizing: border-box;
}

.mobile-menu.show nav {
    transform: translateY(0);
}

.mobile-menu nav a {
    color: white;
    font-size: 2rem;
    font-weight: 600;
    text-decoration: none;
    font-family: var(--font-display);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.mobile-menu.show nav a {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.show nav a:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-menu.show nav a:nth-child(2) {
    transition-delay: 0.2s;
}

.mobile-menu.show nav a:nth-child(3) {
    transition-delay: 0.3s;
}

.mobile-menu.show nav a:nth-child(4) {
    transition-delay: 0.4s;
}

.mobile-menu nav a:hover {
    color: var(--accent);
    transform: translateY(-5px);
}

.mobile-menu .btn-primary {
    background-color: var(--accent);
    color: var(--primary);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease 0.5s;
}

.mobile-menu.show .btn-primary {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    transition: all 0.3s ease;
    padding: 0.5rem;
}

.mobile-menu.show .mobile-menu-close {
    opacity: 1;
}

.mobile-menu-close:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.mobile-menu-footer {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease 0.6s;
}

.mobile-menu.show .mobile-menu-footer {
    opacity: 1;
}

/* ======================
   Hero Section
   ====================== */
.hero-section {
    position: relative;
    padding-top: 8rem;
    padding-bottom: 4rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-left: 2rem;
    padding-right: 2rem;
    overflow: hidden;
    background-color: #000;
}

.hero-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 1;
    max-width: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 56rem;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    border-radius: var(--border-radius-full);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.hero-title {
    color: white;
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
    font-family: var(--font-display);
}

.hero-title .italic-text {
    font-style: italic;
    font-weight: 400;
    text-decoration: none;
    position: relative;
    display: inline-block;
}

.hero-title .italic-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--accent);
    animation: underlineLoad 1.5s ease-out forwards;
    animation-delay: 0.8s;
}

@keyframes underlineLoad {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

.hero-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    font-weight: 400;
    max-width: 42rem;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    padding-top: 1.5rem;
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid rgba(5, 8, 64, 0.2);
    color: var(--primary);
    height: 3rem;
    padding: 0 2rem;
    border-radius: var(--border-radius-full);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
    letter-spacing: 0.02em;
}

.btn-secondary:hover {
    border-color: var(--primary);
    background-color: rgba(5, 8, 64, 0.05);
}

.hero-section .btn-secondary {
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.hero-section .btn-secondary:hover {
    background-color: white;
    color: var(--primary);
    border-color: white;
}

.btn-primary.large {
    height: 3rem;
    padding: 0 2rem;
    font-size: 1rem;
    width: 100%;
}

@media (min-width: 640px) {
    .btn-primary.large {
        width: auto;
    }

    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

/* Desktop responsive for Hero Section */
@media (min-width: 768px) {
    .hero-section {
        padding-top: 8rem;
        padding-bottom: 5rem;
    }

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

    .hero-description {
        font-size: 1.25rem;
    }

    .hero-content {
        max-width: 64rem;
    }
}

@media (min-width: 1024px) {
    .hero-section {
        padding-top: 9rem;
        padding-bottom: 6rem;
        padding-left: 3rem;
        padding-right: 3rem;
    }

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

    .hero-description {
        font-size: 1.375rem;
        max-width: 48rem;
        margin-bottom: 2rem;
    }

    .hero-badge {
        font-size: 0.875rem;
        padding: 0.5rem 1.25rem;
        margin-bottom: 1rem;
    }

    .hero-buttons {
        padding-top: 2rem;
        gap: 1.5rem;
    }

    .btn-primary.large {
        height: 3.5rem;
        padding: 0 2.5rem;
        font-size: 1.125rem;
    }

    .btn-secondary {
        height: 3.5rem;
        padding: 0 2.5rem;
        font-size: 1.125rem;
    }
}

@media (min-width: 1280px) {
    .hero-section {
        padding-top: 10rem;
        padding-bottom: 7rem;
    }

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

    .hero-description {
        font-size: 1.5rem;
        max-width: 52rem;
    }

    .hero-content {
        max-width: 72rem;
    }
}

/* ======================
   Stats Section
   ====================== */
.stats-section {
    position: relative;
    margin-top: -3.5rem;
    z-index: 20;
    padding: 0 1rem 4rem;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stats-container {
    max-width: 42rem;
    width: 100%;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(12px);
    box-sizing: border-box;
}

.stats-grid {
    display: grid;
    /* Mobile: try to fit in row if possible, or 2 cols, but user wants delicate.
        Let's do 3 columns even on mobile as stats are small numbers usually.
     */
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem;
    position: relative;
}

.stat-icon {
    color: var(--accent);
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.025em;
    font-family: var(--font-display);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.625rem;
    color: rgba(5, 8, 64, 0.6);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

/* Tablets & Desktop */
@media (min-width: 600px) {
    .stats-section {
        margin-top: -3rem;
    }

    .stats-grid {
        gap: 0;
    }

    .stat-item {
        padding: 0.5rem 1rem;
    }

    /* Vertical dividers */
    .stat-item:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 25%;
        height: 50%;
        width: 1px;
        background-color: rgba(5, 8, 64, 0.1);
    }

    /* Remove old bordered class styles if present */
    .stat-item.bordered {
        border: none;
    }
}

/* ======================
   Sections
   ====================== */
section {
    padding: 5rem 1rem;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

.section-container {
    max-width: 80rem;
    margin: 0 auto;
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
}

.section-title {
    color: var(--secondary);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.section-heading {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 1rem;
    font-family: var(--font-display);
}

.section-description {
    color: rgba(5, 8, 64, 0.7);
    line-height: 1.6;
    font-size: 1.125rem;
}

/* ======================
   Grid Layouts
   ====================== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.grid-3,
.grid-4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

/* ======================
   Cards
   ====================== */
.card {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius-xl);
    border: 1px solid rgba(5, 8, 64, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    border-color: rgba(5, 8, 64, 0.2);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 3.5rem;
    height: 3.5rem;
    background-color: rgba(5, 8, 64, 0.05);
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover .card-icon {
    background-color: var(--primary);
    color: white;
}

.card-title {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-family: var(--font-display);
}

.card-description {
    color: rgba(5, 8, 64, 0.7);
    margin-bottom: 1.5rem;
}

.card-list {
    list-style: none;
}

.card-list li {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: rgba(5, 8, 64, 0.5);
    margin-bottom: 0.5rem;
}

.card-list li::before {
    content: '';
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background-color: var(--accent);
    margin-right: 0.5rem;
}

/* ======================
   Obra Cards
   ====================== */
.obra-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-xl);
    background-color: white;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.obra-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.obra-image-container {
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.obra-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: none;
}

.obra-card:hover .obra-image {
    transform: scale(1.1);
}

.obra-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 80%);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: opacity 0.4s ease;
}

.obra-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    background-color: var(--accent);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--border-radius-full);
}

.obra-location {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.obra-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    font-family: var(--font-display);
}

.obra-period {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.obra-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.obra-card:hover .obra-description {
    opacity: 1;
    transform: translateY(0);
}

/* ======================
   Filters
   ====================== */
.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(5, 8, 64, 0.2);
    background-color: transparent;
    color: rgba(5, 8, 64, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--primary);
}

.filter-btn.active {
    background-color: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
}

/* ======================
   Image Gallery
   ====================== */
.image-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 3rem;
}

.image-wrapper {
    position: relative;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    width: 100%;
}

.image-gradient {
    position: absolute;
    inset: -0.5rem;
    background: linear-gradient(to right, var(--accent), var(--secondary));
    border-radius: var(--border-radius-xl);
    opacity: 0.2;
    filter: blur(20px);
    transition: opacity 0.5s ease;
}

.image-wrapper:hover .image-gradient {
    opacity: 0.4;
}

.main-image {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-xl);
    transform: scale(1);
    transition: transform 0.7s ease;
    max-width: none;
}

.image-wrapper:hover .main-image {
    transform: scale(1.05);
}

.image-badge {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    left: auto;
    width: auto;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.75rem 1.25rem;
    border-radius: 9999px;
    /* Fully rounded pill */
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.badge-icon .material-symbols-outlined {
    font-size: 1.5rem !important;
}

.badge-text {
    display: flex;
    flex-direction: column;
}

.badge-text strong {
    color: var(--primary);
    font-size: 0.875rem;
    line-height: 1.2;
    white-space: nowrap;
}

.badge-text small {
    color: rgba(5, 8, 64, 0.6);
    font-size: 0.75rem;
    white-space: nowrap;
}

/* ======================
   Footer
   ====================== */
footer {
    background-color: var(--primary);
    border-top: 1px solid rgba(5, 8, 64, 0.1);
    padding: 5rem 1rem 2.5rem;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

.footer-container {
    max-width: 80rem;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.footer-brand .logo-svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--accent);
}

.footer-brand span {
    font-weight: 700;
    font-size: 1.25rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-title {
    color: white;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-family: var(--font-display);
}

.footer-list {
    list-style: none;
}

.footer-list li {
    margin-bottom: 0.75rem;
}

.footer-list a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

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

.footer-contact {
    list-style: none;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-contact .material-symbols-outlined {
    color: var(--accent);
    font-size: 1.125rem;
    margin-top: 0.125rem;
}

.footer-contact span,
.footer-contact a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: white;
}

/* ======================
   Modal
   ====================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background-color: white;
    border: 1px solid rgba(5, 8, 64, 0.1);
    border-radius: var(--border-radius-xl);
    max-width: 56rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(1);
    opacity: 1;
    transition: transform 0.3s ease, opacity 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(5, 8, 64, 0.2) transparent;
}

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

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    /* Thumb color */
    border-radius: 20px;
    border: 3px solid transparent;
    /* Creates padding around thumb */
    background-clip: content-box;
    /* Ensures background doesn't bleed into border */
}

.modal.hidden .modal-content {
    transform: scale(0.9);
    opacity: 0;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    z-index: 10;
    font-size: 1.875rem;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: white;
}

.modal-image {
    position: relative;
}

.modal-image img {
    width: 100%;
    height: 16rem;
    object-fit: cover;
}

.modal-image-gradient {
    display: none;
}

.modal-body {
    padding: 2rem;
}

.modal-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.modal-meta .obra-badge {
    position: static;
}

.modal-meta .obra-location {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0;
}

.modal-meta .obra-period {
    color: rgba(5, 8, 64, 0.5);
    font-size: 0.875rem;
}

.modal-title {
    color: var(--primary);
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-family: var(--font-display);
}

.modal-section-title {
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.trabajos-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trabajo-item {
    background-color: var(--background);
    border-radius: var(--border-radius);
    padding: 1rem;
    border: 1px solid rgba(5, 8, 64, 0.05);
}

.trabajo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.trabajo-tipo {
    color: var(--primary);
    font-weight: 700;
    font-family: var(--font-display);
}

.trabajo-cantidad {
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
}

.trabajo-detalles {
    list-style: none;
}

.trabajo-detalles li {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: rgba(5, 8, 64, 0.6);
    margin-bottom: 0.25rem;
}

.trabajo-detalles li::before {
    content: '';
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background-color: rgba(153, 233, 242, 0.5);
    margin-right: 0.5rem;
}

/* ======================
   CTA Section
   ====================== */
.cta-section {
    padding: 5rem 1rem;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

.cta-container {
    max-width: 80rem;
    margin: 0 auto;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.cta-background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(5, 8, 64, 0.9);
    mix-blend-mode: multiply;
}

.cta-dark-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
}

.cta-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 3rem;
    gap: 2rem;
    text-align: center;
}

.cta-text {
    max-width: 42rem;
}

.cta-title {
    color: white;
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: var(--font-display);
}

.cta-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
}

.cta-button {
    background-color: white;
    color: var(--primary);
    height: 3.5rem;
    padding: 0 2.5rem;
    border-radius: var(--border-radius-full);
    font-weight: 700;
    font-size: 1.125rem;
    white-space: nowrap;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: var(--accent);
    transform: scale(1.05);
}

/* ======================
   Equipamiento Grid
   ====================== */
.equipamiento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}


.equipo-item {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    background-color: white;
}

.equipo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    max-width: none;
}

.equipo-item:hover img {
    transform: scale(1.05);
}

/* Overlay styles removed as requested */

/* ======================
   Emprendimientos Grid
   ====================== */
.emprendimientos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.emprendimiento-item {
    background-color: white;
    border: 1px solid rgba(5, 8, 64, 0.1);
    border-radius: var(--border-radius-xl);
    padding: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.emprendimiento-item:hover {
    border-color: rgba(5, 8, 64, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.emprendimiento-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.emprendimiento-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--border-radius-full);
    background-color: rgba(153, 233, 242, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.emprendimiento-name {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.875rem;
}

/* ======================
   Servicios destacados
   ====================== */
.servicios-destacados {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.servicio-destacado {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.servicio-icon {
    min-width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--border-radius-full);
    background-color: rgba(153, 233, 242, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.servicio-text h4 {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    font-family: var(--font-display);
}

.servicio-text p {
    font-size: 0.875rem;
    color: rgba(5, 8, 64, 0.5);
}

/* ======================
   Animaciones
   ====================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(100px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-slide-in-bottom {
    animation: slideInFromBottom 0.8s ease-out forwards;
}

.observe-animation {
    opacity: 0;
}

.observe-animation.animated {
    opacity: 1;
}

/* ======================
   Utilidades
   ====================== */
.white-bg {
    background-color: white;
}

.border-y {
    border-top: 1px solid rgba(5, 8, 64, 0.05);
    border-bottom: 1px solid rgba(5, 8, 64, 0.05);
}

.hidden {
    display: none;
}

/* ======================
   Fixes para móviles
   ====================== */

/* Fix para evitar espacios en blanco en el menú móvil */
@supports (-webkit-touch-callout: none) {

    /* iOS specific fix */
    .mobile-menu {
        min-height: -webkit-fill-available !important;
    }

    body.menu-open {
        height: -webkit-fill-available !important;
    }
}

/* Fix adicional para todos los navegadores móviles */
@media (max-width: 1024px) {
    .mobile-menu {
        inset: 0 !important;
    }
}

/* ======================
   Responsive
   ====================== */

/* Tablets medianos y dispositivos de 600px - 767px (iPad Mini, teléfonos grandes) */
@media (min-width: 600px) and (max-width: 767px) {
    header {
        width: calc(100% - 2rem);
        max-width: none;
    }

    .header-container {
        padding: 0.75rem 1rem;
    }

    .hero-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-content {
        padding: 0 1rem;
    }

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

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

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

    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .equipamiento-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .emprendimientos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }



    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .cta-content {
        padding: 3rem 1.5rem;
    }

    nav.desktop-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .btn-primary.desktop-only {
        display: none;
    }

    /* Menú móvil en tablets */
    .mobile-menu {
        position: fixed !important;
        width: 100vw !important;
        width: 100% !important;
        max-width: 100vw !important;
        max-width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        min-height: -webkit-fill-available !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        inset: 0 !important;
    }

    .mobile-menu nav a {
        font-size: 2.5rem;
    }

    .mobile-menu .btn-primary {
        font-size: 1.25rem;
        height: 3.5rem;
        padding: 0 2.5rem;
    }
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 4.5rem;
    }

    .hero-description {
        font-size: 1.25rem;
    }

    .section-heading {
        font-size: 3rem;
    }

    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }



    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-bottom {
        flex-direction: row;
    }

    .cta-content {
        flex-direction: row;
        padding: 5rem;
        text-align: left;
    }

    .cta-title {
        font-size: 3rem;
    }

    .emprendimientos-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .equipamiento-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    nav.desktop-nav {
        display: flex;
    }
}

@media (min-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 767px) {
    header {
        width: calc(100% - 2rem);
        max-width: none;
        border-radius: var(--border-radius-xl);
        top: -100px;
        left: 50%;
        transform: translateX(-50%);
        opacity: 0;
    }

    header.visible {
        top: 1rem;
        opacity: 1;
    }

    nav.desktop-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-primary.desktop-only {
        display: none;
    }

    .header-container {
        padding: 0.75rem 1.25rem;
    }

    /* Menú móvil */
    .mobile-menu {
        position: fixed !important;
        width: 100vw !important;
        width: 100% !important;
        max-width: 100vw !important;
        max-width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        min-height: -webkit-fill-available !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        inset: 0 !important;
    }

    .mobile-menu nav {
        gap: 1.5rem;
        padding: 1rem;
    }

    .mobile-menu nav a {
        font-size: 1.75rem;
    }

    .mobile-menu .btn-primary {
        font-size: 1rem;
        height: 3rem;
        padding: 0 2rem;
    }

    .mobile-menu-close {
        top: 1.5rem;
        right: 1.5rem;
        font-size: 2rem;
    }

    .mobile-menu-footer {
        bottom: 1.5rem;
    }

    .hero-section {
        padding-top: 2rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Hero Section */
    .hero-title {
        font-size: 2.75rem;
        line-height: 1.1;
    }

    .hero-description {
        font-size: 1.15rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    /* Sections */
    section {
        padding: 3rem 1rem;
    }

    .section-container {
        padding: 0;
    }

    .section-heading {
        font-size: 1.875rem;
    }

    .section-description {
        font-size: 1rem;
    }



    /* CTA */
    .cta-title {
        font-size: 1.5rem;
    }

    .cta-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        padding: 2rem 1rem;
    }

    .cta-button {
        width: 100%;
    }

    /* Modal */
    .modal-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }

    /* Grids móviles */
    .grid-2,
    .grid-3 {
        gap: 1rem;
    }

    /* Tarjetas de Servicios en Móvil */
    .card {
        padding: 1.5rem;
    }

    .card-icon {
        width: 3rem;
        height: 3rem;
        margin-bottom: 1rem;
    }

    .card-title {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .card-description {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    .card-list li {
        font-size: 0.8rem;
    }



    .footer-grid {
        gap: 2rem;
    }

    /* Ajuste del badge en móviles */
    .image-container {
        margin-bottom: 2rem;
    }

    .image-badge {
        bottom: 1rem;
        right: 1rem;
        padding: 0.75rem 1rem;
    }
}

/* Adaptación de Cards de Proyectos para Móvil */
.obra-card {
    display: flex;
    flex-direction: column;
    height: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    /* Sombra suave fija */
}

.obra-image-container {
    aspect-ratio: 4 / 3;
    /* Más apaisado para móvil */
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
    height: auto;
    flex-shrink: 0;
}

.obra-image {
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
}

.obra-overlay {
    position: relative;
    inset: auto;
    background: white;
    padding: 1.5rem;
    border-radius: 0 0 var(--border-radius-xl) var(--border-radius-xl);
    opacity: 1;
    justify-content: flex-start;
    flex-grow: 1;
}

.obra-title {
    color: var(--primary);
    font-size: 1.25rem;
    margin-top: 0.5rem;
}

.obra-period {
    color: rgba(5, 8, 64, 0.6);
}

.obra-description {
    opacity: 1;
    transform: none;
    color: rgba(5, 8, 64, 0.7);
    position: relative;
    margin-top: 1rem;
}

.obra-badge {
    top: 1rem;
    right: 1rem;
    /* El badge queda bien posicionado absoluto relativo al contenido */
}

.obra-location {
    color: var(--secondary);
    /* Color más oscuro para fondo blanco */
}

/* ======================
   Clients Carousel
   ====================== */
.clients-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 1rem 0;
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.carousel-track {
    display: flex;
    align-items: center;
    gap: 4rem;
    width: max-content;
    animation: scroll 40s linear infinite;
    padding-left: 4rem;
    /* Initial offset */
}

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

.cliente-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cliente-logo-container {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
    transition: all 0.3s ease;
    filter: grayscale(100%);
}

.cliente-logo-container:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.1);
}

.cliente-logo {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    max-width: 180px;
}

.cliente-nombre {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.5rem;
    font-family: var(--font-display);
    white-space: nowrap;
}

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

    100% {
        transform: translateX(calc(-100% / 3));
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .carousel-track {
        gap: 2rem;
        padding-left: 2rem;
    }

    .cliente-logo-container {
        height: 40px;
    }

    .cliente-logo {
        max-width: 120px;
    }
}