/* ==========================================
   VARIABLES CSS - PALETA DE COLORES Y TIPOGRAFÍA RESPONSIVA
   ========================================== */
:root {
    /* Colores principales - Tonos industriales (unificados con METALCOM) */
    --primary-dark: #1E1E1E;
    --primary-gray: #2e2e2e;
    --secondary-gray: #7A7A7A;
    --charcoal: #3A3A3A;
    --light-gray: #F7F5F2;
    --bg2: #EDEAE4;
    --white: #ffffff;
    --border: #E0DDD8;

    /* Colores de acento - Construcción */
    --accent-orange: #E8520A;
    --orange2: #FF6B2B;
    --accent-yellow: #ffc107;
    --accent-hover: #c44208;

    /* Colores de estado */
    --success: #4caf50;
    --error: #f44336;
    --info: #2196f3;

    /* Espaciado fluido */
    --spacing-xs: clamp(0.375rem, 1vw, 0.5rem);
    --spacing-sm: clamp(0.75rem, 2vw, 1rem);
    --spacing-md: clamp(1rem, 3vw, 1.5rem);
    --spacing-lg: clamp(1.5rem, 4vw, 2rem);
    --spacing-xl: clamp(2rem, 5vw, 3rem);
    --spacing-2xl: clamp(2.5rem, 6vw, 4rem);

    /* Tipografía fluida y escalable con clamp() */
    --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Body: Rango 0.95rem a 1.1rem */
    --font-size-body: clamp(0.95rem, 1.5vw, 1.1rem);
    --font-size-small: clamp(0.8rem, 1.2vw, 0.95rem);

    /* Headings responsivos: Los valores crecen con el viewport */
    --font-size-h3: clamp(1.15rem, 3vw, 1.75rem);
    --font-size-h2: clamp(1.45rem, 4vw, 2.25rem);
    --font-size-h1: clamp(1.75rem, 6vw, 3rem);

    /* Sombras */
    --shadow: 0 4px 32px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);

    /* Transiciones */
    --transition: all 0.3s ease;
}

/* ==========================================
   RESET Y ESTILOS GLOBALES - FLUIDOS Y ESCALABLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    font-size: clamp(14px, 1.5vw, 16px);
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-body);
    color: var(--primary-dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ==========================================
   TIPOGRAFÍA RESPONSIVA CON CLAMP()
   ========================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: clamp(1.75rem, 7vw, 3.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.45rem, 5vw, 2.5rem);
}

h3 {
    font-size: clamp(1.15rem, 3.5vw, 1.9rem);
}

h4 {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--secondary-gray);
    line-height: 1.7;
}

a {
    color: var(--accent-orange);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================
   HEADER Y NAVEGACIÓN PEGAJOSA - FLUIDA Y ESCALABLE
   ========================================== */
header.site-header {
    position: relative;
    overflow: hidden;
}



.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0;
}

.hamburger span {
    width: 24px;
    height: 3px;
    background-color: var(--primary-dark);
    border-radius: 999px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: clamp(60px, 10vw, 80px);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem);
    z-index: 999;
    flex-direction: column;
    gap: clamp(8px, 2vw, 16px);
    box-shadow: var(--shadow);
    width: 100%;
    box-sizing: border-box;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 600;
    color: var(--primary-dark);
    text-decoration: none;
    padding: clamp(8px, 1.5vw, 12px) 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-menu a:last-child {
    border-bottom: none;
    color: var(--accent-orange);
}

/* ==========================================
   CAROUSEL DEL HEADER - FLUIDO Y ESCALABLE
   ========================================== */
.hero-carousel {
    position: relative;
    min-height: 100vh;
    padding-top: clamp(60px, 10vw, 80px);
    overflow: hidden;
    background-color: var(--primary-dark);
    /* Imagen de fondo optimizada para el contenedor principal del carousel */
    background-image: url("../img/imagencarrusel2.webp");
    background-image: -webkit-image-set(
        url("../img/imagencarrusel2.webp") type("image/webp"),

    );
    background-image: image-set(
        url("../img/imagencarrusel2.webp") type("image/webp"),

    );
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
}

/* Capa overlay para mejorar legibilidad sin tocar los elementos internos */
.hero-carousel::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Degradado overlay para mejorar legibilidad y añadir profundidad */
    background: linear-gradient(180deg,
                rgba(0, 0, 0, 0.65) 0%,
                rgba(0, 0, 0, 0.45) 30%,
                rgba(0, 0, 0, 0.25) 60%,
                rgba(0, 0, 0, 0.0) 100%);
    z-index: 1;
    pointer-events: none;
}

.carousel {
    position: relative;
    width: 100%;
    flex: 1;
}

.slide {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    transition: opacity 0.9s ease;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
}

.slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 8s ease;
}

.slide.active .slide-bg {
    transform: scale(1.04);
}

.slide-1 .slide-bg {
    background-color: #1a1005;
    background-image: url("../img/imagencarrusel2.webp"),
        radial-gradient(ellipse 60% 70% at 70% 30%, rgba(232, 82, 10, 0.25), transparent 60%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 80px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 80px),
        linear-gradient(135deg, #120a02 0%, #2a1205 50%, #0d0a08 100%);
}

.slide-2 .slide-bg {
    background-color: #0a0e14;
    background-image: url("../img/imagencarrusel2.webp"),
        radial-gradient(ellipse 50% 60% at 30% 60%, rgba(232, 82, 10, 0.2), transparent 60%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 40px),
        linear-gradient(160deg, #0a0e14 0%, #1a1a0a 60%, #080808 100%);
}

.slide-3 .slide-bg {
    background-color: #0e0a08;
    background-image: url("../img/imagencarrusel2.webp"),
        radial-gradient(ellipse 65% 55% at 60% 40%, rgba(232, 82, 10, 0.18), transparent 55%),
        repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 50px),
        linear-gradient(120deg, #0e0808 0%, #1a0e04 55%, #0a0a0a 100%);
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.15) 60%, transparent 100%);
}

.slide-content {
    position: relative;
    z-index: 2;
    padding: 0 clamp(1rem, 5vw, 3rem);
    max-width: 90%;
    min(750px, 90vw);
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 50vh;
}

.slide-tag {
    display: inline-flex;
    align-items: center;
    gap: clamp(0.5rem, 1vw, 0.75rem);
    font-size: clamp(0.6rem, 1vw, 0.85rem);
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-orange);
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
}

