/* ========================================
   QHATAI PROYECTOS - CSS Premium
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #eef3f6;
    color: #fff;
    overflow-x: hidden;
}

.p-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== HERO ========== */
.p-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.p-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #033c6c 0%, #022a54 40%, #0a1628 100%);
}

.p-hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(45, 168, 216, 0.15) 0%, transparent 70%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

.p-hero-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(224, 159, 62, 0.1) 0%, transparent 70%);
    animation: heroGlow 10s ease-in-out infinite alternate-reverse;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, -30px) scale(1.1); }
}

.p-hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.p-hero-particles .particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

.p-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(10, 22, 40, 0.8) 100%);
}

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

.p-hero-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #e09f3e;
    margin-bottom: 24px;
    padding: 8px 20px;
    border: 1px solid rgba(224, 159, 62, 0.3);
    border-radius: 100px;
    background: rgba(224, 159, 62, 0.08);
}

.p-hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.p-hero-highlight {
    background: linear-gradient(135deg, #e09f3e 0%, #f0c060 50%, #e09f3e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
    background-size: 200% 100%;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.p-hero-desc {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.p-hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
}

.p-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.p-btn-primary {
    background: linear-gradient(135deg, #e09f3e 0%, #d4922e 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(224, 159, 62, 0.3);
}

.p-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(224, 159, 62, 0.4);
}

.p-btn-outline {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.p-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.p-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 24px 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.p-stat {
    text-align: center;
}

.p-stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #e09f3e;
    line-height: 1;
}

.p-stat-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.p-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
}

.p-hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.p-scroll-mouse {
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 13px;
    position: relative;
}

.p-scroll-wheel {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 10px;
    background: #e09f3e;
    border-radius: 2px;
    animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(12px); opacity: 0.2; }
}

/* ========== SECTION HEADER ========== */
.p-section {
    padding: 100px 0 80px;
    background: #0a1628;
}

.p-section-header {
    text-align: center;
    margin-bottom: 60px;
}

.p-section-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #2da8d8;
    margin-bottom: 16px;
}

.p-section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

/* ========== FILTROS ========== */
.p-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 48px;
}

