/* RESET */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* DESING SYSTEM */
:root {
    /* colores */
    --blanco: #f2f4f6;
    --suave: #f4f7f6;
    --blanco-suave: #F8F4FB;
    --gris-claro-neutro: #E5E7EB;
    --gris-carbon: #121A1F;
    --azul-petroleo: #0B3C49;
    --azul-petroleo-oscuro: #072E37;
    --cian-oscuro-tech: #1F7A8C;
    --verde-profundo-apagado: #14532D;

    --texto-principal: #0F172A;
    --texto-secundario: #334155;

    /* tipografía */
    --font-main: "Inter", sans-serif;

    --fs-h1: clamp(2.5rem, 5vw, 3.5rem);
    --fs-h2: clamp(2rem. 4vw, 2.8rem);
    --fs-h3: 1.8rem;
    --fs-body: 1rem;
    --fs-small: 0.9rem;

    /* transiciones */
    --transition-speed: 0.7s;
    --transition-premium: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    }

/* BASE */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--blanco);
    color: var(--gris-carbon);
    line-height: 1.6;
    overflow-x: hidden;
}

section {
    padding: 100px 5%;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p {
    font-size: var(--fs-body);
    color: var(--texto-secundario);
}

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #f2f4f6;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out, visibility 0.8s;
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

.logo-fade {
    width: 40%;
    max-width: 120px;
    height: auto;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

@media (min-width: 768px) {
    .logo-fade {
        width: 200px;
    }
}

body.loading {
    overflow: hidden;
}

/* HEADER & NAV */
header {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.shrink {
    padding: 5px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--azul-petroleo);
    text-decoration: none;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav ul li a {
    font-weight: 500;
    text-decoration: none;
    color: var(--gris-carbon);
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--cian-oscuro-tech);
}

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

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--azul-petroleo);
    border-radius: 2px;
}

/* HERO SECTION */
#hero {
    scroll-margin-top: 80px;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90vh;
    text-align: center;
    padding: 80px 10%;
    background: 
        linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0.9)), 
        url('img/Found-1.jpg') center/cover no-repeat;
}

.hero-text {
    max-width: 600px;
}

.subtitle-1 {
    display: block;
    text-decoration: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.hero h1 {
    color: var(--azul-petroleo)
}

.hero p {
    max-width: 650px;
    margin: 1.5rem auto 2rem;
}

.btn-primary, .btn-outline {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-primary {
    background: var(--azul-petroleo);
    color: #fff;
}

.btn-outline {
    border: 2px solid var(--azul-petroleo);
    color: var(--azul-petroleo);
    background-color: transparent;
}

.btn-primary:hover, .btn-outline:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(11, 60, 93, 0.2);
    background: var(--azul-petroleo);
    color: #fff;
}

/* SERVICIOS */
#servicios {
    background-color: var(--suave, #F9F9F9);
    padding: 140px 5%;
    position: relative;
    overflow: hidden;
}

.services-container {
    max-width: 1400px;
    margin: 0 auto;
}

.services-header {
    margin-bottom: 80px;
    text-align: center;
    position: relative;
    background: transparent;
}

.tagline {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--cian-oscuro-tech);
    font-weight: 700;
    margin-bottom: 20px;
    display: block;
}

.main-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;     
    letter-spacing: -0.02em; 
    color: var(--negro-carbon);
    text-align: center;
    margin-bottom: 1.5rem;
    text-wrap: balance;
}

.outline {
    -webkit-text-stroke: 1px var(--gris-carbon);
    color: transparent;
}

.header-line {
    width: 100px;
    height: 4px;
    background: var(--cian-oscuro-tech);
    margin: 30px auto 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
}

.service-card {
    grid-column: span 2;
    background: #fff;
    min-height: 400px;
    border: 1px solid rgba(0,0,0,0.05);
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-premium);
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    z-index: 1;
}

.service-card.featured {
    grid-column: span 4;
}
.service-card.dark {
    background: var(--gris-carbon);
    color: white;
}
.service-card.dark h3, .service-card.dark p {
    color: white;
}

.card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2;
    position: relative;
}

.card-num {
    font-size: 1rem;
    font-weight: 700;
    opacity: 0.4;
}

.service-card h3 {
    font-size: 1.8rem;
    line-height: 1.2;
    margin: 20px 0;
    font-weight: 700;
    text-align: left;
}

.service-card h3 span {
    display: block;
    font-weight: 300;
    font-style: italic;
    color: var(--cian-oscuro-tech);
}

.service-card.dark h3 span {
    color: var(--gris-claro-neutro);
}

.service-card p {
    font-size: 1rem;
    color: var(--texto-secundario);
    max-width: 90%;
    text-align: left;
}

.service-btn {
    text-decoration: none;
    color: var(--cian-oscuro-tech);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    display: inline-block;
    margin-top: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-premium);
}

.service-btn span {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.service-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--cian-oscuro-tech);
    transform: translateY(100%);
    transition: var(--transition-premium);
    z-index: 1;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1); 
}