.slide-tag span {
    display: block;
    width: clamp(2rem, 5vw, 3rem);
    height: 2px;
    background-color: var(--accent-orange);
}

.slide-content h1 {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--white);
    margin-bottom: clamp(0.75rem, 2vw, 1.5rem);
    letter-spacing: -1px;
}

.slide-content p {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    max-width: min(100%, 550px);
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.slide-btns {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.75rem, 2vw, 1.25rem);
}

.sbtn-primary,
.sbtn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 2vw, 18px) clamp(24px, 4vw, 40px);
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.25s ease;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    white-space: nowrap;
}

.sbtn-primary {
    background-color: var(--accent-orange);
    color: var(--white);
    border: 1px solid transparent;
    box-shadow: 0 6px 20px rgba(232, 82, 10, 0.32);
}

.sbtn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.sbtn-outline {
    border: 1px solid rgba(255, 255, 255, 0.38);
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.sbtn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.6);
}

.carousel-controls {
    position: absolute;
    bottom: clamp(1.5rem, 4vw, 2.5rem);
    left: clamp(1rem, 3vw, 2rem);
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1vw, 0.75rem);
    z-index: 2;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(17, 18, 21, 0.38);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.dot {
    width: clamp(0.5rem, 1.5vw, 0.75rem);
    height: clamp(0.5rem, 1.5vw, 0.75rem);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    width: clamp(1.5rem, 3vw, 2rem);
    border-radius: 1rem;
    background: var(--accent-orange);
}

.carousel-arrows {
    position: absolute;
    bottom: clamp(1.5rem, 4vw, 2.5rem);
    right: clamp(1rem, 3vw, 2rem);
    display: flex;
    gap: clamp(0.5rem, 1vw, 0.75rem);
    z-index: 2;
}

.carr-btn {
    width: clamp(40px, 8vw, 48px);
    height: clamp(40px, 8vw, 48px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    color: var(--white);
    font-size: clamp(1rem, 2vw, 1.3rem);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.25s ease;
}

.carr-btn:hover {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
    transform: scale(1.05);
}

.scroll-cue {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    z-index: 2;
    color: rgba(255, 255, 255, 0.75);
}

.scroll-mouse {
    width: 22px;
    height: 34px;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    border-radius: 11px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.scroll-wheel {
    width: 3px;
    height: 6px;
    background: var(--accent-orange);
    border-radius: 999px;
    animation: scrollW 1.8s ease-in-out infinite;
}

@keyframes scrollW {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* ==========================================
   SECCIÓN DE HERO
   ========================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-gray) 100%);
    color: var(--white);
    padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 5vw, 3rem);
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 2.5rem);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: clamp(300px, 80vw, 700px);
    height: clamp(300px, 80vw, 700px);
    background: radial-gradient(circle, var(--accent-orange) 0%, transparent 70%);
    opacity: 0.1;
    border-radius: 50%;
    z-index: 1;
}

.hero-content {
    max-width: min(90%, 900px);
    position: relative;
    z-index: 2;
    width: 100%;
    box-sizing: border-box;
}

.hero h1 {
    font-size: clamp(1.75rem, 8vw, 3.5rem);
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
    color: var(--white);
}

.hero .subtitle {
    font-size: clamp(1rem, 3vw, 1.35rem);
    margin-bottom: clamp(1.5rem, 4vw, 2rem);
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
    line-height: 1.7;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-orange);
    color: var(--white);
    padding: clamp(12px, 2vw, 18px) clamp(28px, 4vw, 40px);
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: 2px solid var(--accent-orange);
    cursor: pointer;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.cta-button:hover {
    background-color: transparent;
    color: var(--accent-orange);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ==========================================
   SECCIÓN DE SERVICIOS - FLUIDA Y RESPONSIVA
   ========================================== */
.services {
    background: linear-gradient(135deg, #121212 0%, #242424 100%);
    color: var(--white);
    padding: clamp(2.5rem, 8vw, 6.25rem) clamp(1.25rem, 5vw, 3rem);
    width: 100%;
    box-sizing: border-box;
}

.section-container {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    padding: 0 clamp(1rem, 2vw, 2rem);
    box-sizing: border-box;
}

.section-title {
    text-align: center;
    margin-bottom: clamp(1.5rem, 5vw, 4rem);
    position: relative;
}

.services .section-title h2 {
    color: var(--white);
}

.services .section-title p {
    color: rgba(255, 255, 255, 0.72);
}

.section-title h2 {
    position: relative;
    display: inline-block;
    max-width: 100%;
    line-height: 1.2;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(60px, 10vw, 120px);
    height: 3px;
    background-color: var(--accent-orange);
}

.section-title p {
    color: var(--secondary-gray);
    margin-top: var(--spacing-lg);
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(250px, 80vw, 320px), 1fr));
    gap: clamp(1rem, 4vw, 2rem);
    width: 100%;
}

.service-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(232, 82, 10, 0.14);
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: 280px;
    justify-content: flex-start;
    color: rgba(255, 255, 255, 0.92);
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-orange);
    background: rgba(232, 82, 10, 0.05);
}

.service-icon {
    width: clamp(60px, 15vw, 90px);
    height: clamp(60px, 15vw, 90px);
    background-color: var(--accent-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto clamp(1rem, 3vw, 1.5rem);
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    color: var(--white);
}

.service-card h3 {
    color: var(--white);
    margin-bottom: var(--spacing-md);
    font-size: clamp(1rem, 2.5vw, 1.3rem);
}

.service-card p {
    color: rgba(255, 255, 255, 0.68);
    margin-bottom: 0;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

/* ==========================================
   SECCIÓN DE PORTAFOLIO - FLUIDA Y ESCALABLE
   ========================================== */
.portfolio {
    padding: clamp(2.5rem, 8vw, 6.25rem) clamp(1.25rem, 5vw, 4.5rem);
    background-color: var(--white);
    width: 100%;
    box-sizing: border-box;
}

.portfolio-header {
    display: flex;
    flex-direction: column;
    gap: clamp(0.75rem, 2vw, 1rem);
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    align-items: center;
}

.portfolio-header .chip {
    align-self: center;
}

.portfolio-header .section-title {
    max-width: 100%;
}

.portfolio-header p {
    color: var(--secondary-gray);
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    line-height: 1.6;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: clamp(0.5rem, 2vw, 1rem);
    margin-bottom: clamp(2rem, 5vw, 3rem);
    flex-wrap: wrap;
    width: 100%;
}

.filter-btn {
    padding: 14px 20px;
    background: var(--light-gray);
    color: var(--primary-dark);
    border: 2px solid transparent;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-orange);
    color: var(--white);
    border-color: var(--accent-orange);
    box-shadow: 0 4px 12px rgba(232, 82, 10, 0.25);
    transform: translateY(-2px);
}

/* ══════════ CONTENEDOR DE SCROLL INDEPENDIENTE ══════════ */
.portfolio-scroll-container {
    display: flex;
    flex-direction: column;
    max-height: clamp(400px, 70vh, 900px);
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 16px;
    padding-right: clamp(0.5rem, 1vw, 1rem);
    width: 100%;
    box-sizing: border-box;
}

/* Scrollbar personalizado para webkit */
.portfolio-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.portfolio-scroll-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.portfolio-scroll-container::-webkit-scrollbar-thumb {
    background: var(--accent-orange);
    border-radius: 10px;
    height: 60px;
}

.portfolio-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #c44208;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(250px, 80vw, 350px), 1fr));
    gap: clamp(0.75rem, 2vw, 1.5rem);
    margin-bottom: 0;
    border-radius: 0;
    overflow: visible;
    width: 100%;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    aspect-ratio: 1/1;
    background-color: var(--light-gray);
    cursor: pointer;
    transition: box-shadow 0.3s ease;
    min-height: clamp(200px, 30vh, 400px);
}

