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

:root {
    --primary: #1a1a1a;
    --secondary: #2d5a3d;
    --accent: #e74c3c;
    --accent-light: #ff6b5b;
    --neutral-light: #f5f5f5;
    --neutral-dark: #333;
    --text-primary: #1a1a1a;
    --text-secondary: #555;
    --border: #ddd;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-primary);
    background: #fff;
    overflow-x: hidden;
}

/* ===== NAVBAR ===== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    animation: slideDownNav 0.6s ease-out;
}

@keyframes slideDownNav {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar-logo {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-logo::before {
    content: '■';
    color: var(--accent);
    font-size: 20px;
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

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

/* ===== HERO SECTION ===== */
#home {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-top: 70px;
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.5);
    z-index: 2;
}

.hero-content {
    text-align: center;
    z-index: 3;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    font-size: 72px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -2px;
    word-spacing: 0.1em;
}

.hero-content h1 .accent-word {
    color: var(--accent);
}

.hero-content p {
    font-size: 20px;
    color: #aaa;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    padding: 16px 40px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(231, 76, 60, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(231, 76, 60, 0.4);
}

.hero-bg-element {
    position: absolute;
    opacity: 0.05;
}

.hero-bg-element.square {
    width: 400px;
    height: 400px;
    background: #e74c3c;
    top: -100px;
    right: -100px;
}

.hero-bg-element.circle {
    width: 300px;
    height: 300px;
    background: #2d5a3d;
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
}

/* ===== SECCION GENERAL ===== */
section {
    padding: 100px 50px;
    position: relative;
}

section:nth-child(even) {
    background: var(--neutral-light);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease-out;
}

.section-header h2 {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-top: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.section-content {
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== LAYOUT CONTENIDO SECCION ===== */
.section-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: flex-start;
    margin-bottom: 60px;
}

.section-layout.reverse {
    direction: rtl;
}

.section-image--compact {
    height: 220px;
    margin-top: 30px;
}

.section-image--compact img {
    height: 100%;
}

.section-subsection--right {
    margin-top: 20px;
}

.section-layout.reverse > * {
    direction: ltr;
}

#nosotros .section-text p {
    text-align: justify;
    text-align-last: center;
}

/* ===== NOSOTROS HERO ===== */
#nosotros {
    padding: 0;
    margin: 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

#nosotros .nosotros-hero {
    position: relative;
    min-height: 750px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0;
    margin-bottom: 0;
}

.nosotros-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.nosotros-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 2;
}

.nosotros-content {
    position: relative;
    z-index: 3;
    max-width: 700px;
    padding: 50px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background-color: rgba(26, 26, 26, 0.781);
}

.nosotros-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    padding: 60px 70px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background-color: rgba(26, 26, 26, 0.555);
}

.nosotros-content h4 {
    font-size: 42px;
    margin-bottom: 35px;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 8px;
}

.nosotros-content h4 {
    font-size: 42px;
    margin-bottom: 25px;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 8px;
}

.nosotros-content p {
    font-size: 16px;
    color: #ddd;
    line-height: 1.8;
    margin-bottom: 18px;
    text-align: justify;
    text-align-last: center;
}

.nosotros-content .company-name {
    color: var(--accent);
    font-weight: 800;
}

.nosotros-content .accent-word {
    color: var(--accent);
}

.section-text h3 {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 700;
}

.section-text p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.section-subsection {
    margin-top: 30px;
}

.section-subsection h4 {
    font-size: 42px;
    margin-bottom: 30px;
    color: var(--primary);
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 8px;
}

.section-text h4 {
    font-size: 42px;
    margin-bottom: 30px;
    color: var(--primary);
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 8px;
}

.metal-subsection-2 .section-text,
.metal-subsection-3 .section-text {
    text-align: center;
}

.metal-subsection-2 .section-text ul,
.metal-subsection-3 .section-text ul {
    list-style-position: inside;
    text-align: left;
    display: inline-block;
}

.section-subsection ul {
    list-style: disc inside;
    color: var(--text-secondary);
    line-height: 1.8;
}

.section-subsection ul li {
    margin-bottom: 10px;
}

.subsection-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 30px;
    align-items: start;
}

.subsection-inline-image {
    position: relative;
    height: 220px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-right: 40%;
}

.subsection-inline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.subsection-inline-text {
    text-align: right;
}

.subsection-inline-text h4 {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--primary);
}

.subsection-inline-text p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
}

.subsection-inline-text ul {
    list-style-position: outside;
    text-align: right;
    color: var(--text-secondary);
    line-height: 1.8;
    padding-right: 20px;
}

.subsection-inline-text ul li {
    margin-bottom: 10px;
}

.section-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: white;
    border-left: 4px solid var(--accent);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.feature-item::before {
    content: '✓';
    font-weight: 700;
    color: var(--accent);
    font-size: 20px;
    flex-shrink: 0;
}

.feature-item p {
    font-size: 14px;
    margin: 0;
}