.service-card:hover::after {
    transform: translateY(0);
}

.service-card:hover .card-inner {
    color: white;
}

.service-card:hover h3, 
.service-card:hover p, 
.service-card:hover .card-num,
.service-card:hover .service-btn,
.service-card:hover h3 span {
    color: white;
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover .service-btn span {
    transform: translateX(5px);
}

@media (max-width: 1100px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .service-card {
        grid-column: span 2;
    }
    .service-card.featured {
        grid-column: span 4;
    }
}

@media (max-width: 768px) {
    .services-grid {
        display: flex;
        flex-direction: column;
    }
    .main-title {
        font-size: 2.5rem;
    }
    .service-card {
        width: 100%;
    }
}

/* PROYECTOS */
.proyectos-section {
    padding: 100px 10%;
    background-color: var(--suave);
    max-width: 100%;
    margin: 0 auto;
    scroll-margin-top: 50px;
}

.project-subtitle {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--texto-secundario);
    letter-spacing: 0.2px;
}

.projects-subtitle::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background-color: var(--cian-oscuro-tech);
    margin: 1.5rem auto 0;
    border-radius: 2px;
}

.section-header {
    text-align: center;
    width: 100%;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;     
    letter-spacing: -0.02em; 
    color: var(--negro-carbon);
    text-align: center;
    margin-bottom: 1.5rem;
    text-wrap: balance;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.project-card {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    aspect-ratio: 7/5;
    cursor: pointer;
    background-color: #000;
    box-shadow:
        0 10px 40px rgba(0,0,0,0.03),
        inset 0 0 0 1px rgba(255,255,255, 0);
    transition:
        transform 1.4s cubic-bezier(0.19, 1, 0.22, 1),
        border-radius 1.4s cubic-bezier(0.19, 1, 0.22, 1),
        box-shadow 1.4s cubic-bezier(0.19, 1, 0.22, 1);
    will-change: transform, border-radius;
}

.project-card img {
    display: block;
}

.project-card:hover {
    transform: translateY(-10px);
    border-radius: 0px;
    box-shadow:
        0 40px 80px rgba(0,0,0,0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.card-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.project-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
    transition:
        transform 1.6s cubic-bezier(0.19, 1, 0.22, 1),
        filter 1.4s ease;
}

.project-card:hover .project-bg {
    transform: scale(1.06);
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0) 0%,
        rgba(0, 0, 0, 0.05) 40%,
        rgba(0, 0, 0, 0.4) 70%,
        rgba(0, 0, 0, 0.8) 100%
    );
    opacity: 0;
    z-index: 1;
    transition: opacity 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.project-card:hover .overlay {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category-tag {
    align-self: flex-start;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: border-radius 1.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.project-card:hover .category-tag {
    border-radius: 0px;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}

 .project-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.project-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 8px;
    font-weight: 300;
}

.visit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #fff;
    color: var(--negro-carbon);
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, background-color 0.3s;
}

.visit-btn .btn-text {
    display: none;
}

.visit-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
    transition: transform 0.3s ease;
}

.visit-btn:hover {
    background-color: var(--cian-oscuro-tech);
    color: #fff;
    transform: scale(1.1) rotate(-45deg);
}

.visit-btn:hover svg {
    transform: translateX(2px) translateY(-2px);
}

.card-top,
.project-info,
.visit-btn {
    opacity: 0;
    backface-visibility: hidden;
    transition:
        opacity 0.8s ease-out,
        transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.card-top {
    transform: translateY(-15px);
    transition-delay: 0.02s;
}

.project-info {
    transform: translateY(15px);
    transition-delay: 0.05s;
}

.visit-btn {
    transform: translateY(15px);
    transition-delay: 0.1s;
}

.project-card:hover .card-top,
.project-card:hover .project-info,
.project-card:hover .visit-btn {
    opacity: 1;
    transform: translateY(0);
}

/* CONTACTO */
#contacto {
    background: linear-gradient(135deg, var(--azul-petroleo-oscuro) 0%, var(--azul-petroleo) 100%);
    padding: 80px 0;
    position: relative;
}
/* Preg Frecuentes */
.contacto-wrapper {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px;
    gap: 80px;
    align-items: flex-start;
}

.faq-column {
    flex: 1.2;
}

.faq-column h3 {
    color: var(--blanco-suave);
    font-size: 28px;
    margin-bottom: 25px;
    border-left: 4px solid var(--cian-oscuro-tech);
    padding-left: 15px;
}

.faq-item {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-pregunta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    color: var(--blanco-suave);
    letter-spacing: 0.5px;
    font-weight: bold;
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--cian-oscuro-tech);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    pointer-events: none;
}

.faq-respuesta {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.6s ease,
        margin 0.4s ease;
}

.faq-respuesta p {
    color: var(--gris-claro-neutro) !important;
    margin: 0;
    padding-top: 10px;
    line-height: 1.6;
    font-weight: 300;
}