.portfolio-item:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.portfolio-item:active {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.portfolio-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover .portfolio-item-image {
    transform: scale(1.07);
}

.portfolio-item:active .portfolio-item-image {
    transform: scale(1.07);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: clamp(1rem, 3vw, 2rem);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:active .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    color: var(--white);
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    font-weight: 700;
    margin-bottom: clamp(0.3rem, 1vw, 0.5rem);
    letter-spacing: 0.5px;
}

.portfolio-overlay p {
    color: rgba(255, 255, 255, 0.85);
    font-size: clamp(0.8rem, 1.5vw, 0.95rem);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.portfolio-image-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 9999;
}

.portfolio-image-modal.open {
    display: flex;
}

.portfolio-image-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
}

.portfolio-image-modal-content {
    position: relative;
    width: auto;
    max-width: min(100%, 980px);
    max-height: calc(100vh - 3rem);
    display: grid;
    gap: 1rem;
    background: rgba(20, 20, 20, 0.98);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    z-index: 2;
}

.portfolio-image-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.portfolio-image-modal-close:hover {
    background: rgba(255, 255, 255, 0.18);
}

.portfolio-image-modal-figure {
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.portfolio-image-modal-figure > * {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.portfolio-image-modal-figure img {
    display: block;
}

.portfolio-image-modal-caption {
    padding: 1.25rem 1.5rem 1.5rem;
    color: #fff;
    background: rgba(10, 10, 10, 0.95);
}

.portfolio-image-modal-caption h3 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.1rem, 2vw, 1.7rem);
}

.portfolio-image-modal-caption p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: clamp(0.9rem, 1.4vw, 1rem);
}

/* Controles de Navegación del Modal (Galería) */
.portfolio-image-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 3.2rem;
    height: 3.2rem;
    border: none;
    border-radius: 50%;
    background: rgba(15, 15, 15, 0.75);
    color: #fff;
    font-size: 1.6rem;
    font-weight: bold;
    cursor: pointer;
    display: none; /* Controlado dinámicamente por JS */
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-image-modal-nav:hover {
    background: var(--accent-orange, #E8520A);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 32px rgba(232, 82, 10, 0.4);
}

.portfolio-image-modal-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.portfolio-image-modal-nav.prev {
    left: 1.5rem;
}

.portfolio-image-modal-nav.next {
    right: 1.5rem;
}

/* Optimización para Dispositivos Móviles (Navegación Táctil) */
@media (max-width: 768px) {
    .portfolio-image-modal-nav {
        width: 2.8rem;
        height: 2.8rem;
        font-size: 1.3rem;
        background: rgba(15, 15, 15, 0.85);
    }
    
    .portfolio-image-modal-nav.prev {
        left: 0.75rem;
    }
    
    .portfolio-image-modal-nav.next {
        right: 0.75rem;
    }
}

/* ==========================================
   SECCIÓN DE UBICACIÓN - FLUIDA Y ESCALABLE
   ========================================== */
.location {
    padding: clamp(2.5rem, 8vw, 6.25rem) clamp(1.25rem, 5vw, 3rem);
    background-color: var(--light-gray);
    width: 100%;
    box-sizing: border-box;
}

.location-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(280px, 80vw, 450px), 1fr));
    gap: clamp(2rem, 6vw, 4rem);
    align-items: start;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: clamp(1.25rem, 3vw, 2rem);
}

.location-card {
    display: flex;
    gap: clamp(1rem, 3vw, 1.5rem);
    padding: clamp(1rem, 2vw, 1.5rem);
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.location-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.location-icon {
    width: clamp(45px, 8vw, 55px);
    height: clamp(45px, 8vw, 55px);
    background-color: var(--accent-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    flex-shrink: 0;
}

.location-card-content h3 {
    margin-bottom: var(--spacing-sm);
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.location-card-content p {
    margin-bottom: 0;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    width: 100%;
    height: 100%;
    min-height: 550px;
}

.map-container iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 550px !important;
    border: none !important;
}

/* ==========================================
   SECCIÓN DE CONTACTO - FLUIDA Y ESCALABLE
   ========================================== */
.contact {
    padding: clamp(2.5rem, 8vw, 6.25rem) clamp(1.25rem, 5vw, 3rem);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-gray) 100%);
    color: var(--white);
    width: 100%;
    box-sizing: border-box;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-container {
    max-width: min(90%, 700px);
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.contact .section-title {
    text-align: center;
}

.contact .section-title h2,
.contact .section-title p {
    color: var(--white);
}

.contact .section-title h2::after {
    background-color: var(--accent-orange);
}

.form-group {
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
}

label {
    display: block;
    margin-bottom: clamp(0.5rem, 1vw, 0.75rem);
    font-weight: 600;
    color: var(--white);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: clamp(0.75rem, 2vw, 1rem);
    border: 1px solid var(--secondary-gray);
    border-radius: 4px;
    font-family: var(--font-primary);
    font-size: clamp(0.95rem, 1.5vw, 1rem);
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--primary-dark);
    transition: var(--transition);
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

textarea {
    resize: vertical;
    min-height: clamp(120px, 30vh, 200px);
}

.form-error {
    color: var(--error);
    font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    margin-top: 0.25rem;
    display: none;
}

input.error,
textarea.error {
    border-color: var(--error);
}

input.error~.form-error,
textarea.error~.form-error {
    display: block;
}

.form-success {
    background-color: var(--success);
    color: var(--white);
    padding: clamp(1rem, 2vw, 1.5rem);
    border-radius: 4px;
    margin-bottom: var(--spacing-lg);
    display: none;
}

.form-success.show {
    display: block;
}

.submit-button {
    width: 100%;
    padding: clamp(1rem, 2vw, 1.25rem);
    background-color: var(--accent-orange);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: clamp(0.95rem, 1.5vw, 1rem);
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================
   FOOTER - METACOMFINAL DESIGN
   ========================================== */
footer {
    background: var(--primary-dark);
    padding: 64px 72px 28px;
    border-top: 3px solid var(--accent-orange);
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 48px;
}

.footer-section h4 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 20px;
}

.footer-section p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.8;
    margin-bottom: 8px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul a,
.footer-section a {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    transition: color .2s;
}

.footer-section ul a:hover,
.footer-section a:hover {
    color: var(--accent-orange);
}

/* Logo block in footer */
.footer-logo-block {
    margin-bottom: 8px;
}

.footer-logo {
    margin-bottom: 0;
    display: inline-block;
}

.footer-logo img {
    display: block;
    transition: all 0.3s ease-in-out;
}

.footer-logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 10px rgba(232, 82, 10, 0.35));
}


