* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: rgb(29, 29, 29);
}

.logo {
    display: inline-block;
    margin: 16px 0 0 20px;
}

.logo img {
    display: block;
    width: 230px;
    height: auto;
}

main {
    max-width: 980px;
    margin: 70px auto 50px;
    padding: 0 20px;
    color: white;
    font-family: Arial, sans-serif;
}

.galeria-proyecto {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    overflow: hidden;
    max-width: 860px;
    margin: 0 auto 70px;
    border: 1px solid rgb(70, 70, 70);
    border-radius: 14px;
    background: #222;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.galeria-proyecto:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
}

.revelar {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.revelar.visible {
    opacity: 1;
    transform: translateY(0);
}

.galeria-proyecto.revelar.visible:hover {
    transform: translateY(-8px);
}

.carrusel {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    background: #151515;
}

.carrusel img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
}

.carrusel img.cambiar {
    animation: entrada-imagen 0.45s ease both;
}

@keyframes entrada-imagen {
    from { opacity: 0; transform: scale(1.04); }
    to { opacity: 1; transform: scale(1); }
}

.flecha {
    position: absolute;
    top: 50%;
    z-index: 1;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    cursor: pointer;
    font-size: 30px;
    line-height: 32px;
    transform: translateY(-50%);
    transition: background 0.25s ease, transform 0.25s ease;
}

.flecha:hover {
    background: aqua;
    color: #111;
    transform: translateY(-50%) scale(1.08);
}

.flecha-izquierda { left: 14px; }
.flecha-derecha { right: 14px; }

.info-proyecto {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 42px 34px;
}

.info-proyecto span {
    color: aqua;
    font-size: 12px;
    letter-spacing: 1.5px;
}

.info-proyecto h1 {
    margin: 12px 0;
    font-size: 29px;
}

.info-proyecto p {
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.6;
}

.btn-proyecto {
    padding: 13px 18px;
    border: 1px solid white;
    border-radius: 7px;
    color: white;
    font-family: Arial, sans-serif;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.35s ease, color 0.35s ease;
}

.btn-proyecto:hover {
    background: white;
    color: #111;
}

.buscador {
    position: fixed;
    z-index: 20;
    top: 68px;
    right: 20px;
    width: min(340px, calc(100vw - 30px));
    padding: 10px;
    border: 1px solid rgb(70, 70, 70);
    border-radius: 10px;
    background: #222;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.buscador form {
    display: flex;
    gap: 7px;
}

.buscador input {
    min-width: 0;
    flex: 1;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 6px;
    background: transparent;
    color: white;
}

.buscador button {
    border: 0;
    border-radius: 6px;
    background: #3a3a3a;
    color: white;
    cursor: pointer;
    padding: 0 11px;
}

.buscador button:hover {
    background: aqua;
    color: #111;
}

.seccion-testimonios h1 {
    margin: 0 0 28px;
    color: white;
    text-align: center;
    font-size: 28px;
}

.testimonios {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.testimonio {
    padding: 24px;
    border: 1px solid rgb(70, 70, 70);
    border-radius: 12px;
    background: rgb(45, 45, 45);
}

.testimonio i {
    color: aqua;
    font-size: 20px;
}

.testimonio p {
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.85);
}

.testimonio span {
    color: aqua;
    font-size: 13px;
}

.privacidad {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 760px;
    margin: 60px auto 0;
    padding: 18px 20px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(0, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.5;
}

.privacidad i {
    color: aqua;
    margin-top: 3px;
}

.privacidad p {
    margin: 0;
}

@media (max-width: 720px) {
    .galeria-proyecto {
        grid-template-columns: 1fr;
    }

    .carrusel,
    .carrusel img {
        min-height: 360px;
    }

    .info-proyecto {
        padding: 28px 24px 32px;
    }

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

    main {
        margin-top: 55px;
    }
}

.contenedor {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.separador-nav {
    width: 1px;
    height: 17px;
    background: rgba(255, 255, 255, 0.45);
}

.btn {
    position: relative;
    border: none;
    background: none;
    color: white;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 14px;
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    color: aqua;
}

.btn::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: aqua;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.btn:hover::after {
    width: 100%;
}

.btn-menu {
    font-size: 20px;
    padding: 0;
}

.menu-lateral {
    position: fixed;
    z-index: 10;
    top: 0;
    right: -250px;
    width: 250px;
    height: 100%;
    padding: 60px 20px 20px;
    background: #222;
    transition: right 0.3s ease;
}

.menu-lateral.activo {
    right: 0;
}

.menu-lateral a {
    display: block;
    width: max-content;
    margin: 15px 0;
}

.contacto-menu {
    display: block;
    width: max-content;
    margin: 15px 0;
    padding: 0;
    font-size: 14px;
}

.contacto-menu::after {
    bottom: -2px;
}

.contacto-menu:hover::after {
    width: 100%;
}

.numero-contacto {
    display: none !important;
    margin: -5px 0 15px 10px !important;
    color: aqua;
    font-size: 13px;
}

.numero-contacto.activo {
    display: block !important;
}

.menu-lateral hr {
    border: 0;
    border-top: 1px solid #555;
    margin: 25px 0;
}

.btn-cerrar {
    position: absolute;
    top: 20px;
    left: 15px;
    font-size: 20px;
}

footer {
    margin-top: 80px;
    padding: 42px 20px 28px;
    border-top: 1px solid rgb(65, 65, 65);
    background: #222;
    color: rgba(255, 255, 255, 0.65);
    font-family: Arial, sans-serif;
    text-align: center;
    font-size: 13px;
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

footer.visible {
    opacity: 1;
    transform: translateY(0);
}

footer img {
    width: 180px;
    height: auto;
    margin-bottom: 26px;
}

.footer-enlaces,
.footer-redes {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 22px;
}

.footer-enlaces a,
.footer-redes a {
    color: white;
    text-decoration: none;
    transition: color 0.25s ease, transform 0.25s ease;
}

.footer-enlaces a:hover,
.footer-redes a:hover {
    color: aqua;
    transform: translateY(-2px);
}

.footer-redes a {
    font-size: 19px;
}

footer p {
    margin: 8px 0;
}

.footer-privacidad {
    color: rgba(255, 255, 255, 0.38);
    font-size: 12px;
}

@media (max-width: 520px) {
    .logo {
        margin: 14px 0 0 14px;
    }

    .logo img {
        width: 165px;
    }

    .contenedor {
        top: 74px;
        right: 14px;
        gap: 8px;
    }

    .contenedor .btn {
        font-size: 10px;
    }

    .btn-menu {
        font-size: 19px !important;
    }

    .separador-nav {
        height: 14px;
    }

    main {
        margin-top: 78px;
        padding: 0 14px;
    }

    .galeria-proyecto {
        margin-bottom: 48px;
    }

    .carrusel,
    .carrusel img {
        min-height: 340px;
    }

    .seccion-testimonios h1 {
        font-size: 24px;
    }

    .privacidad {
        margin-top: 42px;
        padding: 16px;
        font-size: 13px;
    }

    footer {
        margin-top: 55px;
    }
}

@media (prefers-reduced-motion: reduce) {
    footer,
    .revelar {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
