/* ==========================================================================
   GENERAL & GLOBAL STYLES (general.css)
   ========================================================================== */

/* Core Variables are imported from tokens.css */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    font-size: var(--font-size-p);
}

p {
    font-size: var(--font-size-p);
    margin-bottom: 1rem;
    font-weight: 300;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    background-color: #d04014;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999999;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
}

a,
button,
input,
textarea,
.accordion-header,
.menu-toggle {
    cursor: none;
}

/* Custom Cursor hover state for interactive elements */
.custom-cursor.hover {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

@media (hover: none) or (pointer: coarse) {
    .custom-cursor {
        display: none !important;
    }
    body, a, button, input, textarea, .accordion-header, .menu-toggle {
        cursor: auto !important;
    }
}

/* Typography */
h1 {
    font-family: var(--font-main);
    font-size: var(--font-size-h1);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -1px;
}

h2 {
    font-family: var(--font-main);
    font-size: var(--font-size-h2);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

h3 {
    font-family: var(--font-main);
    font-size: var(--font-size-h3);
    font-weight: 600;
    line-height: 1.2;
}

h4 {
    font-family: var(--font-main);
    font-size: var(--font-size-h4);
    font-weight: 600;
}

h5 {
    font-family: var(--font-main);
    font-size: var(--font-size-h5);
    font-weight: 600;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

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

.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Layout Utilities */
.section-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 var(--page-margin);
}

.section-padding {
    padding: var(--spacing-lg) 0;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 70px;
    background: transparent;
    z-index: 2000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
}

.navbar.scrolled,
.project-page .navbar.scrolled {
    top: 20px;
    width: max-content;
    min-width: 380px;
    max-width: 90vw;
    height: auto;
    background-color: #ffffff !important;
    background: #ffffff !important;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(33, 30, 73, 0.1);
    opacity: 1 !important;
}

.nav-content {
    width: 100%;
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--page-margin);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.4s ease;
}

.navbar.scrolled .nav-content {
    padding: 0.65rem 1.8rem;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
    transition: all 0.4s ease;
}

.navbar.scrolled .nav-links {
    gap: 1.8rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 300;
    transition: all 0.3s ease;
    font-size: var(--font-size-nav-default);
    letter-spacing: -0.5px;
}

.navbar.scrolled .nav-links a,
.project-page .navbar.scrolled .nav-links a {
    font-size: var(--font-size-nav-scrolled);
    font-weight: 500;
    color: var(--text-dark) !important;
    opacity: 1 !important;
}

.navbar.scrolled .nav-links a:hover,
.project-page .navbar.scrolled .nav-links a:hover {
    color: #6429cd !important;
    opacity: 0.8 !important;
}

.nav-links a:hover {
    color: var(--accent);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 2001;
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: var(--text-light);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.navbar.scrolled .menu-toggle .bar,
.project-page .navbar.scrolled .menu-toggle .bar {
    background-color: var(--text-dark) !important;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: var(--font-size-p);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white !important;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-overlay-hover);
    border-color: var(--text-secondary);
}

/* Footer (General) */
footer {
    text-align: left;
    padding: 2.5rem 0 3.5rem;
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-size: 0.9rem;
    opacity: 1;
}

footer p {
    color: var(--text-dark);
    opacity: 0.85;
}

/* Home Footer: Preserves dark purple background matching contact section */
footer.home-footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

footer.home-footer p {
    color: var(--text-light);
    opacity: 0.7;
}

.footer-divider {
    border: none;
    border-top: 1px solid rgba(33, 30, 73, 0.15);
    margin-bottom: 1.5rem;
}

/* Background utilities */
.bg-light {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.bg-dark {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

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

/* ==========================================================================
   PROJECT INTERNAL TEMPLATE STYLES
   ========================================================================== */

.project-page .navbar:not(.scrolled) {
    background: transparent;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: var(--font-size-p);
    font-weight: 500;
    margin-bottom: 2rem;
    transition: transform var(--transition-fast), color var(--transition-fast);
}

.btn-back svg {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-back:hover {
    color: var(--accent);
}

.btn-back:hover svg {
    transform: translateX(-4px);
}

/* Hero Section */
.project-hero {
    background-color: var(--hero-bg, var(--bg-dark));
    padding-top: 10rem;
    padding-bottom: 0;
    transition: background-color 0.3s ease;
}

.project-hero-content {
    max-width: 900px;
}

.project-hero .project-title {
    font-size: 42px;
    font-weight: 600;
    color: var(--text-light);
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin-bottom: 1.25rem;
}

.project-hero .project-description {
    font-size: 1.15rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    max-width: 820px;
    margin-bottom: 2rem;
    font-weight: 300;
}

.project-hero-tags {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}

.tag-pill {
    font-size: 0.85rem;
    color: var(--accent);
    background: rgba(238, 206, 230, 0.08);
    padding: 0.45rem 1.1rem;
    border-radius: 50px;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-transform: lowercase;
    border: 1px solid rgba(238, 206, 230, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
}

.tag-pill:hover {
    border-color: rgba(238, 206, 230, 0.55);
    background: rgba(238, 206, 230, 0.15);
    transform: translateY(-1px);
}

/* Full Width Hero Image */
.project-hero-image-full {
    width: 100%;
    margin-top: 1rem;
    overflow: hidden;
    display: block;
    background: transparent;
    line-height: 0;
}

.project-hero-image-full img {
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: cover;
    object-position: center top;
    display: block;
    vertical-align: bottom;
}

/* ==========================================================================
   Project-Specific Hero Color Customizations (Zero Seam Boundary)
   ========================================================================== */

/* 1. Autogestión de seguridad (Bancolombia) - Pure Black */
.project-page-flujo,
.project-page-flujo .project-hero {
    background-color: #000000;
}

/* 2. Pragma Design System - Exact Brand Purple #330072 */
.project-page-sistema,
.project-page-sistema .project-hero {
    background-color: #330072;
}

/* 3. Turismo Médico Colombia - Deep Ocean Radial Glow */
.project-page-turismo,
.project-page-turismo .project-hero {
    background: radial-gradient(ellipse 130% 100% at 50% 100%, #315474 0%, #0d2235 55%, #03101f 100%);
}

/* 4. Ingreso Pragma - Light Gray Editorial Canvas #ebebeb */
.project-page-ingreso,
.project-page-ingreso .project-hero {
    background-color: #ebebeb;
}
.project-page-ingreso .project-hero .project-title,
.project-page-ingreso .project-hero .btn-back {
    color: #1a1a2e;
}
.project-page-ingreso .project-hero .project-description {
    color: rgba(26, 26, 46, 0.82);
}
.project-page-ingreso .project-hero .btn-back:hover {
    color: #6429cd;
}
.project-page-ingreso .project-hero .tag-pill {
    color: #1a1a2e;
    border-color: rgba(26, 26, 46, 0.25);
    background: rgba(26, 26, 46, 0.06);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.project-page-ingreso .project-hero .tag-pill:hover {
    border-color: rgba(26, 26, 46, 0.5);
    background: rgba(26, 26, 46, 0.12);
}
.project-page-ingreso .navbar:not(.scrolled) .nav-links a {
    color: #1a1a2e;
}
.project-page-ingreso .navbar:not(.scrolled) .menu-toggle .bar {
    background-color: #1a1a2e;
}

/* ==========================================================================
   Interactive Problem Accordion & Dynamic Icon Stage (Universal Component)
   ========================================================================== */

.project-problem {
    padding: 5.5rem 0;
}

.problem-title {
    font-size: var(--font-size-h2);
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.15;
    letter-spacing: -1px;
}

.problem-desc {
    font-size: var(--font-size-p);
    margin-bottom: 2.5rem;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    line-height: 1.65;
    color: rgba(33, 30, 73, 0.85);
}

.problem-interactive-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 4.5rem;
    align-items: center;
    max-width: 1040px;
    margin: 3.5rem auto 0;
}

.problem-visual-column {
    display: flex;
    justify-content: center;
    align-items: center;
}

.problem-icon-stage {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background-color: var(--accent);
    border: 2px solid rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 16px 40px rgba(238, 206, 230, 0.5), 0 6px 16px rgba(33, 30, 73, 0.06);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.problem-icon-stage:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 48px rgba(238, 206, 230, 0.65), 0 8px 20px rgba(33, 30, 73, 0.08);
}

.problem-icon-large {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    opacity: 0;
    transform: scale(0.75) rotate(-8deg);
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.problem-icon-large.active {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    pointer-events: auto;
}

.problem-items-column {
    display: flex;
    flex-direction: column;
}

.problem-interactive-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.problem-interactive-item {
    border-bottom: 1px solid rgba(33, 30, 73, 0.1);
    padding-bottom: 1.25rem;
    transition: all 0.35s ease;
}

.problem-interactive-item:first-child {
    padding-top: 0;
}

.problem-interactive-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.problem-item-header {
    background: none;
    border: none;
    padding: 0;
    text-align: left;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    outline: none;
}

.problem-item-title {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.4px;
    color: var(--text-dark);
    opacity: 0.35;
    transition: opacity 0.35s ease, color 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 0;
}

.problem-interactive-item:hover .problem-item-title {
    opacity: 0.75;
}

.problem-interactive-item.active .problem-item-title {
    opacity: 1;
    color: var(--text-dark);
    transform: translateX(4px);
}

.problem-item-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.35s ease,
                margin-top 0.35s ease;
    margin-top: 0;
}

.problem-interactive-item.active .problem-item-body {
    max-height: 200px;
    opacity: 1;
    margin-top: 0.85rem;
}

.problem-item-desc {
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgba(33, 30, 73, 0.85);
    font-weight: 300;
    margin: 0;
    max-width: 580px;
}

.product-imagen {
    display: flex;
    justify-content: center;
    width: 100%;
}

.product-imagen img {
    width: 100%;
    max-width: 1555.2px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-hero-image-placeholder {
    width: 100%;
}



/* Process Section */
.project-process {
    padding: 4rem 0;
}

/* Process Board variables are now defined in tokens.css */

.process-board {
    max-width: 1200px;
    width: calc(100% - var(--spacing-sm) * 2);
    margin: 2rem auto 0;
    background: var(--bg-light);
    border: 1.5px solid var(--process-panel-border);
    border-radius: 40px;
    padding: 48px 52px 80px;
    position: relative;
    overflow: visible;
    box-shadow: var(--process-shadow);
}

.phase-labels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 26px;
    color: var(--text-dark);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-size: clamp(0.5rem, 1vw, 1.5rem);
    padding: 0 48px;
}

.phase-labels span:nth-child(1) {
    text-align: left;
}

.phase-labels span:nth-child(2) {
    text-align: center;
}

.phase-labels span:nth-child(3) {
    text-align: right;
}

.timeline {
    position: relative;
    min-height: 460px;
    padding: 0 24px;
}

.grid {
    position: absolute;
    inset: 0 24px 0 24px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    pointer-events: none;
}

.grid::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(to right,
            transparent 0,
            transparent calc(8.333% - 0.5px),
            #2a275f calc(8.333% - 0.5px),
            #2a275f calc(8.333% + 0.5px));
    mask-image: linear-gradient(to bottom, transparent 0 2%, black 2% 95%, transparent 95% 100%);
    opacity: .9;
}

.kickoff {
    position: absolute;
    top: 2px;
    left: 58px;
    font-size: var(--font-size-small);
    color: #7d7d84;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.stage {
    position: absolute;
    height: 54px;
    border-radius: 999px;
    background: #ececec;
    border: 1px solid rgba(40, 40, 50, .14);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 22px 0 18px;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    outline: none;
}

.stage:hover,
.stage:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
    background: #f6f6f6;
}

.stage-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: white;
    background: var(--process-primary);
    border: 3px solid #f8f8f8;
    box-shadow: 0 0 0 1px rgba(42, 39, 95, .18);
}

.stage[data-tone="accent"] .stage-icon {
    background: #efdff0;
    color: var(--process-primary);
}

.stage-label {
    color: #6d6d72;
    font-size: var(--font-size-p);
    letter-spacing: .12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tooltip {
    position: fixed;
    width: min(420px, calc(100vw - 32px));
    background: var(--tooltip-bg);
    color: var(--tooltip-text);
    border-radius: 24px;
    padding: 26px 28px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    pointer-events: none;
    z-index: 1000;
}

.tooltip.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tooltip-title {
    margin: 0 0 14px;
    font-size: var(--font-size-h4);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.tooltip-list {
    margin: 0;
    padding-left: 28px;
    font-size: 1rem;
    line-height: 1.55;
}

.tooltip-list li+li {
    margin-top: 6px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mockups Section */
.padding-large {
    padding: 8rem 0;
}

.mockups-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.mockup.phone {
    border-radius: 20px;
    min-height: 300px;
    width: 200px;
    opacity: 0.6;
}

.mockup.phone.normal {
    min-height: 400px;
    width: 220px;
    opacity: 0.8;
}

.mockup.phone.main {
    min-height: 500px;
    width: 260px;
    opacity: 1;
    background-color: var(--accent);
    color: var(--bg-dark);
}

/* Solucion */
.project-solution {
    padding-bottom: 6rem;
}

.project-solution h2 {
    margin-bottom: 1rem;
    font-family: var(--font-main);
    font-size: var(--font-size-h2);
    letter-spacing: -0.5px;
}

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

.solution-imagen img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.solution-card {
    min-height: 250px;
}

/* Architecture Section */
.project-architecture {
    padding: 6rem 0;
}

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

.architecture-text h2 {
    margin-bottom: 1rem;
    font-family: var(--font-main);
    font-size: var(--font-size-h2);
    letter-spacing: -0.5px;
}

.architecture-text p {
    font-size: var(--font-size-p);
    font-weight: 300;
}

.placeholder-box.outline {
    background: transparent;
    border: 1px dashed rgba(0, 0, 0, 0.2);
    box-shadow: none;
}

.architecture-imagen img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Read Full Case Progressive Disclosure Toggle (Universal Component)
   ========================================================================== */

.read-full-case-container {
    padding: 2.25rem 0 3.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-light);
}

/* ==========================================================================
   Architecture & Solution Teaser / Progressive Disclosure Toggle (Universal)
   ========================================================================== */

/* Cut-off peek teaser showing top portion of collapsed section */
.full-case-wrapper {
    position: relative;
    max-height: 260px;
    overflow: hidden;
    background-color: var(--bg-light);
    transition: max-height 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.full-case-wrapper::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, rgba(33, 30, 73, 0) 0%, rgba(33, 30, 73, 0.08) 100%);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.full-case-wrapper.expanded {
    max-height: 4000px;
}

.full-case-wrapper.expanded::after {
    opacity: 0;
    pointer-events: none;
}

.full-case-inner {
    min-height: 0;
    opacity: 1;
    transform: none;
}

/* Read Full Project Action Button Container */
.read-full-case-container {
    padding: 1.5rem 0 3.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-light);
    position: relative;
    z-index: 10;
    transition: padding 0.35s ease;
}

.full-case-wrapper.expanded + .read-full-case-container {
    padding: 2.5rem 0 4rem;
}

/* Button style unified with "Abrir galeria" */
.btn-read-full-case {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.65rem 1.6rem;
    border-radius: 50px;
    background-color: #ffffff;
    color: var(--text-dark);
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    border: 1px solid rgba(33, 30, 73, 0.12);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.btn-read-full-case:hover {
    transform: translateY(-2px);
    background-color: rgba(238, 206, 230, 0.35);
    border-color: rgba(215, 170, 205, 0.85);
    box-shadow: 0 6px 20px rgba(238, 206, 230, 0.35);
    color: var(--text-dark);
}

.btn-read-full-case .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-read-full-case.expanded .btn-icon {
    transform: rotate(180deg);
}

/* ==========================================================================
   Showcase Gallery & Fullscreen Modal (Joshua Baker Pattern - Universal)
   ========================================================================== */

.project-gallery-section {
    padding: 4.5rem 0 5.5rem;
    background-color: var(--bg-light);
}

.gallery-carousel-viewport {
    container-type: inline-size;
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    padding: 0.5rem 0 1rem;
}

.gallery-carousel-viewport::-webkit-scrollbar {
    display: none;
}

.gallery-carousel-viewport.grabbing {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
}

.gallery-carousel-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
}

.gallery-slide-item {
    flex: 0 0 calc(80cqi - 0.5rem);
    width: calc(80cqi - 0.5rem);
    max-width: 960px;
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 8px 26px rgba(33, 30, 73, 0.08);
    border: 1px solid rgba(33, 30, 73, 0.06);
    scroll-snap-align: start;
    transition: box-shadow 0.3s ease;
}

.gallery-screen-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.gallery-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    gap: 1rem;
}

.btn-open-gallery {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.65rem 1.6rem;
    border-radius: 50px;
    background-color: #ffffff;
    color: var(--text-dark);
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    border: 1px solid rgba(33, 30, 73, 0.12);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.btn-open-gallery:hover {
    transform: translateY(-2px);
    background-color: rgba(238, 206, 230, 0.35);
    border-color: rgba(215, 170, 205, 0.85);
    box-shadow: 0 6px 20px rgba(238, 206, 230, 0.35);
    color: var(--text-dark);
}

.btn-open-gallery .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
}

.gallery-nav-pills {
    display: inline-flex;
    align-items: center;
    background-color: #ffffff;
    border-radius: 50px;
    border: 1px solid rgba(33, 30, 73, 0.12);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    padding: 3px;
}

.gallery-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50px;
    border: none;
    background: transparent;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.gallery-nav-btn:hover:not(:disabled) {
    background-color: rgba(238, 206, 230, 0.4);
    color: var(--text-dark);
}

.gallery-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gallery-nav-divider {
    width: 1px;
    height: 20px;
    background-color: rgba(33, 30, 73, 0.1);
}

.gallery-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background-color: var(--bg-light);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.3s ease;
}

.gallery-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.gallery-modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
    background: linear-gradient(to bottom, var(--bg-light) 50%, rgba(251, 251, 253, 0.85) 80%, transparent 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-close-gallery {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.65rem 1.6rem;
    border-radius: 50px;
    background-color: #ffffff;
    color: var(--text-dark);
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    border: 1px solid rgba(33, 30, 73, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.btn-close-gallery:hover {
    transform: translateY(-2px);
    background-color: rgba(238, 206, 230, 0.4);
    border-color: rgba(215, 170, 205, 0.9);
    box-shadow: 0 8px 24px rgba(238, 206, 230, 0.45);
    color: var(--text-dark);
}

.btn-close-gallery .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
}

.gallery-modal-scroll {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6.5rem 1.5rem 5rem;
    display: flex;
    justify-content: center;
}

.gallery-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem 2rem;
    max-width: 1120px;
    width: 100%;
    margin: 0 auto;
    height: max-content;
}

.gallery-modal-item:first-child {
    grid-column: 1 / -1;
}

.gallery-modal-item {
    display: flex;
    flex-direction: column;
}

.gallery-modal-img-wrap {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(33, 30, 73, 0.08);
    box-shadow: 0 8px 30px rgba(33, 30, 73, 0.08);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-modal-img-wrap:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(33, 30, 73, 0.12);
}

.gallery-modal-img-wrap img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    object-fit: contain;
}

.gallery-modal-caption {
    font-size: 12px;
    font-weight: 400;
    color: rgba(33, 30, 73, 0.72);
    line-height: 1.5;
    margin-top: 0.75rem;
    padding: 0 2px;
    font-family: var(--font-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .gallery-slide-item {
        flex: 0 0 calc(86cqi - 0.5rem);
        width: calc(86cqi - 0.5rem);
    }

    .gallery-carousel-track {
        gap: 1rem;
    }

    .gallery-bottom-bar {
        margin-top: 1.25rem;
    }

    .btn-open-gallery {
        padding: 0.55rem 1.25rem;
        font-size: 0.88rem;
    }

    .gallery-nav-btn {
        width: 36px;
        height: 36px;
    }

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

    .gallery-modal-item:first-child {
        grid-column: auto;
    }

    .gallery-modal-header {
        height: 4.5rem;
    }

    .gallery-modal-scroll {
        padding: 5rem 1rem 3.5rem;
    }

    .btn-close-gallery {
        padding: 0.55rem 1.25rem;
        font-size: 0.88rem;
    }
}

/* Solution Stats Cards */
.resultados {
    padding: 5rem 0 6.5rem;
}

.resultados h2 {
    margin-bottom: 2.5rem;
    font-family: var(--font-main);
    font-size: var(--font-size-h2);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: var(--text-dark);
}

/* Minimalist Stats Grid (No cards, no progress bar, clean typography) */
.stats-minimal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3.5rem;
    margin-top: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stats-minimal-grid .stat-number {
    font-family: var(--font-main);
    color: var(--text-dark);
    display: flex;
    align-items: baseline;
    gap: 0.15rem;
    margin-bottom: 1.25rem;
}

.stats-minimal-grid .stat-number .value {
    font-size: clamp(3.5rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -2px;
    color: var(--text-dark);
}

.stats-minimal-grid .stat-number .unit {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--text-dark);
}

.stats-minimal-grid .stat-title {
    font-family: var(--font-main);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.stats-minimal-grid .stat-desc {
    font-size: 0.98rem;
    color: rgba(33, 30, 73, 0.72);
    line-height: 1.6;
    font-weight: 400;
}

@media (max-width: 900px) {
    .stats-minimal-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

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

.stat-card {
    background-color: #f6f7fb;
    border-radius: 12px;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-main);
    color: #1a1a1a;
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.stat-number .value {
    font-size: 4rem;
    font-weight: 800;
    line-height: 0.8;
    letter-spacing: -3px;
}

.stat-number .unit {
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: -0.2rem;
    margin-left: 0.2rem;
}

.stat-progress {
    width: 100%;
    height: 12px;
    background-color: #a8a4ce;
    border-radius: 6px;
    margin-bottom: 3.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--bg-dark);
    border-radius: 6px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.reveal.active .progress-bar {
    width: var(--target-width);
}

.stat-title {
    font-family: var(--font-main);
    font-size: 1.6rem;
    font-weight: 700;
    color: #211e1e;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.stat-desc {
    font-size: 1.15rem;
    color: #3b3b4a;
    line-height: 1.5;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-delayed {
    opacity: 0;
    animation: fadeIn 1s forwards 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Responsive (Common Layouts & Navigation) */
@media (max-width: 992px) {

    .project-header-grid,
    .phrase-grid,
    .architecture-grid,
    .wireframes-grid,
    .system-grid,
    .solution-grid,
    .reto-grid,
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .problem-cards-grid,
    .problem-interactive-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .problem-card.card-2,
    .problem-card.card-3 {
        margin-top: 0;
    }

    .mockups-grid {
        flex-direction: column;
    }
}

@media (max-width: 980px) {
    .process-board {
        padding: 32px 20px 40px;
        border-radius: 28px;
    }

    .phase-labels {
        padding: 0 10px;
        font-size: .95rem;
    }

    .timeline {
        min-height: 520px;
        overflow-x: auto;
        overflow-y: visible;
    }

    .timeline-inner {
        position: relative;
        width: 1060px;
        min-height: 460px;
    }

    .grid,
    .kickoff,
    .stage {
        position: absolute;
    }
}

@media (max-width: 768px) {
    .nav-content {
        justify-content: flex-end;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-dark);
        transition: right 0.4s ease;
        z-index: 2005;
        gap: 3rem;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a,
    .navbar.scrolled .nav-links a {
        font-size: 1.5rem;
        color: var(--text-light);
    }

    .section-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    /* internal template responsive < 768px */
    .project-hero {
        padding-top: 6rem;
    }

    .project-hero .project-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    .phrase-content h2,
    .problem-title,
    .architecture-text h2,
    .wireframes-text h2,
    .project-design-system h2,
    .project-solution h2,
    .resultados h2,
    .contact-content h2,
    .project-text h2 {
        font-size: clamp(1.4rem, 5vw, 28px);
    }

    .placeholder-box {
        min-height: 250px;
    }

    .placeholder-box.tall {
        min-height: 350px;
    }
}