/* Social icons */
.social-links {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all .25s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
    color: #fff;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-bottom p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    margin: 0;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transition: color .2s;
    font-size: 0.75rem;
}

.footer-bottom a:hover {
    color: var(--accent-orange);
}


.footer-social-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1rem);
}

.footer-developed {
    margin: 0;
}

.footer-social {
    display: flex;
    gap: clamp(0.75rem, 1.5vw, 1rem);
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(32px, 6vw, 40px);
    height: clamp(32px, 6vw, 40px);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--light-gray);
    transition: all 0.3s ease;
    padding: clamp(0.4rem, 1vw, 0.6rem);
}

.footer-social a:hover {
    background-color: var(--accent-orange);
    color: var(--white);
    transform: translateY(-2px) scale(1.1);
}

.footer-social svg {
    width: 100%;
    height: 100%;
}




/* ==========================================
   RESPONSIVE DESIGN - TABLET (768px - 1024px)
   ========================================== */
@media (max-width: 1024px) {
    .hero-carousel {
        min-height: 100vh;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-lg: clamp(1.25rem, 4vw, 1.75rem);
        --spacing-xl: clamp(1.75rem, 5vw, 2.5rem);
    }

    .header-container {
        padding: var(--spacing-md);
    }

    .nav-links {
        display: none !important;
    }

    .hamburger {
        display: flex !important;
    }

    .site-nav {
        padding: 0 clamp(0.75rem, 2vw, 1rem);
    }

    .nav-cta {
        display: none !important;
    }

    .hero-carousel {
        min-height: 100vh;
        padding-top: clamp(60px, 10vw, 80px);
    }

    .slide-content {
        padding: 0 clamp(1rem, 4vw, 2rem);
    }

    .hero {
        padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 3vw, 2rem);
        min-height: 60vh;
    }

    .hero h1 {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    .location-content {
        grid-template-columns: 1fr;
        gap: clamp(1.5rem, 5vw, 3rem);
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .portfolio {
        padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 5vw, 2rem);
    }

    .portfolio-header {
        margin-bottom: clamp(1.5rem, 4vw, 2rem);
    }

    .filter-buttons {
        justify-content: center;
        gap: clamp(0.5rem, 1.5vw, 0.75rem);
        margin-bottom: clamp(1.5rem, 4vw, 2rem);
    }

    .filter-btn {
        padding: clamp(8px, 1.5vw, 12px) clamp(16px, 2.5vw, 24px);
        font-size: clamp(0.75rem, 1.2vw, 0.85rem);
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: clamp(0.75rem, 2vw, 1rem);
    }

    .portfolio-scroll-container {
        max-height: clamp(300px, 60vh, 600px);
    }

    .footer-links {
        justify-content: center;
        gap: clamp(0.5rem, 1.5vw, 1rem);
    }

    .contact {
        padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 5vw, 2rem);
    }

    .location {
        padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 5vw, 2rem);
    }

    h1 {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
    }

    h2 {
        font-size: clamp(1.3rem, 4vw, 1.75rem);
    }
}



/* ==========================================
   RESPONSIVE DESIGN - MOBILE SMALL (< 480px)
   ========================================== */
