/* Variables CSS para la paleta de colores */
:root {
    --color-dark: #d4d4d4ff;
    --color-blue: #2D4263;
    --color-red: #C84B31;
    --color-cream: #ECDBBA;
    --color-white: #121212;
    --color-gray-light: #181818ff;
    --color-gray: #6c757d;
    --color-blue-light: #44638bff;
    --color-red-dark: #a63d28;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
    /* Scroll suave */
    scroll-behavior: smooth;
}

/* Efectos de scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-white);
    overflow-x: hidden !important;
}

/* Navegación */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--color-white);
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(25, 25, 25, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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


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

#nav-menu .close-btn {
    display: none;
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    position: relative;
    z-index: 2;
    /* Siempre encima del menú */
}

.nav-link {
    color: var(--color-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--color-red);
}

.cta-button {
    background: var(--color-red);
    color: var(--color-white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cta-button:hover {
    background: var(--color-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200, 75, 49, 0.3);
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--color-white);
    position: relative;
    gap: 120px;
    padding: 8rem 0 4rem;
}

.hero-content {
    max-width: 900px;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
    text-align: start;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-gray-light);
    border: 1px solid var(--color-cream);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    margin-bottom: 2rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-gray);
}

.hero-img {
    position: relative;
    margin-top: -60px;
}

.hero-img img {
    z-index: 100;
    position: relative;
    animation: flotar 4s ease-in-out infinite;
    transform: scaleX(-1)
}

.hero-img svg {
    position: absolute;
    z-index: 90;
    bottom: -50px;
    left: -80px;
    width: 500px;
    animation: mover-fondo 6s ease-in-out infinite;
}

/* Imagen: sube/baja + escala */
@keyframes flotar {
    0% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-30px) translateX(10px) scale(1.03);
    }

    /* crece un poco */
    100% {
        transform: translateY(0) scale(1);
    }
}

/* Fondo SVG: sube/baja + rotación */
@keyframes mover-fondo {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(40px) rotate(5deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 3.4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-dark);
}

.hero .highlight {
    color: var(--color-red);
}

.hero p {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    margin-bottom: 3rem;
    color: var(--color-gray);
    max-width: 600px;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: start;
    flex-wrap: wrap;
    margin-bottom: 5rem;
}

.btn-primary {
    background: var(--color-red);
    color: var(--color-white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--color-red-dark);
    transform: translateY(-2px);

}

.btn-secondary {
    background: transparent;
    color: var(--color-dark);
    padding: 1rem 2rem;
    border: 2px solid var(--color-blue-light);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--color-blue-light);

    border-color: var(--color-blue);
    transform: translateY(-2px);
}

.hero-illustration {
    max-width: 500px;
    margin: 0 auto 3rem;
    opacity: 0.9;
}

.hero-illustration img {
    width: 100%;
    height: auto;
}

/* Secciones */
.section {
    padding: 6rem 0;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-badge {
    display: inline-block;
    background: var(--color-gray-light);
    color: var(--color-gray);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid;

    transition: all 0.3s ease;

    &:hover {
        color: var(--color-blue-light);
        border-color: var(--color-blue-light);
    }
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--color-dark);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-secondary-tex);
    font-weight: 400;
    line-height: 1.6;
}

/* Introducción */
.intro {
    background: var(--color-gray-light);
    position: relative;
}

.intro>svg {
    position: absolute;
    width: 120%;
    left: -130px;
    top: -70px;
}

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

.intro-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-gray);
    margin-bottom: 2rem;
}

.intro-illustration {
    text-align: center;
    display: inline-block;
    /* necesario para que rote */

    transition: transform 0.2s ease-in-out;
}

.intro-illustration:hover {
    animation: shake 0.5s ease-in-out 1;
    /* 2 -> veces */
}

@keyframes shake {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-3deg);
    }

    50% {
        transform: rotate(3deg);
    }

    75% {
        transform: rotate(-3deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.intro-illustration img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.slogan {
    font-size: 1.8rem;
    color: var(--color-red);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

/* Características */
.features {
    background: var(--color-white);
    position: relative;
    padding-top: 2em;
}

.features>svg {
    position: absolute;
    width: 180%;
    left: -120px;
    transform: scaleX(1);
    top: 0;
}

.features-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    transition: 0.1s ease;
}

.features-grid:hover .feature-card {
    opacity: 0.7;
}


.feature-card {
    padding: 2.5rem 2rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--color-dark);
    transition: all 0.3s ease;
    max-width: 350px;
    background: var(--color-light);
}


.features-grid .feature-card:hover {
    transform: scale(1.03);
    border-color: var(--color-blue-light);
    background: var(--color-white);
    opacity: 1;
}

.feature-icon {
    width: 140px;
    height: 140px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-dark);
}

.feature-description {
    color: var(--color-gray);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Servicios */
.services {
    background: var(--color-gray-light);
}

.services>svg {
    position: absolute;
    width: 180%;
    margin-top: -90px;
    left: -320px;
    top: 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    padding: 10px;
}


.service-card {
    background: var(--color-gray-light);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--color-cream);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease-out;
}