.p-filter {
    padding: 10px 24px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.p-filter:hover {
    border-color: rgba(224, 159, 62, 0.4);
    color: #e09f3e;
}

.p-filter.active {
    background: linear-gradient(135deg, #e09f3e 0%, #d4922e 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(224, 159, 62, 0.3);
}

/* ========== GRID ========== */
.p-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ========== CARDS ========== */
.p-card {
    perspective: 1000px;
    height: 320px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.p-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.p-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

.p-card:hover .p-card-inner {
    transform: rotateY(180deg);
}

.p-card-front,
.p-card-back {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
}

.p-card-front {
    background: linear-gradient(135deg, rgba(3, 60, 108, 0.6) 0%, rgba(2, 42, 84, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.p-card-front::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(224, 159, 62, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.p-card-number {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 3rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.04);
    line-height: 1;
}

.p-card-tag {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #2da8d8;
    background: rgba(45, 168, 216, 0.1);
    padding: 4px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    width: fit-content;
}

.p-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.2;
}

.p-card-location {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.p-card-badge-star {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #e09f3e;
    background: rgba(224, 159, 62, 0.15);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(224, 159, 62, 0.3);
}

.p-card-back {
    background: linear-gradient(135deg, #033c6c 0%, #022a54 100%);
    border: 1px solid rgba(224, 159, 62, 0.2);
    transform: rotateY(180deg);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.p-card-back h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e09f3e;
    margin-bottom: 24px;
}

.p-card-specs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.p-spec {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.p-spec:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.p-spec span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.p-spec strong {
    font-size: 0.9rem;
    color: #fff;
    font-weight: 600;
}

/* Card Featured */
.p-card-featured .p-card-front {
    border-color: rgba(224, 159, 62, 0.15);
}

.p-card-featured .p-card-front::before {
    background: radial-gradient(circle, rgba(224, 159, 62, 0.12) 0%, transparent 70%);
    width: 200px;
    height: 200px;
}

/* Card Hero */
.p-card-hero .p-card-front {
    background: linear-gradient(135deg, rgba(224, 159, 62, 0.15) 0%, rgba(3, 60, 108, 0.8) 100%);
    border-color: rgba(224, 159, 62, 0.2);
}

/* ========== CTA ========== */
.p-cta {
    padding: 80px 0 120px;
    background: #0a1628;
}

.p-cta-box {
    text-align: center;
    padding: 64px 40px;
    background: linear-gradient(135deg, rgba(3, 60, 108, 0.4) 0%, rgba(2, 42, 84, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.p-cta-box::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(224, 159, 62, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.p-cta-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.p-cta-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 500px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.p-cta-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* ========== PROYECTOS PAGE OVERRIDES ========== */
.hero {
    min-height: 78vh;
}

.hero-content {
    min-height: 78vh;
    padding: 150px 10vw 90px;
    justify-content: center;
}

.hero-content h1 {
    max-width: 760px;
    white-space: normal;
    text-wrap: balance;
}

.hero-content h2 {
    max-width: 720px;
}

.hero-content p {
    margin-bottom: 0;
    max-width: 620px;
}

.p-card-front {
    background: #123b58;
    isolation: isolate;
}

.p-card-front::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(3, 32, 55, 0.05) 15%, rgba(3, 25, 43, 0.9) 100%);
}

.p-card-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.88;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.p-card:hover .p-card-image {
    transform: scale(1.05);
    opacity: 1;
}

.p-card-front > :not(.p-card-image),
.p-card-back > * {
    position: relative;
    z-index: 2;
}

.p-card-number,
.p-card-badge-star {
    position: absolute;
}

/* ========== VISUAL REFRESH FOR THE PROJECT CATALOG ========== */
.hero {
    min-height: min(760px, 88vh);
    background: #033c6c;
}

.hero-image {
    filter: saturate(0.9) contrast(1.05);
}

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(3, 42, 77, 0.82) 0%, rgba(3, 60, 108, 0.42) 48%, rgba(3, 60, 108, 0.06) 100%),
        linear-gradient(0deg, rgba(2, 42, 84, 0.62) 0%, transparent 48%);
}

.hero-content {
    min-height: min(760px, 88vh);
    max-width: 1180px;
    margin: 0 auto;
    padding: 170px 48px 96px;
    justify-content: flex-end;
}

.hero-content h1 {
    max-width: 760px;
    font-size: clamp(2.8rem, 6vw, 6rem);
    letter-spacing: 0;
    line-height: 0.95;
    margin-bottom: 18px;
}

.hero-content h2 {
    max-width: 620px;
    color: #e09f3e;
    font-size: clamp(1rem, 1.8vw, 1.5rem);
    letter-spacing: 0.18em;
    margin-bottom: 20px;
}

.hero-content p {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(0.95rem, 1.3vw, 1.15rem);
    line-height: 1.6;
}

.section-proceso {
    padding: 88px 0 112px;
    margin-top: 0;
    background: #eef3f6;
}

.proceso-header {
    max-width: 780px;
    margin: 0 auto 42px;
}

.proceso-badge {
    padding: 7px 14px;
    border-radius: 3px;
    background: #1d3a3b;
    color: #f0b25c;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
}

.proceso-title {
    color: #02457a;
    font-size: clamp(2rem, 4vw, 3.6rem) !important;
    letter-spacing: -0.02em;
}

.proceso-desc {
    color: #5e6870;
    font-size: 1rem;
}

.trabajo-cards {
    max-width: 900px;
    margin: 0 auto 42px !important;
    display: flex !important;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px !important;
}

.trabajo-card-item {
    min-width: 0 !important;
    padding: 11px 18px !important;
    border: 1px solid #b8d0df !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.58) !important;
    color: #245879 !important;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.trabajo-card-item:hover,
.trabajo-card-item.active,
.trabajo-card-item[data-filter="all"] {
    border-color: #033c6c !important;
    background: #033c6c !important;
    color: #fff !important;
    transform: translateY(-2px);
}

.proyecto-cards {
    max-width: 1120px;
    grid-template-columns: 1fr;
    gap: 28px;
}

.p-card {
    height: auto;
    min-height: 310px;
    border-radius: 8px;
    filter: drop-shadow(0 12px 18px rgba(2, 42, 84, 0.14));
}

.p-card:hover {
    filter: drop-shadow(0 18px 24px rgba(2, 42, 84, 0.24));
}

.p-card-front,
.p-card-back {
    position: relative;
    inset: auto;
    border-radius: 8px;
}

.p-card-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    min-height: 310px;
    transform: none !important;
}

.p-card-front {
    padding: 30px 28px;
    border: 0;
    background: #033c6c;
    min-height: 310px;
}

.p-card-front::after {
    background: linear-gradient(180deg, rgba(14, 19, 18, 0.04) 20%, rgba(14, 19, 18, 0.92) 100%);
}

.p-card-image {
    opacity: 0.94;
    filter: saturate(0.92);
}

.p-card-number {
    top: 22px;
    right: 24px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
}

.p-card-tag {
    margin-bottom: 13px;
    padding: 6px 9px;
    border: 1px solid rgba(224, 159, 62, 0.7);
    border-radius: 2px;
    background: rgba(3, 42, 84, 0.78);
    color: #f0c060;
    font-size: 0.58rem;
}

.p-card-title {
    max-width: 260px;
    font-size: 1.45rem;
    line-height: 1.08;
    letter-spacing: -0.01em;
}

.p-card-location {
    margin-top: 7px;
    color: rgba(255, 255, 255, 0.72);
}

.p-card-badge-star {
    top: 20px;
    left: 20px;
    border-radius: 2px;
    background: #e09f3e;
    border: 0;
    color: #033c6c;
    font-size: 0.52rem;
}

.p-card-back {
    padding: 32px 28px;
    border: 1px solid rgba(224, 159, 62, 0.7);
    background: linear-gradient(135deg, #033c6c 0%, #022a54 100%);
    transform: none;
}

.p-card-back h4 {
    color: #f0c060;
    font-size: 1.2rem;
}

.p-spec {
    border-color: rgba(255, 255, 255, 0.15);
}

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

@media (max-width: 600px) {
    .hero,
    .hero-content {
        min-height: 76dvh;
    }

    .hero-content {
        padding: 130px 24px 62px;
    }

    .hero-content h1 {
        font-size: clamp(2.35rem, 12vw, 4rem);
    }

    .hero-content h2 {
        font-size: 0.82rem;
        letter-spacing: 0.12em;
    }

    .hero-content p {
        font-size: 0.92rem;
    }

    .section-proceso {
        padding: 62px 0 76px;
    }

    .proceso-title {
        font-size: 2rem !important;
    }

    .proyecto-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .p-card {
        min-height: 0;
    }

    .p-card-inner {
        grid-template-columns: 1fr;
    }

    .p-card-front {
        min-height: 300px;
    }
}

.p-card[data-animate] {
    opacity: 1;
    transform: none;
}

/* ========== CLEAN PROJECTS LAYOUT ========== */
body:has(.projects-hero) {
    background: #eef3f6;
    color: #333;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.projects-hero {
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #03162b;
    box-sizing: border-box;
    isolation: isolate;
}

.projects-hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    image-rendering: auto;
    z-index: 0;
    transform: scale(1.02);
    transition: transform 1.2s ease-out;
}

.projects-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: 
        radial-gradient(circle at 80% 25%, rgba(0, 180, 216, 0.16) 0%, transparent 55%),
        linear-gradient(90deg, rgba(2, 14, 30, 0.94) 0%, rgba(3, 30, 58, 0.78) 45%, rgba(2, 22, 46, 0.40) 100%),
        linear-gradient(0deg, rgba(2, 14, 30, 0.90) 0%, transparent 35%);
}

.projects-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 140px 32px 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #fff;
    box-sizing: border-box;
}

/* Badge / Eyebrow de Cristal */
.projects-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 9999px;
    background: rgba(224, 159, 62, 0.14);
    border: 1px solid rgba(224, 159, 62, 0.35);
    color: #F59E0B;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.projects-hero-badge .badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #F59E0B;
    box-shadow: 0 0 8px #F59E0B;
}

/* Titular monumental */
.projects-hero-title {
    max-width: 860px;
    margin-bottom: 14px;
    font-family: 'Helvetica Neue Thai Bold', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 800;
    color: #FFFFFF;
    font-size: clamp(2.2rem, 1.2rem + 3.8vw, 4.2rem);
    line-height: 1.06;
    letter-spacing: -0.02em;
}

.projects-hero-title span {
    color: #F59E0B;
    background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Subtítulo corchete técnico */
.projects-hero-subtitle {
    font-family: 'Helvetica Neue Thai Bold', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: clamp(0.78rem, 1.2vw, 0.92rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #38BDF8;
    margin-bottom: 18px;
    text-transform: uppercase;
}

/* Descripción */
.projects-hero-desc {
    max-width: 620px;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.85);
    font-size: clamp(0.95rem, 1.1vw, 1.08rem);
    line-height: 1.65;
}



/* Botones de acción */
.projects-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.projects-btn-primary,
.projects-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 250px;
    min-height: 50px;
    padding: 14px 24px;
    box-sizing: border-box;
    font-size: 0.88rem;
    border-radius: 8px;
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: all 0.25s ease;
}

.projects-btn-primary {
    gap: 10px;
    background: #00B4D8;
    color: #FFFFFF;
    font-weight: 800;
    box-shadow: 0 4px 16px rgba(0, 180, 216, 0.35);
    border: none;
}

.projects-btn-primary:hover {
    background: #38BDF8;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 180, 216, 0.55);
}

.projects-btn-secondary {
    gap: 10px;
    background: rgba(3, 42, 77, 0.5);
    color: #FFFFFF;
    font-weight: 700;
    border: 1.5px solid rgba(224, 159, 62, 0.6);
    backdrop-filter: blur(8px);
}

.projects-btn-secondary:hover {
    background: rgba(224, 159, 62, 0.2);
    border-color: #F59E0B;
    transform: translateY(-2px);
}



/* Eyebrow y scroll legacy */
.eyebrow {
    margin-bottom: 18px;
    color: #e09f3e;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.hero-scroll-link {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    padding: 13px 18px;
    border: 1px solid rgba(224, 159, 62, 0.82);
    border-radius: 4px;
    background: rgba(3, 42, 77, 0.48);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-scroll-link:hover {
    border-color: #e09f3e;
    background: #e09f3e;
    color: #033c6c;
}

.hero-scroll-link span {
    color: #e09f3e;
    font-size: 1.3rem;
}

.projects-section {
    padding: 78px 40px 96px;
    background-color: #eaf2f6;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(216, 232, 241, 0.42)), linear-gradient(rgba(3, 60, 108, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(3, 60, 108, 0.025) 1px, transparent 1px);
    background-size: auto, 34px 34px, 34px 34px;
}

.projects-container {
    width: 100%;
    max-width: none;
    margin: 0 auto;
}

.projects-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 42px;
}

.eyebrow-dark { color: #4caacd; }

.projects-heading h2 {
    color: #02457a;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
}

.projects-heading > p {
    max-width: 290px;
    margin-bottom: 5px;
    color: #63717a;
    line-height: 1.6;
}

.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 34px;
}

.project-filter {
    padding: 10px 18px;
    border: 1px solid #b9d0df;
    border-radius: 999px;
    background: transparent;
    color: #245879;
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    transition: 0.2s ease;
}

.project-filter:hover,
.project-filter.active {
    border-color: #033c6c;
    background: #033c6c;
    color: #fff;
}

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

.project-card {
    position: relative;
    height: 370px;
    min-height: 320px;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    background: #033c6c;
    box-shadow: 0 10px 24px rgba(2, 42, 84, 0.14);
    transition: box-shadow 0.25s ease;
}

.project-card::before {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    width: 34%;
    height: 4px;
    background: #e09f3e;
    content: '';
    transition: width 0.35s ease;
}

.project-card:hover {
    box-shadow: 0 14px 28px rgba(2, 42, 84, 0.2);
}

.project-card:hover::before { width: 34%; }

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

.project-card-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #033c6c;
    isolation: isolate;
}

.project-card-media::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 42, 84, 0.6), transparent 55%);
    content: '';
}

.project-card-media::before {
    position: absolute;
    z-index: 1;
    top: 22px;
    right: 22px;
    bottom: 22px;
    left: 22px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    content: '';
    pointer-events: none;
}

.project-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.5s ease;
}