@media (max-width: 480px) {
    :root {
        --spacing-lg: clamp(1rem, 3vw, 1.5rem);
        --spacing-xl: clamp(1.5rem, 4vw, 2rem);
    }

    * {
        box-sizing: border-box;
    }

    html {
        font-size: clamp(13px, 1.5vw, 15px);
    }

    .site-nav {
        padding: 0 clamp(0.75rem, 2vw, 1rem);
    }

    .nav-links {
        display: none !important;
    }

    .nav-cta {
        display: none !important;
    }

    .hamburger {
        display: flex !important;
    }

    .mobile-menu {
        top: 68px !important;
        padding: clamp(1rem, 2vw, 1.5rem);
    }

    .hero-carousel {
        min-height: 100vh;
        padding-top: 68px !important;
    }

    .slide-content {
        padding: 0 clamp(1rem, 3vw, 1.5rem);
        min-height: 40vh;
    }

    .slide-content h1 {
        font-size: clamp(1.8rem, 7vw, 2.5rem) !important;
        margin-bottom: 12px !important;
        line-height: 1.15 !important;
    }

    .slide-content p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        margin-bottom: 24px !important;
        max-width: 90% !important;
    }

    .slide-tag {
        font-size: clamp(0.6rem, 1vw, 0.75rem);
        margin-bottom: clamp(0.75rem, 2vw, 1rem);
    }

    .slide-tag span {
        width: clamp(1.5rem, 3vw, 2.5rem);
        height: 2px;
    }

    .slide-btns {
        flex-direction: column;
        gap: clamp(0.75rem, 1.5vw, 1rem);
    }

    .sbtn-primary,
    .sbtn-outline {
        width: 100%;
        padding: clamp(10px, 1.5vw, 12px) clamp(16px, 2.5vw, 20px);
        font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    }

    .carousel-controls {
        left: clamp(0.75rem, 2vw, 1rem);
        bottom: clamp(0.75rem, 2vw, 1rem);
        gap: clamp(0.5rem, 1vw, 0.75rem);
    }

    .carousel-arrows {
        right: clamp(0.75rem, 2vw, 1rem);
        bottom: clamp(0.75rem, 2vw, 1rem);
        gap: clamp(0.5rem, 1vw, 0.75rem);
    }

    .carr-btn {
        width: clamp(36px, 7vw, 42px);
        height: clamp(36px, 7vw, 42px);
        font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    }

    .dot {
        width: clamp(0.5rem, 1vw, 0.6rem);
        height: clamp(0.5rem, 1vw, 0.6rem);
    }

    .dot.active {
        width: clamp(1.25rem, 2.5vw, 1.5rem);
    }

    .hero {
        padding: clamp(1.5rem, 3vw, 2rem);
        min-height: 50vh;
    }

    .hero h1 {
        font-size: clamp(1.35rem, 4vw, 1.75rem);
    }

    .hero .subtitle {
        font-size: clamp(0.9rem, 1.8vw, 1rem);
    }

    .cta-button {
        padding: clamp(10px, 1.5vw, 12px) clamp(18px, 3vw, 24px);
        font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    }

    .section-title h2 {
        font-size: clamp(1.3rem, 4vw, 1.75rem);
    }

    .section-title p {
        font-size: clamp(0.9rem, 1.5vw, 0.95rem);
    }

    .services {
        padding: clamp(1.5rem, 4vw, 2rem) clamp(1rem, 3vw, 1.5rem);
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: clamp(0.75rem, 2vw, 1rem);
    }

    .service-card {
        padding: clamp(1rem, 2vw, 1.5rem);
        min-height: auto;
    }

    .portfolio {
        padding: clamp(1.5rem, 4vw, 2rem) clamp(1rem, 3vw, 1.5rem);
    }

    .portfolio-header {
        margin-bottom: clamp(1rem, 3vw, 1.5rem);
    }

    .filter-buttons {
        gap: clamp(0.5rem, 1vw, 0.75rem);
        margin-bottom: clamp(1rem, 3vw, 1.5rem);
    }

    .filter-btn {
        padding: clamp(7px, 1vw, 10px) clamp(12px, 2vw, 16px);
        font-size: clamp(0.7rem, 1vw, 0.8rem);
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: clamp(0.75rem, 2vw, 1rem);
    }

    .portfolio-scroll-container {
        max-height: clamp(250px, 50vh, 400px);
    }

    .portfolio-item {
        min-height: clamp(180px, 40vw, 250px);
    }

    .portfolio-overlay {
        padding: clamp(0.75rem, 2vw, 1rem);
    }

    .portfolio-overlay h3 {
        font-size: clamp(0.85rem, 1.5vw, 0.95rem);
        margin-bottom: clamp(0.25rem, 0.75vw, 0.4rem);
    }

    .portfolio-overlay p {
        font-size: clamp(0.7rem, 1.2vw, 0.8rem);
    }

    .contact {
        padding: clamp(1.5rem, 4vw, 2rem) clamp(1rem, 3vw, 1.5rem);
        min-height: 50vh;
    }

    .contact-container {
        max-width: 100%;
    }

    .form-group {
        margin-bottom: clamp(0.75rem, 2vw, 1rem);
    }

    label {
        font-size: clamp(0.85rem, 1.2vw, 0.9rem);
        margin-bottom: clamp(0.4rem, 0.8vw, 0.5rem);
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        padding: clamp(0.6rem, 1.5vw, 0.75rem);
        font-size: clamp(0.9rem, 1.5vw, 0.95rem);
    }

    textarea {
        min-height: clamp(100px, 25vh, 150px);
    }

    .submit-button {
        padding: clamp(0.75rem, 1.5vw, 1rem);
        font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    }

    .location {
        padding: clamp(1.5rem, 4vw, 2rem) clamp(1rem, 3vw, 1.5rem);
    }

    .location-content {
        gap: clamp(1rem, 3vw, 1.5rem);
    }

    .location-card {
        gap: clamp(0.75rem, 2vw, 1rem);
        padding: clamp(0.75rem, 1.5vw, 1rem);
    }

    .location-icon {
        width: clamp(40px, 8vw, 48px);
        height: clamp(40px, 8vw, 48px);
        font-size: clamp(1rem, 2vw, 1.35rem);
    }

    .map-container {
        min-height: clamp(250px, 40vh, 350px);
    }

    .map-container iframe {
        min-height: clamp(250px, 40vh, 350px);
    }



    h1 {
        font-size: clamp(1.3rem, 4vw, 1.6rem);
    }

    h2 {
        font-size: clamp(1.1rem, 3.5vw, 1.4rem);
    }

    h3 {
        font-size: clamp(1rem, 2.5vw, 1.2rem);
    }

    p {
        font-size: clamp(0.9rem, 1.5vw, 0.95rem);
    }
}

/* ══════════ ULTRA-SMALL DEVICES (< 360px) ══════════ */
@media (max-width: 360px) {
    html {
        font-size: 13px;
    }

    .slide-btns {
        gap: clamp(0.6rem, 1vw, 0.8rem);
    }

    .sbtn-primary,
    .sbtn-outline {
        padding: 10px clamp(12px, 2vw, 14px);
    }

    .contact-container {
        padding: 0;
    }
}

.submit-button {
    padding: 12px;
    font-size: 0.95rem;
}

/* Ubicación */
.location {
    padding: 30px 16px;
}

.location-content {
    grid-template-columns: 1fr;
    gap: 24px;
}

.location-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
}

.map-container {
    min-height: 300px;
}

.map-container iframe {
    min-height: 300px;
}

/* Contacto */
#contacto {
    padding: 30px 16px;
}

.contact-container {
    max-width: 100%;
}

/* Especialización */
#especializacion {
    padding: 30px 16px;
}

.spec-layout {
    grid-template-columns: 1fr;
    gap: 24px;
}

.spec-tabs {
    gap: 12px;
}

.spec-tab {
    padding: 12px;
    gap: 12px;
}

.spec-tab-icon {
    font-size: 1.5rem;
    min-width: 30px;
}

.spec-tab h4 {
    font-size: 0.95rem;
}

.spec-tab p {
    font-size: 0.8rem;
}




}

.footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-logo-block {
    text-align: left;
}

.footer-links {
    justify-content: center;
    width: 100%;
}