body .faq-item.active {
    border-bottom: 1px solid var(--cian-oscuro-tech) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}

body .faq-item.active .faq-respuesta {
    display: block !important;
    max-height: 1000px !important;
    opacity: 1 !important;
    margin-top: 15px !important;
    padding-bottom: 15px !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

body .faq-item.active .faq-icon {
    transform: rotate(45deg) !important;
    color: var(--cian-oscuro-tech) !important;
}

/* Formulario de Contacto */
.form-column {
    flex: 1;
    min-width: 300px;
    position: -webkit-sticky;
    position: sticky;
    top: 140px;
    align-self: flex-start;
    z-index: 10;
}

.form-container {
    width: 100%;
    background: var(--blanco-suave);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(7, 46, 55, 0.3);
}

.form-header {
    text-align: center;
}

.form-header h2 {
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    color: var(--azul-petroleo);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

input, textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--gris-claro-neutro);
    background-color: #FFFFFF;
    color: var(--texto-principal);
    border-radius: 10px;
    outline: none;
    transition: 0.3s;
}

input:focus, textarea:focus {
    border-color: var(--azul-petroleo);
    box-shadow: 0 0 0 4px rgba(11, 60, 73, 0.1);
}

button#submit-btn {
    width: 100%;
    background: var(--azul-petroleo);
    color: #fff;
    padding: 16px;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button#submit-btn:hover {
    background: var(--azul-petroleo-oscuro);
    transform: translateY(-2px);
}

/* SPINNER */
.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin { to { transform: rotate(360deg); } }
.loading .spinner { display: block; }
.loading .btn-text { display: none; }

/* ANIMACIONES DE SCROLL */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

/* FOOTER */
.footer-container {
    background: var(--gris-carbon);
    color: var(--gris-claro-neutro);
    font-family: var(--font-main);
    padding: 60px 5% 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
}

/* --- SECCIÓN DE MARCA --- */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 350px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--blanco);
    margin: 0;
    letter-spacing: -0.5px;
}

.footer-tagline {
    font-size: 0.95rem;
    color: #9CA3AF;
    line-height: 1.5;
    margin: 0;
}

/* --- SECCIÓN DE REDES Y ENLACES --- */
.footer-socials {
    display: flex;
    flex-direction: column;
}

.footer-heading {
    font-size: 0.85rem;
    color: var(--blanco);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    margin-top: 0;
}

.social-links-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-link, .email-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #9CA3AF;
    font-size: 0.95rem;
    width: fit-content;
    transition: var(--transition-premium);
}

.social-link i, .email-link i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.social-link:hover, .email-link:hover {
    color: var(--blanco);
}

/* --- SECCIÓN INFERIOR (COPYRIGHT) --- */
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-p {
    color: #9CA3AF;
    font-size: 0.85rem;
    margin: 0;
}

/* --- RESPONSIVE DESIGN (MÓVILES) --- */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}


/* RESPONSIVE */
@media (min-width: 1025px) {
    .faq-item:hover .faq-respuesta {
        max-height: 500px;
        opacity: 1;
        margin-top: 15px;
    }

    .faq-item:hover .faq-icon {
        transform: rotate(45deg);
        color: var(--cian-oscuro-tech);
    }

    .faq-item:hover {
        padding-left: 10px;
        border-bottom: 1px solid var(--cian-oscuro-tech);
        background: rgba(255, 255, 255, 0.02);
    }
}

@media (max-width: 1024px) {

    .contacto-wrapper {
        flex-direction: column-reverse;
        align-items: center;
        gap: 40px;
    }

    .form-column {
        position: relative;
        top: 0;
        width: 100%;
        margin-bottom: 20px;
    }

    .faq-column {
        width: 100%;
    }

    .form-container {
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    /* Seccion Proyectos responsive */
    .proyectos-section {
        padding: 80px 5%;
    }
    .card-content {
        padding: 30px;
    }
}

@media (max-width: 768px) {

    .portafolio-slider-wrapper {
        grid-template-columns: 1fr;
        position: relative;
        padding: 0;
    }

    .nav-arrow {
        display: none;
    }

    .slider-viewport {
        grid-column: 1;
    }

    .slider-container {
        padding: 40px 10%;
        gap: 20px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .draft-card {
        flex: 0 0 100%;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        scroll-snap-align: center;
        height: 400px;
    }

    .info-panel {
        transform: translateY(0);
        background: linear-gradient(transparent, var(--gris-carbon));
        padding: 20px 15px;
    }

    .projects-subtitle {
        padding: 0 20px;
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    section h2 {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    nav ul {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--blanco-suave);
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: 0.4s;
    }
    nav ul.active { right: 0; }
    .menu-toggle { display: flex; }
    section { padding: 60px 5%; }

    /* Seccion Proyectos responsive */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .card-top, .project-info, .visit-btn, .overlay {
        opacity: 1;
        transform: translateY(0);
    }

    .visit-btn {
        width: 45px;
        height: 45px;
        background: var(--cian-oscuro-tech);
        color: white;
    }
}