.section-image {
    position: relative;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.section-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== IMAGE CAROUSEL (FADE) ===== */
.image-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== METALES SUBSECCIONES ===== */
.metal-subsection-1,
.metal-subsection-2,
.metal-subsection-3 {
    margin-bottom: 100px;
}

.metal-subsection-1:last-child,
.metal-subsection-2:last-child,
.metal-subsection-3:last-child {
    margin-bottom: 0;
}

/* ===== MADERAS SUBSECCIONES ===== */
.madera-subsection-1,
.madera-subsection-2,
.madera-subsection-3 {
    margin-bottom: 100px;
}

.madera-subsection-1:last-child,
.madera-subsection-2:last-child,
.madera-subsection-3:last-child {
    margin-bottom: 0;
}

.madera-subsection-2 .section-text,
.madera-subsection-3 .section-text {
    text-align: center;
}

.wood-treatments-left {
    text-align: left;
    margin-left: 0;
    margin-top: 25px;
}

.wood-treatments-left p {
    text-align: left;
    margin-bottom: 10px;
}

.wood-treatments-left ul {
    list-style-position: inside;
    text-align: left;
}

.madera-subsection-3 .section-text p + p,
.madera-subsection-3 .section-text ul {
    text-align: left;
    display: inline-block;
    margin-left: 0;
}

.madera-subsection-3 .section-text ul {
    list-style-position: inside;
}

.madera-subsection-2 .section-text ul,
.madera-subsection-3 .section-text ul {
    list-style-position: inside;
    text-align: left;
    display: inline-block;
}

/* ===== EXTERIORES SUBSECCIONES ===== */
.exterior-subsection-1,
.exterior-subsection-2,
.exterior-subsection-3 {
    margin-bottom: 100px;
}

.exterior-subsection-1:last-child,
.exterior-subsection-2:last-child,
.exterior-subsection-3:last-child {
    margin-bottom: 0;
}

.exterior-subsection-2 .section-text,
.exterior-subsection-3 .section-text {
    text-align: center;
}

.exterior-subsection-2 .section-text ul,
.exterior-subsection-3 .section-text ul {
    list-style-position: inside;
    text-align: left;
    display: inline-block;
}

/* ===== DIAGONAL STACK CAROUSEL ===== */
.diagonal-carousel-wrapper {
    position: relative;
    height: 400px;
    border-radius: 8px;
    overflow: visible;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: transparent !important;
}

#interiores .section-content {
    background: transparent !important;
}

.diagonal-carousel-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 500px;
    padding: 40px 0;
}

.diagonal-carousel {
    --card-width: 550px;
    --card-height: 320px;
    --card-radius: 16px;
    --card-shadow: 0 10px 40px rgba(0,0,0,0.15);
    --transition-speed: 0.5s;
    --transition-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    width: var(--card-width);
    height: var(--card-height);
}

.diag-card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: transform var(--transition-speed) var(--transition-ease),
                opacity var(--transition-speed) var(--transition-ease);
}

.diag-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.diag-card-label {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* Card positions */
.diag-card.active {
    transform: translateY(0) translateX(0) scale(1) rotateZ(0deg);
    z-index: 30;
    opacity: 1;
}

.diag-card.next {
    transform: translateY(24px) translateX(12px) scale(0.95) rotateZ(4deg);
    z-index: 20;
    opacity: 1;
}

.diag-card.next-2 {
    transform: translateY(48px) translateX(24px) scale(0.9) rotateZ(8deg);
    z-index: 10;
    opacity: 1;
}

.diag-card.hidden {
    transform: translateY(72px) translateX(36px) scale(0.85) rotateZ(12deg);
    z-index: 0;
    opacity: 0;
    pointer-events: none;
}

/* ===== CARRUSEL ===== */
.carousel-container {
    margin-top: 80px;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f9f9f9;
    border-radius: 8px;
    min-height: 500px;
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease-out;
}

.carousel-item {
    min-width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-item-content {
    text-align: center;
    color: #333;
    padding: 40px;
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.carousel-item-content h4 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary);
}

.carousel-item-content p {
    font-size: 14px;
    color: var(--text-secondary);
}

.carousel-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-btn.active {
    background: var(--accent);
    width: 30px;
    border-radius: 6px;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.6);
}

.carousel-arrow.prev {
    left: 0;
}

.carousel-arrow.next {
    right: 0;
}

/* ===== CONTACT SECTION ===== */
#contact {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    color: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.contact-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: var(--accent);
}

.contact-card-icon {
    font-size: 48px;
    color: var(--accent);
    margin-bottom: 20px;
}

.contact-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
}

.contact-card p {
    font-size: 16px;
    color: #aaa;
    line-height: 1.6;
}

.contact-card a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* ===== FOOTER ===== */
footer {
    background: #0a0a0a;
    color: #aaa;
    padding: 40px 50px;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .section-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .subsection-inline {
        grid-template-columns: 1fr;
    }

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

    .nav-links {
        gap: 20px;
    }

    .nav-links a {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0 30px;
        flex-direction: column;
        height: auto;
        gap: 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    section {
        padding: 60px 30px;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .section-image {
        height: 300px;
    }

    .carousel {
        min-height: 250px;
    }

    .carousel-item {
        height: 250px;
    }

    .diagonal-carousel {
        --card-width: 340px;
        --card-height: 240px;
    }

    .diagonal-carousel-wrapper {
        height: 300px;
        justify-content: center;
    }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== NOSOTROS / PARTNERS STRIP ===== */
.partners-strip {
    background: #272727;
    padding: 30px 0;
    overflow: hidden;
}

.partners-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
}

.partner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    height: 80px;
    padding: 10px 20px;
    margin-right: 40px;
    background: transparent;
    opacity: 0.9;
}

.partner svg {
    width: 160px;
    height: auto;
    filter: grayscale(100%) brightness(120%);
}

.partner img {
    width: 160px;
    height: auto;
    object-fit: contain;
    display: block;
}

@media (max-width: 768px) {
    .partner { min-width: 140px; }
    .partner svg { width: 120px; }
}

/* Estilo específico para el nombre de la empresa dentro de contenidos */
.company-name {
    color: var(--accent);
    font-weight: 800;
}