.footer-social {
    justify-content: center;
    width: 100%;
}

.footer-social a {
    width: 30px;
    height: 30px;
}

.footer-social-section {
    padding-top: 16px;
    padding-bottom: 16px;
}

.footer-social-label {
    font-size: 0.85rem;
}
}

/* ==========================================
   UTILIDADES
   ========================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-small {
    margin-top: var(--spacing-sm);
}

.mt-medium {
    margin-top: var(--spacing-md);
}

.mt-large {
    margin-top: var(--spacing-lg);
}

.mb-small {
    margin-bottom: var(--spacing-sm);
}

.mb-medium {
    margin-bottom: var(--spacing-md);
}

.mb-large {
    margin-bottom: var(--spacing-lg);
}

.opacity-75 {
    opacity: 0.75;
}

.opacity-50 {
    opacity: 0.5;
}

/* Animaciones */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: slideInUp 0.6s ease forwards;
}

/* ==========================================
   ESTILOS DE METALCOM - INTEGRACIÓN
   ========================================== */

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg2);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-orange);
    border-radius: 3px;
}

/* ══════════ NAV ══════════ */
nav.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 4px 24px rgba(17, 18, 21, 0.05);
    transition: all 0.3s ease-in-out;
    transform: translateY(0);
}

nav.site-nav.scrolled {
    box-shadow: var(--shadow);
}

nav.site-nav.header-hidden {
    transform: translateY(-100%);
}

.nav-container {
    width: 100%;
    max-width: 90%;
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px; /* Altura por defecto */
    box-sizing: border-box;
    transition: height 0.3s ease-in-out;
}

nav.site-nav.scrolled .nav-container {
    height: 70px; /* Altura más compacta al hacer scroll */
}

.nav-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: all 0.3s ease-in-out;
    margin-left: calc(clamp(2rem, 5vw, 3rem) + clamp(0.5rem, 1vw, 0.75rem));
}

.nav-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: all 0.3s ease-in-out;
}

.nav-logo-icon img {
    width: 255px;
    height: 70px;
    transition: all 0.3s ease-in-out;
}

nav.site-nav.scrolled .nav-logo-icon img {
    width: 219px;
    height: 60px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 600; /* Legible y limpio */
    letter-spacing: .5px;
    color: var(--charcoal);
    text-decoration: none;
    transition: color .2s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-orange);
    transition: width .25s;
}

.nav-links a:hover {
    color: var(--accent-orange);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: .5px;
    padding: 12px 28px;
    background: var(--accent-orange);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    transition: all .25s;
    box-shadow: 0 4px 16px rgba(232, 82, 10, 0.3);
}

.nav-cta:hover {
    background: #c44208;
    transform: translateY(-1px);
}

/* hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary-dark);
    border-radius: 2px;
    transition: all .3s;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding: 24px 48px 32px;
    z-index: 499;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 12px 32px rgba(17, 18, 21, 0.1);
    transition: top 0.3s ease-in-out;
}

nav.site-nav.scrolled + .mobile-menu,
nav.site-nav.scrolled ~ .mobile-menu {
    top: 70px;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.mobile-menu a:last-child {
    border: none;
    color: var(--accent-orange);
}

/* ══════════ STATS STRIP ══════════ */
.stats-strip {
    background: var(--primary-dark);
    width: 100%;
    box-sizing: border-box;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stat-item {
    padding: clamp(20px, 4vw, 32px) clamp(12px, 3vw, 24px);
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    transition: background .25s;
    box-sizing: border-box;
}

.stat-item:last-child {
    border-right: none;
}

.stat-item:hover {
    background: rgba(232, 82, 10, 0.07);
}

.stat-val {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 5vw, 2.6rem);
    font-weight: 800;
    color: var(--accent-orange);
    line-height: 1;
}

.stat-label {
    font-size: clamp(0.6rem, 2vw, 0.75rem);
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: clamp(4px, 1vw, 6px);
}

/* ══════════ NOSOTROS ══════════ */
#nosotros {
    padding: clamp(40px, 8vw, 100px) 0;
    background: var(--white);
    width: 100%;
    box-sizing: border-box;
}

#nosotros .section-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 8vw, 80px);
    align-items: center;
}

.about-left {}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-orange);
    background: rgba(232, 82, 10, 0.08);
    padding: 7px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.chip::before {
    content: '●';
    font-size: 0.4rem;
}

h2.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -1px;
    color: var(--primary-dark);
    margin-bottom: 24px;
}

h2.section-title span {
    color: var(--accent-orange);
}

.about-text {
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--secondary-gray);
    margin-bottom: 32px;
}

.about-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 40px;
}

.highlight-card {
    background: var(--light-gray);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    transition: all .25s;
}

.highlight-card:hover {
    border-color: var(--accent-orange);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 82, 10, 0.1);
}

.highlight-icon {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.highlight-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.highlight-desc {
    font-size: 0.78rem;
    color: var(--secondary-gray);
    line-height: 1.5;
}

.btn-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 14px 32px;
    background: var(--accent-orange);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    transition: all .25s;
    box-shadow: 0 4px 16px rgba(232, 82, 10, 0.25);
}

.btn-main:hover {
    background: #c44208;
    transform: translateY(-1px);
}

.about-right {
    position: relative;
}

.about-img-main {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--primary-dark);
}

.about-visual-box {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #1a0d02, #2d1a08);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.about-visual-box img.about-visual-img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center center !important;
    max-width: none !important;
    max-height: none !important;
    z-index: 0 !important;
}

.about-visual-box::before {
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: normal;
    content: '';
    position: absolute;
    inset: 0;
    background: none;
}

.about-crane-art {
    position: relative;
    z-index: 2;
}

/* Crane illustration */
.about-crane-art svg {
    filter: drop-shadow(0 10px 40px rgba(232, 82, 10, 0.3));
}

.about-badge-float {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: linear-gradient(135deg, rgba(232, 82, 10, 0.84) 0%, rgba(196, 66, 8, 0.68) 100%);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: 0 12px 32px rgba(232, 82, 10, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.38);
    color: var(--white);
    z-index: 3;
}

.about-badge-float .num {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.about-badge-float .txt {
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.85;
    margin-top: 2px;
}

/* ══════════ INFORMACIÓN / SERVICIOS ══════════ */
#informacion {
    padding: clamp(40px, 6vw, 100px) 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(232, 82, 10, 0.16) 0%, transparent 45%),
        radial-gradient(circle at 85% 78%, rgba(232, 82, 10, 0.12) 0%, transparent 45%),
        var(--primary-dark);
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: clamp(40px, 6vw, 64px);
}