/* Línea de fondo animada */
.service-card::before {
    content: "";
    position: absolute;
    top: 0;
    /* empieza arriba */
    right: 0;
    /* empieza a la derecha */
    width: 0;
    /* ancho extendido para cubrir diagonal */
    height: 100%;
    /* alto extendido para cubrir diagonal */
    background: linear-gradient(135deg, var(--color-blue), var(--color-blue-light));
    /* diagonal */
    opacity: 0.05;
    transform: scale(0);
    /* empieza colapsado */
    transform-origin: top right;


    transition: all 0.35s ease-out;
}

/* Al hacer hover se extiende */
.service-card:hover::before {
    width: 100%;
    /* se extiende al ancho completo */
    transform: scale(1);
}

/* Efectos de la carta al hover */
.service-card:hover {
    border-color: var(--color-blue);
}

.service-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.service-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    padding: 3px;


}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;

    transition: all 0.2s linear;
}

.service-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.5rem;

    transition: all 0.2s linear;
}

.service-description {
    color: var(--color-gray);
    line-height: 1.6;

    transition: all 0.2s linear;
}

.service-card:hover .service-description {
    color: var(--color-cream);
    transform: scale(1.01) translateY(3px) translateX(-3px);
}

.service-card:hover .service-title {
    color: var(--color-red);
    transform: scale(1.02) translateY(-3px) translateX(3px);
}

.service-card:hover .service-icon img {
    transform: scale(1.2)
}

/*-------------------- PORTFOLIO ----------------*/
.portfolio-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1100px;
    width: 100%;
    margin: auto;
    padding: 10px;
}
.portfolio-card {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #2c2c2c;
    transition: .3s border-color;
}
.portfolio-card:hover {
    border-color: #2D4263;
}
.portfolio-card-image {
    width: 100%;
    height: 250px;
    margin-bottom: 10px;
    position: relative;

    & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 8px 8px 0 0;
    }
}
.portfolio-card-image a {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--color-gray);
    margin: 0;
    line-height: 100%;
    padding: 8px;
    border-radius: 5px;
    opacity: 1;
    transition: .2s opacity;
}
.portfolio-card-image a:hover {
    opacity: .8;
}

.portfolio-card-content {
    padding: 12px;
}
.portfolio-card-date {
    font-size: .9em;
    opacity: .9;

    & svg { vertical-align: text-bottom }
}
.portfolio-card-content > h3 {
    font-size: 1.4em;
}
.portfolio-card-content > p {
    opacity: .7;
    font-size: .95em;
    margin-bottom: 8px;
}

@media screen and (max-width: 900px) {
    .portfolio-list {
        grid-template-columns: 1fr;
    }
}


/* Historia */

.history-container {
    width: 100%;
    margin: 0 auto;
}

.history {
    background: var(--color-white);
    background-image: url("/img/Olá - History.svg");
    background-size: cover;
    /* La imagen cubre todo el área */
    background-position: center;
    /* Centra la imagen */
    background-repeat: no-repeat;
    /* Evita que se repita */
}


.history-content {
    display: grid;
    grid-template-columns: 80% 20%;
    /* Primera columna 70%, segunda 30% */
    gap: 4rem;
    width: 100vw;
    padding-left: 80px;
    align-items: stretch;
    /* 🔑 hace que todos los ítems se estiren a la misma altura */
}

.history-text-container {
    width: 85%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.history-text-card-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.history-container .section-subtitle {
    color: var(--color-cream);
}

.history-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-gray);
    margin-bottom: .5rem;

}

.history-text {
    color: var(--color-dark);
}

.history-illustration img {
    max-width: 100%;
    height: auto;
}


.scroll-arrow-container {
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: end;
    padding-right: 15px;
}

.scroll-arrow {
    position: absolute;
    top: -10px;
    transition: transform 0.1s ease-out;

}

.scroll-arrow img {
    width: 300px;
    height: 190px;
    transform: scaleY(-1);
    rotate: -30deg;
}

@media screen and (min-width: 1366px) {
    .scroll-arrow-container {
        transform: scale(1.3);
        padding-right: 35px;
    }

    .history-content {
        gap: 3rem;
        padding-left: 120px;

    }

}


.timeline-simple {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
    width: 100%;
}

.timeline-item-simple {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--color-gray-light);
    border-radius: 12px;
    border: 1px solid var(--color-gray-light);
    border-left: 4px solid var(--color-red);
    gap: 10px;
    transition: all 0.3s ease;
}

.timeline-year-simple {
    font-weight: 700;
    color: var(--color-red);
    font-size: 1.1rem;
    min-width: 60px;

    transition: all 0.3s ease;
}

.timeline-text-simple {
    color: var(--color-gray);
    font-size: 0.95rem;

    transition: all 0.2s ease;
}


.timeline-item-simple:hover {
    border-color: var(--color-blue-light);
}

.timeline-item-simple:hover .timeline-year-simple {
    color: var(--color-blue-light);
    transform: scale(1.1);
}

.timeline-item-simple:hover .timeline-text-simple {
    color: var(--color-cream);
    font-weight: 700;
}


