/* Fuente del contacto destacado del pie (alojada en el propio sitio) */
@font-face { font-family: "Merriweather"; src: url("fonts/merriweather-latin-300-italic.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }

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

:root {
    --color-primary: #FF6B35;
    --color-dark: #000000;
    --color-light: #FFFFFF;
    --color-gray: #F8F8F8;
    --color-gray-text: #666666;
    --font-family: 'Montserrat', sans-serif;
    --max-width: 1200px;
}

body {
    font-family: var(--font-family);
    color: var(--color-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* NAVBAR */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    left: 0;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: transparent;
    transition: all 0.3s ease;
    box-sizing: border-box;
    overflow-x: hidden;
}

nav.scrolled {
    background: var(--color-dark);
}

.navbar-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2%;
}

.logo {
    height: 45px;
    display: flex;
    align-items: center;
}

.logo img {
    height: 100%;
    width: auto;
    filter: brightness(0) invert(1);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-menu a {
    color: var(--color-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--color-light);
    transition: all 0.3s ease;
}

/* CONTENEDOR */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 3%;
    box-sizing: border-box;
}

/* HERO */
.hero {
    height: 100vh;
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('./images/foto hero.jpg');
    background-position: 50% 0;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 70px;
}

.hero-content {
    text-align: center;
    color: var(--color-light);
}

.hero-logo {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* SECCIONES */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title::before {
    content: "";
    width: 25px;
    height: 25px;
    background-color: var(--color-primary);
    flex-shrink: 0;
}

.phases .section-title {
    color: var(--color-light);
}

/* ABOUT */
.about {
    background: var(--color-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.about-text p {
    color: var(--color-gray-text);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 0.95rem;
}

.about-image {
    border-radius: 8px;
    overflow: hidden;
    height: 400px;
}

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

/* LAS 3 FASES */
.phases {
    background: var(--color-dark);
    color: var(--color-light);
}

.phases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 3rem;
}

.phase {
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 2.5rem 2rem;
}

.phase-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.phase h3 {
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    color: var(--color-light);
}

.phase-list {
    list-style: none;
    text-align: left;
}

.phase-list li {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    line-height: 1.6;
    padding-left: 1.5rem;
    position: relative;
}

.phase-list li:before {
    content: "•";
    color: var(--color-primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* PORTFOLIO */
.portfolio {
    background: var(--color-gray);
}

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

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 280px;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.portfolio-overlay h3 {
    color: var(--color-light);
    font-size: 1.3rem;
    text-align: center;
}

/* CLIENTES */
.clients {
    background: var(--color-light);
    text-align: center;
}

.clients-carousel {
    position: relative;
    margin-top: 0;
    overflow: hidden;
    width: 100%;
    padding: 0.5rem 0;
}

.carousel-track {
    display: flex;
    gap: 3rem;
    animation: scroll 40s linear infinite;
    padding: 1rem 5%;
    width: max-content;
}

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

.client-logo {
    flex-shrink: 0;
    width: 180px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.client-logo:hover {
    opacity: 1;
}

.client-logo img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

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

/* TESTIMONIOS */
.testimonials {
    background: var(--color-dark);
}

.testimonials .section-title {
    color: var(--color-light);
}

.testimonials-carousel {
    position: relative;
    margin-top: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeIn 0.5s ease-in-out forwards;
}

.testimonial-card.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.testimonial-text {
    color: var(--color-light);
    font-size: 1rem;
    margin-bottom: 2rem;
    font-style: italic;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--color-light);
}

.testimonial-info p {
    font-size: 0.8rem;
    color: var(--color-primary);
}

/* MANTENIMIENTOS */
.maintenance {
    background: var(--color-light);
    padding: 5rem 0;
}

.maintenance-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.maintenance-text h2 {
    margin-bottom: 1.5rem;
}

.maintenance-text p {
    color: var(--color-gray-text);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 0.95rem;
}

.maintenance-logos {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin: 2rem 0;
}

.maintenance-logos img {
    height: 80px;
    object-fit: contain;
}

.btn-maintenance {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-light);
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-family: var(--font-family);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1rem;
    transition: background 0.3s ease;
}

.btn-maintenance:hover {
    background: #FF5521;
}

.maintenance-image {
    border-radius: 8px;
    overflow: hidden;
    height: 400px;
}

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

/* FOOTER */
footer {
    background: var(--color-dark);
    color: var(--color-light);
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.footer-section p, .footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
    display: block;
}

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

.footer-logo {
    height: 35px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.footer-logo img {
    height: 100%;
    width: auto;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .container {
        padding: 0 4%;
    }

    .nav-menu {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu.active {
        display: flex;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background: var(--color-dark);
        padding: 1.5rem 5%;
        z-index: 999;
        box-sizing: border-box;
    }

    .hero {
        height: 60vh;
        background-attachment: scroll;
    }

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

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

    .section-title::before {
        width: 20px;
        height: 20px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        height: 300px;
    }

    .phases-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .carousel-track {
        gap: 2rem;
        animation: scroll 45s linear infinite;
    }

    .client-logo {
        width: 140px;
        height: 100px;
    }

    .testimonials-carousel {
        grid-template-columns: 1fr;
    }

    .maintenance-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .maintenance-logos {
        gap: 1rem;
    }

    .maintenance-logos img {
        height: 60px;
    }

    .maintenance-image {
        height: 300px;
    }

    section {
        padding: 3rem 2rem;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 70vh;
        background-attachment: scroll;
        background-position: center center;
        background-size: auto 120%;
    }

    .hero-logo {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

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

    .section-title::before {
        width: 18px;
        height: 18px;
    }

    .carousel-track {
        gap: 1.5rem;
        padding: 0.75rem 3%;
        animation: scroll 50s linear infinite;
    }

    .client-logo {
        width: 110px;
        height: 80px;
    }

    .logo {
        height: 30px;
    }

    .testimonials-carousel {
        grid-template-columns: 1fr;
    }

    section {
        padding: 3rem 2rem;
    }
}

/* ---------- CONTACTO DESTACADO SOBRE EL PIE ---------- */
.footer-cta { padding-top: clamp(1rem, 2.4vw, 2rem); padding-bottom: clamp(2.2rem, 4vw, 3.2rem); margin-bottom: clamp(2.5rem, 4vw, 3.5rem); border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-mail {
    display: block; width: fit-content; max-width: 100%;
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif; font-style: italic; font-weight: 300;
    font-size: clamp(1.45rem, .8rem + 2.4vw, 2.4rem); line-height: 1.15; letter-spacing: -.01em;
    color: var(--color-light); text-decoration: none; overflow-wrap: anywhere;
    background-image: linear-gradient(var(--color-primary), var(--color-primary)); background-repeat: no-repeat;
    background-size: 100% 2px; background-position: 0 100%; padding-bottom: .15em;
    transition: background-size .7s cubic-bezier(.16, 1, .3, 1), color .5s ease;
}
.footer-mail:hover { background-size: 100% 100%; color: var(--color-dark); }
.footer-phone {
    display: inline-block; margin-top: clamp(.8rem, 1.4vw, 1.1rem);
    font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
    font-size: clamp(1.2rem, .9rem + 1.1vw, 1.7rem); text-decoration: none; color: var(--color-light);
    transition: color .4s ease;
}
.footer-phone:hover { color: var(--color-primary); }