#informacion .section-header .chip {
    margin: 0 auto 16px;
    background: rgba(232, 82, 10, 0.12);
    color: var(--accent-orange);
}

#informacion .section-header p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.7;
    max-width: 520px;
    margin: 16px auto 0;
}

#informacion .section-title {
    color: var(--white);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(16px, 3vw, 24px);
    max-width: 100%;
    margin: 0 auto;
}

.info-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.info-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-radius: 16px;
    padding: clamp(24px, 4vw, 36px) clamp(20px, 4vw, 28px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    transition: background .3s;
}

.info-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(232, 82, 10, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    border-color: rgba(232, 82, 10, 0.65);
    background: linear-gradient(145deg, rgba(232, 82, 10, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%);
}

.info-card:hover::before {
    background: var(--accent-orange);
}

.info-card-arrow {
    align-self: flex-end;
    margin-top: 16px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

.info-card:hover .info-card-arrow {
    color: var(--accent-orange);
    transform: translateX(4px);
    border-color: var(--accent-orange);
}

.info-card-icon {
    width: clamp(44px, 8vw, 54px);
    height: clamp(44px, 8vw, 54px);
    border-radius: 12px;
    background: rgba(232, 82, 10, 0.14);
    border: 1px solid rgba(232, 82, 10, 0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    margin-bottom: clamp(16px, 3vw, 24px);
    color: var(--accent-orange);
    transition: all 0.3s ease;
}

.info-card-icon svg {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    transition: transform 0.3s ease;
}

.info-card:hover .info-card-icon {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
    color: var(--white);
    box-shadow: 0 8px 20px rgba(232, 82, 10, 0.35);
}

.info-card:hover .info-card-icon svg {
    transform: scale(1.08);
}

.info-card-num {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-orange);
    margin-bottom: 8px;
}

.info-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}

.info-card p {
    font-size: 0.875rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.68);
    flex-grow: 1;
}

/* Grid responsivo para servicios */
@media (max-width: 1200px) {
    .info-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: clamp(12px, 2vw, 16px);
    }
}

@media (max-width: 480px) {
    .info-grid {
        grid-template-columns: 1fr;
        gap: clamp(12px, 2vw, 16px);
    }

    .info-card {
        padding: clamp(16px, 3vw, 24px) clamp(16px, 3vw, 20px);
    }

    .info-card-icon {
        width: clamp(36px, 8vw, 48px);
        height: clamp(36px, 8vw, 48px);
        font-size: clamp(1.1rem, 3vw, 1.4rem);
        margin-bottom: clamp(12px, 2vw, 16px);
    }

    .info-card h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .info-card p {
        font-size: 0.8rem;
    }
}

/* ══════════ ESPECIALIZACIÓN ══════════ */
#especializacion {
    background: var(--primary-dark);
    padding: clamp(40px, 6vw, 100px) clamp(20px, 5vw, 72px);
    width: 100%;
    box-sizing: border-box;
}

#especializacion .chip {
    background: rgba(232, 82, 10, 0.15);
}

#especializacion h2.section-title {
    color: var(--white);
}

.spec-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: clamp(40px, 6vw, 72px);
    align-items: start;
}

.spec-left {}

.spec-left .about-text {
    color: rgba(255, 255, 255, 0.55);
}

.spec-tabs {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 32px;
}

.spec-tab {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all .25s;
    border: 1px solid transparent;
}

.spec-tab:hover {
    background: rgba(255, 255, 255, 0.04);
}

.spec-tab.active {
    background: rgba(232, 82, 10, 0.1);
    border-color: rgba(232, 82, 10, 0.25);
}

.spec-tab-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: background .25s;
}

.spec-tab.active .spec-tab-icon {
    background: var(--accent-orange);
}

.spec-tab-text h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
}

.spec-tab-text p {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

.spec-tab-arrow {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.2);
    transition: color .25s;
}

.spec-tab.active .spec-tab-arrow {
    color: var(--accent-orange);
}

.spec-right {}

.spec-panel {
    display: none;
}

.spec-panel.active {
    display: block;
}

.spec-panel-visual {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    position: relative;
}

.spec-panel-visual svg {
    opacity: .85;
}

/* coloured overlays per panel */
.spv-1 {
    background: linear-gradient(135deg, #1a0d02, #2d1508);
}

.spv-2 {
    background: linear-gradient(135deg, #021a10, #082d18);
}

.spv-3 {
    background: linear-gradient(135deg, #0a0a1a, #10102d);
}

.spv-4 {
    background: linear-gradient(135deg, #1a0505, #2d0808);
}

.spec-panel-visual .sp-pattern {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg, rgba(232, 82, 10, 0.04) 0, rgba(232, 82, 10, 0.04) 1px, transparent 1px, transparent 24px);
}

.spec-panel-info h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
}

.spec-panel-info p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}

.spec-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.spec-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}


/* project photos grid */
.proj-photos {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: clamp(200px, 30vw, 240px) clamp(200px, 30vw, 240px);
    gap: clamp(8px, 2vw, 12px);
    margin-bottom: clamp(40px, 6vw, 72px);
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
}

.photo-cell {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.photo-cell:first-child {
    grid-row: 1/3;
}

.photo-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform .5s ease;
}

.photo-cell:hover .photo-bg {
    transform: scale(1.07);
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 55%);
    opacity: 0;
    transition: opacity .3s;
}

.photo-cell:hover .photo-overlay {
    opacity: 1;
}

.photo-label {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--white);
    transform: translateY(8px);
    transition: transform .3s;
    opacity: 0;
}

.photo-cell:hover .photo-label {
    opacity: 1;
    transform: translateY(0);
}

/* abstract photo placeholders */
.ph1 {
    background: linear-gradient(135deg, #2a1205 0%, #4a2208 40%, #1a0d02 100%);
}

.ph2 {
    background: linear-gradient(135deg, #05112a 0%, #0d1e42 50%, #020810 100%);
}

.ph3 {
    background: linear-gradient(135deg, #0a1a06 0%, #182e0e 50%, #040d02 100%);
}

.ph4 {
    background: linear-gradient(135deg, #1a1205 0%, #2e2008 50%, #0d0a02 100%);
}

.ph5 {
    background: linear-gradient(135deg, #1a0505 0%, #2e0e0e 50%, #0d0202 100%);
}

/* steel beam patterns */
.ph1::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, rgba(232, 82, 10, 0.07) 0, rgba(232, 82, 10, 0.07) 2px, transparent 2px, transparent 40px);
}

.ph2::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(100, 140, 255, 0.06) 0, rgba(100, 140, 255, 0.06) 2px, transparent 2px, transparent 35px);
}

.ph3::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg, rgba(80, 200, 80, 0.05) 0, rgba(80, 200, 80, 0.05) 2px, transparent 2px, transparent 28px);
}