.project-card:hover .project-card-media img { transform: none; }

.project-card-media span {
    position: absolute;
    z-index: 1;
    top: 20px;
    left: 22px;
    color: #fff;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(3, 42, 77, 0.42);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.project-card-media b {
    position: absolute;
    z-index: 1;
    right: 18px;
    bottom: 18px;
    padding: 6px 9px;
    background: #e09f3e;
    color: #033c6c;
    font-size: 0.56rem;
    letter-spacing: 0.08em;
}

.project-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: absolute;
    z-index: 2;
    right: 18px;
    bottom: 18px;
    left: 18px;
    min-height: 0;
    padding: 20px 26px 18px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(2, 25, 48, 0.7);
    transform: none;
}

.project-card-type,
.project-card-body dl,
.project-card-media b { display: none; }

.project-card.is-open .project-card-type,
.project-card.is-open .project-card-body dl,
.project-card.is-open .project-card-media b { display: block; }

.project-card.is-open .project-card-body {
    background: linear-gradient(180deg, rgba(3, 42, 77, 0.08), rgba(3, 42, 77, 0.34));
}

.project-card.is-open .project-card-media::after {
    background: linear-gradient(0deg, rgba(2, 27, 50, 0.86), rgba(3, 60, 108, 0.2) 72%);
}