/* Contacto */
.contact {
    background: var(--color-gray-light);
}

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

.contact-info {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-info h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--color-dark);
    font-weight: 700;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--color-gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-details {
    display: flex;
    flex-direction: column;
    flex: 1 auto;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-white);
    border-radius: 12px;
    border: 1px solid var(--color-cream);

    transition: all 0.3s ease;
}

.contact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50px;
    width: 100%;
    height: 100%;
    background: var(--color-blue);
    opacity: 00;
    z-index: -1;
    border-radius: 12px;
    transition: all 0.4s ease;
}

.contact-item:hover {
    transform: translateY(-2px);
    border-color: var(--color-blue-light);
}

.contact-item:hover.contact-item::before {
    opacity: .5;
    left: 0;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 1.2rem;

    transition: all 0.3s ease;
}

.contact-item span {
    color: var(--color-gray);
}

.contact-item:hover .contact-icon {
    transform: scale(1.3);
}

.contact-item:hover.contact-item span {
    color: var(--color-cream);
}

.contact-form {
    padding: 5px 1.5rem 0;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    margin-left: 5px;
    font-weight: 600;
    color: var(--color-dark);
    font-size: 0.85rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--color-gray);
    border-radius: 8px;
    background: var(--color-white);
    color: var(--color-dark);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-red);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    width: 100%;
    background: var(--color-red);
    color: var(--color-white);
    border: 2px solid var(--color-red);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit:hover {
    background: var(--color-white);
    border-color: var(--color-red);
    color: var(--color-red);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: var(--color-blue);
    color: var(--color-cream);
    text-align: center;
    padding: 2rem 0;
}

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

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


/* responsive */
@media screen and (max-width: 1200px) {

    /* Histoia section */
    .history-content {
        padding: 0 10px;
        gap: 0;
        grid-template-columns: 1fr;
    }

    .history-container .section-header {
        margin-bottom: 2rem;
    }

    .history-text-container {
        display: none;
    }

    .timeline-item-simple {
        flex-direction: column;
        justify-content: center;
        box-sizing: border-box;
        padding: .5rem;
        width: 95%;
        margin: 0 auto;
        height: 120px;
    }

    .timeline-text-simple {
        text-align: center;
    }

    .scroll-arrow-container {
        display: none;
    }
}


@media (max-width: 768px) {
    body {
        font-size: 14px;
        width: 100%;
    }

    .cta-button {
        display: none;
    }

    /* Botón hamburguesa */
    #menu-toggle {
        display: block;
        position: relative;
        z-index: 2;
        font-size: 2rem;
        cursor: pointer;
    }

    /* Menú deslizable */
    #nav-menu {
        position: fixed;
        display: flex;
        flex-direction: column;
        background-color: var(--color-white);
        top: 0;
        right: -250px;
        /* fuera de pantalla */
        width: 250px;
        height: 100vh;
        z-index: 1;
        gap: 1rem;
        box-sizing: border-box;
        padding: 0 10px;
        text-transform: uppercase;
        border-left: 1px solid var(--color-blue);
        transition: right 0.5s ease;
    }

    /* Menú abierto */
    #nav-menu.active {
        right: 0;
    }

    /* Botón cerrar agregado dinámicamente */
    #nav-menu .close-btn-container {
        display: block;
        width: 100%;
        text-align: right;
        padding: 10px;
    }

    .close-btn {
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--color-blue-light);
        width: fit-content;
        transition: all 0.3s ease;
    }

    #nav-menu li a {
        color: var(--color-cream);
    }

    #nav-menu li a:hover {
        color: var(--color-red);
    }

    #nav-menu li a::after {
        content: '';
        display: block;
        width: 0px;
        height: 2px;
        background-color: var(--color-blue);

        transition: width 0.3s ease;
    }

    #nav-menu li a:hover::after {
        width: 100px;
    }


    .hero {
        flex-direction: column-reverse;
        gap: 30px;
        align-items: center;
    }

    .hero-img {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 75vh;
        margin-bottom: 50px;
    }

    .hero-img img {
        width: 80%;
    }

    .hero-img svg {
        bottom: 90px;
    }

    .hero-content {
        max-width: 900px;
        box-sizing: border-box;
        padding: 0 50px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-content h1,
    .hero-content p {
        text-align: center;
    }

    .hero-content .hero-buttons {
        flex-direction: column;
        align-items: center;
        margin: 0;
        gap: .5rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-content .btn-primary,
    .hero-content .btn-secondary {
        margin: 0;
        width: 100%;
        height: 60px;
    }

    .intro-content,
    .history-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

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

    .section {
        padding: 4rem 0;
    }

    .intro-content div {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .service-card {
        padding: 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 300px;
    }

    .service-header {
        flex-direction: column;
        align-items: space-between;
        gap: 0;
        margin: 0;
    }

    .service-title {
        text-align: center;
        margin-bottom: 0;
    }

    .service-description {
        text-align: center;
    }

    .services svg {
        display: none;
    }


    .contact-form {
        display: none;
    }
}