.ph4::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(-45deg, rgba(255, 200, 50, 0.06) 0, rgba(255, 200, 50, 0.06) 2px, transparent 2px, transparent 30px);
}

.ph5::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, rgba(255, 80, 80, 0.06) 0, rgba(255, 80, 80, 0.06) 2px, transparent 2px, transparent 32px);
}

/* photo labels inside */
.photo-cell .fixed-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 20px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: .5px;
    z-index: 2;
}

/* ══════════ CONTACTO ══════════ */
#contacto {
    padding: clamp(40px, 8vw, 100px) 0;
    background: var(--bg2);
    width: 100%;
    box-sizing: border-box;
}

#contacto .section-container {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: clamp(40px, 8vw, 80px);
    align-items: start;
}

.contact-left-info {}

.contact-left-info .about-text {
    margin-bottom: 40px;
}

.contact-right-map {
    width: 100%;
    height: 100%;
}

.contact-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-radius: 12px;
    padding: 20px 24px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 24px rgba(17, 18, 21, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all .25s;
}

.contact-card:hover {
    border-color: var(--accent-orange);
    transform: translateX(4px);
}

.contact-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(232, 82, 10, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-card-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--secondary-gray);
}

.contact-card-val {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-top: 2px;
}



/* ══════════ REVEAL ANIMATIONS ══════════ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

.reveal-d1 {
    transition-delay: .1s;
}

.reveal-d2 {
    transition-delay: .2s;
}

.reveal-d3 {
    transition-delay: .3s;
}

.reveal-d4 {
    transition-delay: .4s;
}

/* ══════════ RESPONSIVE ══════════ */
@media(max-width:1024px) {

    .nav-links,
    .nav-cta {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .slide-content,
    .nav-container {
        padding: 0 32px;
    }

    .nav-logo {
        margin-left: 0;
    }

    #nosotros,
    #contacto {
        grid-template-columns: 1fr 1.1fr;
        gap: 40px;
        padding: 72px 32px;
    }

    .about-right {
        display: block;
    }

    #informacion {
        padding: 72px 32px;
    }

    .info-grid {
        grid-template-columns: 1fr 1fr;
    }

    #especializacion {
        padding: 72px 32px;
    }

    .spec-layout {
        grid-template-columns: 1fr;
    }

    .carousel-arrows {
        right: 24px;
    }

    .carousel-controls {
        left: 24px;
    }

    .reviews-controls {
        gap: 24px;
    }

    .carousel-btn {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .proj-photos {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 200px 200px 200px;
    }

    .photo-cell:first-child {
        grid-column: 1/3;
    }

    .review-card {
        min-width: calc(50% - 12px);
    }

    footer {
        padding: 40px 32px 24px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media(max-width:640px) {
    .stats-strip {
        grid-template-columns: 1fr 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .review-card {
        min-width: calc(100% - 0px);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .proj-photos {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(5, 180px);
    }

    .photo-cell:first-child {
        grid-column: auto;
    }

    #contacto {
        padding: 60px 24px;
    }

    .contact-form-box {
        padding: 32px 24px;
    }
}

/* Responsividad para Nosotros, Contacto y Contenedores en móviles */
@media (max-width: 768px) {
    .nav-container,
    .section-container {
        padding: 0 16px;
    }

    #nosotros .section-container {
        display: flex !important;
        flex-direction: column-reverse !important; /* Imagen arriba, texto abajo */
        gap: 32px !important;
    }

    #nosotros {
        padding: 48px 20px !important;
    }
    
    .about-left,
    .about-right {
        width: 100% !important;
    }
    
    .about-right {
        margin-bottom: 24px !important; /* Separación con el título de abajo */
    }
    
    .about-badge-float {
        bottom: -10px !important;
        left: 10px !important;
        padding: 12px 18px !important;
    }
    
    #contacto .section-container {
        display: flex !important;
        flex-direction: column-reverse !important; /* Mapa arriba, información abajo */
        gap: 32px !important;
    }

    #contacto {
        padding: 48px 20px !important;
    }
    
    .contact-left-info,
    .contact-right-map {
        width: 100% !important;
    }
    
    .contact-right-map {
        height: 350px !important;
    }
    
    .contact-right-map .map-container,
    .contact-right-map .map-container iframe {
        width: 100% !important;
        height: 100% !important;
        min-height: auto !important;
    }

    /* ==========================================================================
       MEJORAS DE DISEÑO MÓVIL (PANTALLAS PEQUEÑAS)
       ========================================================================== */

    /* 1. Header y Logotipo Proporcional */
    .nav-container {
        height: 68px !important;
    }
    nav.site-nav.scrolled .nav-container {
        height: 58px !important;
    }
    .nav-logo-icon img {
        width: 175px !important;
        height: 48px !important;
    }
    nav.site-nav.scrolled .nav-logo-icon img {
        width: 146px !important;
        height: 40px !important;
    }
    .hamburger {
        padding: 6px !important;
        margin-top: 2px;
    }

    /* 2. Menú Móvil Animado con Efecto Glassmorphism */
    .mobile-menu {
        display: flex !important;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
        top: 68px !important;
        background: rgba(247, 245, 242, 0.98) !important;
        backdrop-filter: blur(20px);
        padding: 20px 32px 28px !important;
    }
    .mobile-menu.open {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    nav.site-nav.scrolled + .mobile-menu,
    nav.site-nav.scrolled ~ .mobile-menu {
        top: 58px !important;
    }

    /* 3. Categorías de Filtro con Desplazamiento Horizontal (Swipeable Tab Bar) */
    .filter-buttons {
        display: flex !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        white-space: nowrap !important;
        padding: 4px 16px 12px !important;
        margin-left: -20px !important;
        margin-right: -20px !important;
        gap: 8px !important;
    }
    .filter-buttons::-webkit-scrollbar {
        display: none !important; /* Oculta la barra de scroll para mayor limpieza */
    }
    .filter-btn {
        flex: 0 0 auto !important;
    }
}