.project-card.is-open .project-card-body dl {
    display: block !important;
    visibility: visible;
    opacity: 1;
}

.project-card.is-open .project-card-body dt {
    color: rgba(255, 255, 255, 0.82);
}

.project-card.is-open .project-card-body dd {
    color: #f0c060;
    text-shadow: 0 1px 5px rgba(2, 25, 48, 0.45);
}

.project-card.is-open .project-card-body h3 {
    margin-bottom: 12px;
}

.project-card.is-open .project-card-body dl div {
    display: flex;
}

.project-card-type {
    margin-bottom: 13px;
    color: #4caacd;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.project-card-body::before {
    position: absolute;
    top: 0;
    left: 26px;
    width: 42px;
    height: 3px;
    background: #e09f3e;
    content: '';
}

.project-card-body h3 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.5rem, 2.5vw, 2.1rem);
    line-height: 1.05;
}

.project-card-body dl { margin: 0; }

.project-card-body dl div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 0;
    border-top: 1px solid #dbe5eb;
}

.project-card:nth-child(even) .project-card-body::before { background: #4caacd; }
.project-card:nth-child(even) .project-card-media::after { background: linear-gradient(0deg, rgba(3, 42, 77, 0.72), rgba(3, 60, 108, 0.04) 62%); }

.project-card-body dt { color: #75828a; font-size: 0.78rem; }
.project-card-body dd { color: #033c6c; font-size: 0.82rem; font-weight: 700; text-align: right; }

@media (max-width: 768px) {
    .projects-hero { 
        height: 90vh;
        min-height: 90vh;
        height: 90dvh;
        min-height: 90dvh;
        padding-top: 88px;
        padding-bottom: 32px;
        display: flex;
        align-items: flex-end;
        box-sizing: border-box;
    }
    .projects-hero-content { 
        min-height: auto; 
        padding: 0 20px; 
        top: 0; 
        width: 100%;
        max-width: 100%;
        text-align: left;
        align-items: flex-start;
        box-sizing: border-box;
    }
    /* Solo Título y Botones en Mobile para Máxima Limpieza */
    .projects-hero-badge {
        display: none;
    }
    .projects-hero-title { 
        font-size: clamp(1.85rem, 7vw, 2.45rem); 
        line-height: 1.08;
        margin-bottom: 20px;
        letter-spacing: -0.01em; 
        text-align: left;
        width: 100%;
    }
    .projects-hero-title br {
        display: inline;
        content: ' ';
    }
    .projects-hero-subtitle {
        display: none;
    }
    .projects-hero-desc {
        display: none;
    }
    .projects-hero-actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
        margin-bottom: 0;
    }
    .projects-btn-primary,
    .projects-btn-secondary {
        width: 100%;
        min-width: 100%;
        min-height: 48px;
        box-sizing: border-box;
        text-align: center;
        justify-content: center;
        padding: 13px 18px;
        font-size: 0.88rem;
        border-radius: 8px;
    }
    .projects-section { padding: 52px 16px 70px; }
    .projects-heading { display: block; margin-bottom: 30px; }
    .projects-heading > p { margin-top: 20px; }
    .projects-list { grid-template-columns: 1fr; gap: 18px; }
    .project-card {
        height: 330px;
        min-height: 330px;
    }
    .project-card-media { min-height: 0; height: 100%; }
    .project-card-body {
        right: 12px;
        bottom: 12px;
        left: 12px;
        min-height: 132px;
        padding: 18px 18px 16px;
    }

    .project-card-body h3 {
        font-size: 1.25rem;
    }
}

/* ========== ANIMATIONS ========== */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

[data-animate="scale-up"] {
    transform: scale(0.9) translateY(20px);
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .hero,
    .hero-content {
        min-height: 78dvh;
    }

    .hero-content {
        padding: 130px 24px 64px;
    }

    .hero-content h1 {
        font-size: clamp(1.7rem, 7vw, 2.8rem);
        letter-spacing: 2px;
    }

    .hero-content h2 {
        font-size: clamp(1rem, 4vw, 1.5rem);
        margin-bottom: 18px;
    }

    .p-hero-title {
        font-size: 2rem;
    }

    .p-hero-desc {
        font-size: 0.95rem;
    }

    .p-hero-ctas {
        flex-direction: column;
        align-items: center;
    }

    .p-hero-stats {
        flex-direction: row;
        gap: 16px;
        padding: 16px 20px;
    }

    .p-stat-num {
        font-size: 1.4rem;
    }

    .p-stat-label {
        font-size: 0.65rem;
    }

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

    .p-card {
        height: 280px;
    }

    .p-filters {
        gap: 6px;
    }

    .p-filter {
        padding: 8px 16px;
        font-size: 0.78rem;
    }

    .p-cta-box {
        padding: 40px 24px;
    }

    .p-cta-btns {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .p-hero-stats {
        gap: 12px;
    }

    .p-stat-divider {
        height: 30px;
    }

    .p-card {
        height: 260px;
    }

    .p-card-front {
        padding: 24px 20px;
    }
}

/* Footer mobile override */
@media (max-width: 480px) {
    .footer {
        padding: 32px 0 0;
        background: #022a54;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 0;
        text-align: center;
    }

    .footer-brand {
        align-items: center;
        padding-bottom: 20px;
    }

    .footer-logo-img {
        height: 28px;
        margin-bottom: 8px;
    }

    .footer-tagline {
        font-size: 0.72rem;
        color: rgba(255, 255, 255, 0.45);
        margin-bottom: 14px;
    }

    .footer-social {
        justify-content: center;
        gap: 8px;
    }

    .footer-social a {
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(255, 255, 255, 0.6);
    }

    .footer-social svg {
        width: 16px;
        height: 16px;
    }

    .footer-col {
        padding: 16px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .footer-col-title {
        font-size: 0.6rem;
        letter-spacing: 1.5px;
        margin-bottom: 10px;
        color: rgba(255, 255, 255, 0.35);
    }

    .footer-list {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px 16px;
    }

    .footer-list a,
    .footer-list li {
        font-size: 0.78rem;
        color: rgba(255, 255, 255, 0.6);
        padding: 3px 0;
        display: inline;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        padding: 14px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        gap: 6px;
    }

    .footer-copy {
        font-size: 0.65rem;
        color: rgba(255, 255, 255, 0.25);
    }

    .footer-links {
        gap: 4px 12px;
    }

    .footer-links a {
        font-size: 0.62rem;
        color: rgba(255, 255, 255, 0.3);
    }
}
