/* Sivise Studio — Design System & Custom Styles (Mondrian Clásico Style) */

:root {
    /* Refined, high-end Mondrian colors (not overly harsh web-safe primaries) */
    --bg-white: #fcfbf9;         /* Warm ivory/bone canvas background */
    --grid-black: #0c0d0f;       /* Deep rich coal/black */
    --primary-red: #e73a3c;      /* Vibrant cadmium/coral red */
    --primary-blue: #1655d4;     /* Deep royal cobalt blue */
    --primary-yellow: #f1bf24;   /* Warm golden yellow */
    --accent-gray: #e6e9ee;      /* Balanced cool gray */
    
    /* Text colors */
    --text-dark: #121316;
    --text-muted: #4f535d;
    
    /* Layout Constants */
    --border-width: 4px;
    --font-heading: 'Bebas Neue', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Smooth transitions */
    --transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--grid-black); /* The grid lines themselves are the background showing through */
}

body {
    background-color: var(--bg-white);
    color: var(--text-dark);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Scrollbar styling matching the theme */
::-webkit-scrollbar {
    width: 12px;
}
::-webkit-scrollbar-track {
    background: var(--bg-white);
    border-left: var(--border-width) solid var(--grid-black);
}
::-webkit-scrollbar-thumb {
    background: var(--grid-black);
    border: 3px solid var(--bg-white);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: 0.03em;
    line-height: 1.1;
    color: var(--text-dark);
}

p {
    font-size: 1.05rem;
    color: var(--text-muted);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Helper utility classes for background colors */
.red-bg { background-color: var(--primary-red) !important; color: #fff !important; }
.blue-bg { background-color: var(--primary-blue) !important; color: #fff !important; }
.yellow-bg { background-color: var(--primary-yellow) !important; color: var(--text-dark) !important; }
.gray-bg { background-color: var(--accent-gray) !important; }

/* Grid Layout Foundations */
.mondrian-container {
    display: grid;
    grid-template-columns: 1fr;
    background-color: var(--grid-black);
    gap: var(--border-width); /* Creates the Mondrian lines */
    max-width: 1400px;
    margin: 0 auto;
    border-left: var(--border-width) solid var(--grid-black);
    border-right: var(--border-width) solid var(--grid-black);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.grid-cell {
    background-color: var(--bg-white);
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

/* Navigation Header */
.nav-cell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 48px;
    width: auto;
    display: block;
    transition: var(--transition);
}

.logo-image:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-red);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--primary-red);
}

/* Nav CTA button in navigation */
.nav-links a.nav-cta {
    background-color: var(--primary-yellow);
    border: 3px solid var(--grid-black);
    padding: 8px 20px;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 700;
}

.nav-links a.nav-cta::after {
    display: none;
}

.nav-links a.nav-cta:hover {
    background-color: var(--primary-red);
    color: #fff;
    transform: translate(-3px, -3px);
    box-shadow: 3px 3px 0 var(--grid-black);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 200;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--grid-black);
    transition: var(--transition);
}

.mobile-menu-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

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

/* Mobile Nav Overlay */
.mobile-nav {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-white);
    z-index: 150;
    padding: 40px;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav-link {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.mobile-nav-cta {
    background-color: var(--primary-yellow);
    border: 3px solid var(--grid-black);
    padding: 10px 40px;
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 700;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 3px solid var(--grid-black);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

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

.btn-red:hover {
    background-color: var(--primary-yellow);
    color: var(--text-dark);
    transform: translate(-5px, -5px);
    box-shadow: 5px 5px 0 var(--grid-black);
}

.btn-yellow {
    background-color: var(--primary-yellow);
    color: var(--text-dark);
}

.btn-yellow:hover {
    background-color: var(--primary-blue);
    color: #fff;
    transform: translate(-5px, -5px);
    box-shadow: 5px 5px 0 var(--grid-black);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-dark);
}

.btn-outline:hover {
    background-color: var(--primary-blue);
    color: #fff;
    transform: translate(-5px, -5px);
    box-shadow: 5px 5px 0 var(--grid-black);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-black {
    background-color: var(--grid-black);
    color: var(--bg-white);
}

.btn-black:hover {
    background-color: var(--primary-red);
    color: #fff;
    transform: translate(-3px, -3px);
    box-shadow: 3px 3px 0 var(--grid-black);
}

/* HERO ROW */
.hero-row {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: var(--border-width);
    background-color: var(--grid-black);
}

.hero-intro {
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kicker {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary-red);
    margin-bottom: 16px;
    display: inline-block;
}

.hero-intro h1 {
    font-size: 4.8rem;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.highlight-yellow {
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.highlight-yellow::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 24px;
    background-color: var(--primary-yellow);
    z-index: -1;
}

.hero-intro p {
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Hero Asymmetrical Graphic Blocks */
.hero-row .red-bg {
    min-height: 250px;
}

/* Right hand vertical stacked blocks */
.hero-row > *:not(.hero-intro) {
    display: none; /* Done for grid mapping */
}

/* We structure the hero layout with a separate subgrid in desktop */
@media (min-width: 992px) {
    .hero-row {
        grid-template-columns: 2.5fr 1fr;
    }
    
    /* We display the grid graphic cells */
    .hero-row .hero-graphic-1,
    .hero-row .hero-graphic-2,
    .hero-row .hero-graphic-3 {
        display: block;
        height: 100%;
    }
    
    .hero-row {
        grid-template-areas: 
            "intro graphic-1"
            "intro graphic-2"
            "intro graphic-3";
    }
    
    .hero-intro { grid-area: intro; }
    .hero-graphic-1 { grid-area: graphic-1; }
    .hero-graphic-2 { grid-area: graphic-2; }
    .hero-graphic-3 { 
        grid-area: graphic-3; 
        position: relative;
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
    }
    
    .bebas-watermark {
        font-family: var(--font-heading);
        font-size: 5rem;
        color: rgba(12, 13, 15, 0.12);
        line-height: 0.8;
        letter-spacing: 0.05em;
        user-select: none;
        padding: 10px;
    }
}

/* SECTIONS COMMON HEADER */
.section-title-cell {
    padding: 60px 40px 40px 40px;
}

.section-title-cell h2 {
    font-size: 3.5rem;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.2rem;
    max-width: 700px;
}

.red-border-left {
    border-left: 12px solid var(--primary-red);
}

.blue-border-left {
    border-left: 12px solid var(--primary-blue);
}

/* SECCIÓN QUÉ HACEMOS (SERVICES) */
.services-section {
    background-color: var(--grid-black);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--border-width);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--border-width);
    background-color: var(--grid-black);
}

.service-card {
    background-color: var(--bg-white);
    padding: 48px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.service-icon {
    width: 60px;
    height: 60px;
    border: 3px solid var(--grid-black);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    transition: var(--transition);
}

.service-icon svg {
    width: 32px;
    height: 32px;
    color: var(--grid-black);
    transition: var(--transition);
}

.service-card h3 {
    font-size: 1.8rem;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.service-card p {
    font-size: 1rem;
    flex-grow: 1;
}

/* Service Card Top Border Colors */
.border-top-red { border-top: 8px solid var(--primary-red); }
.border-top-blue { border-top: 8px solid var(--primary-blue); }
.border-top-yellow { border-top: 8px solid var(--primary-yellow); }

/* Color icons */
.icon-red { background-color: var(--primary-red); }
.icon-red svg { color: #fff; }
.icon-blue { background-color: var(--primary-blue); }
.icon-blue svg { color: #fff; }
.icon-yellow { background-color: var(--primary-yellow); }
.icon-yellow svg { color: var(--text-dark); }
.icon-gray { background-color: var(--accent-gray); }

/* Service Card Hover States (Classic Mondrian Block Activation) */
.service-card:hover {
    transform: translate(-8px, -8px);
    box-shadow: 8px 8px 0 var(--grid-black);
    z-index: 2;
}

.service-card.border-top-yellow:hover {
    background-color: var(--primary-yellow);
}
.service-card.border-top-blue:hover {
    background-color: var(--primary-blue);
    color: #fff;
}
.service-card.border-top-blue:hover h3,
.service-card.border-top-blue:hover p {
    color: #fff;
}
.service-card.border-top-red:hover {
    background-color: var(--primary-red);
    color: #fff;
}
.service-card.border-top-red:hover h3,
.service-card.border-top-red:hover p {
    color: #fff;
}

.service-card:hover .service-icon {
    background-color: var(--bg-white) !important;
    transform: rotate(90deg);
}
.service-card:hover .service-icon svg {
    color: var(--grid-black) !important;
}

/* SECCIÓN CLIENTES */
.clients-section {
    background-color: var(--grid-black);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--border-width);
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--border-width);
    background-color: var(--grid-black);
}

.client-card {
    background-color: var(--bg-white);
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.client-card h3 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.client-tag {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid var(--grid-black);
    margin-bottom: 24px;
}

.red-tag { background-color: var(--primary-red); color: #fff; }
.blue-tag { background-color: var(--primary-blue); color: #fff; }
.yellow-tag { background-color: var(--primary-yellow); color: var(--text-dark); }

.client-card p {
    font-size: 0.95rem;
}

/* Special card for "Próximamente, tu proyecto" */
.next-project-card {
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--accent-gray);
    transition: var(--transition);
}

.plus-sign {
    font-size: 4rem;
    font-family: var(--font-heading);
    line-height: 1;
    margin-bottom: 12px;
    transition: var(--transition);
}

.next-project-card p {
    margin-bottom: 24px;
}

.next-project-card:hover {
    background-color: var(--bg-white);
}

.next-project-card:hover .plus-sign {
    transform: scale(1.3) rotate(90deg);
    color: var(--primary-red);
}

/* SECCIÓN PORTFOLIO Y BLOG */
.portfolio-section {
    background-color: var(--grid-black);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--border-width);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--border-width);
    background-color: var(--grid-black);
}

.project-card {
    background-color: var(--bg-white);
    min-height: 320px;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.card-bg-indicator {
    height: 16px;
    width: 100%;
    border-bottom: 3px solid var(--grid-black);
    transition: var(--transition);
}

.project-info {
    padding: 40px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-meta {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.project-card h3 {
    font-size: 1.8rem;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.project-card p {
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

.read-more {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--grid-black);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

/* Project Card Hover Action: indicator expands, card pushes up */
.project-card:hover {
    transform: translate(-8px, -8px);
    box-shadow: 8px 8px 0 var(--grid-black);
    z-index: 5;
}

.project-card:hover .card-bg-indicator {
    height: 32px;
}

.project-card:hover .read-more {
    color: var(--primary-red);
    transform: translateX(6px);
}

/* Blog entry card specific styling */
.blog-card {
    background-color: #f7f5f0;
}

/* SECCIÓN CONTACTO */
.contact-section {
    background-color: var(--grid-black);
    display: grid;
    grid-template-columns: 1.2fr 1.5fr;
    gap: var(--border-width);
}

.contact-info-cell {
    background-color: var(--bg-white);
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info-cell h2 {
    font-size: 3.5rem;
    margin-bottom: 24px;
}

.contact-info-cell p {
    font-size: 1.15rem;
    margin-bottom: 32px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1.1rem;
}

.contact-method svg {
    width: 24px;
    height: 24px;
    color: var(--primary-red);
}

.contact-form-cell {
    background-color: var(--bg-white);
    padding: 60px;
}

/* Mondrian Form Styling */
.mondrian-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    padding: 14px 16px;
    border: 3px solid var(--grid-black);
    background-color: var(--bg-white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-dark);
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    background-color: #fff;
    box-shadow: 4px 4px 0 var(--grid-black);
    transform: translate(-4px, -4px);
}

/* Custom placeholder */
::placeholder {
    color: #a0a4b0;
    opacity: 1;
}

.submit-btn {
    align-self: flex-start;
    padding: 14px 40px;
}

/* Form success & error message blocks */
.form-message {
    display: none;
    padding: 16px;
    border: 3px solid var(--grid-black);
    font-weight: 600;
    font-size: 0.95rem;
}

.success-message {
    background-color: var(--primary-yellow);
    color: var(--text-dark);
}

.error-message {
    background-color: var(--primary-red);
    color: #fff;
}

/* FOOTER */
.footer-cell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.mondrian-blocks-footer {
    display: inline-flex;
    gap: 4px;
    border: 2px solid var(--grid-black);
    padding: 4px;
    background-color: var(--grid-black);
}

.mondrian-blocks-footer .mini-block {
    width: 20px;
    height: 20px;
    display: block;
}

/* DETAILS DRAWER */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(12, 13, 15, 0.4);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.drawer {
    position: fixed;
    top: 0;
    right: -100%; /* Hidden off-screen */
    width: 100%;
    max-width: 650px;
    height: 100vh;
    background-color: var(--bg-white);
    border-left: var(--border-width) solid var(--grid-black);
    z-index: 1000;
    transition: right 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0,0,0,0.2);
}

.drawer.active {
    right: 0;
}

.drawer-header-bar {
    height: 20px;
    background-color: var(--primary-red);
    border-bottom: 3px solid var(--grid-black);
}

.drawer-container {
    padding: 48px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.drawer-header {
    display: flex;
    flex-direction: column;
    position: relative;
    border-bottom: var(--border-width) solid var(--grid-black);
    padding-bottom: 24px;
    margin-bottom: 32px;
}

.drawer-meta {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.drawer-title {
    font-size: 3.2rem;
    line-height: 1.05;
    padding-right: 48px;
}

.drawer-close {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 2.8rem;
    font-family: var(--font-body);
    font-weight: 300;
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 0.8;
    color: var(--grid-black);
    transition: var(--transition);
}

.drawer-close:hover {
    color: var(--primary-red);
    transform: rotate(90deg);
}

.drawer-body {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--text-dark);
}

/* Styling for injected drawer elements */
.drawer-body p {
    color: var(--text-dark);
    margin-bottom: 20px;
}

.drawer-body blockquote {
    border-left: 6px solid var(--primary-blue);
    padding-left: 20px;
    margin: 24px 0;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.drawer-body ul {
    margin: 20px 0 20px 24px;
}

.drawer-body li {
    margin-bottom: 8px;
}

.drawer-body strong {
    font-weight: 700;
}

/* RESPONSIVE STYLING (MEDIA QUERIES) */
@media (max-width: 991px) {
    .hero-row {
        grid-template-columns: 1fr;
    }
    
    .hero-intro {
        padding: 60px 40px;
    }
    
    .hero-intro h1 {
        font-size: 3.6rem;
    }
    
    .contact-section {
        grid-template-columns: 1fr;
    }
    
    .contact-info-cell {
        padding: 60px 40px;
    }
    
    .contact-form-cell {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        display: none;
    }
    
    .logo {
        font-size: 1.8rem;
    }
    
    .hero-intro h1 {
        font-size: 2.8rem;
    }
    
    .hero-intro p {
        font-size: 1.1rem;
    }
    
    .section-title-cell h2 {
        font-size: 2.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .drawer-container {
        padding: 30px;
    }
    
    .drawer-title {
        font-size: 2.4rem;
    }
}

/* ==========================================
   PROJECT CASE STUDY PAGES (vAdvent / SiviseCraft)
   ========================================== */
.case-breadcrumb {
    padding: 18px 40px;
    background-color: var(--accent-gray);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.case-breadcrumb a {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dark);
}

.case-breadcrumb a:hover {
    color: var(--primary-red);
}

.case-metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--border-width);
    background-color: var(--grid-black);
}

.case-metric-cell {
    background-color: var(--bg-white);
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.case-metric-value {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    line-height: 1;
    letter-spacing: 0.03em;
}

.case-metric-label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.85;
}

.case-gallery-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--border-width);
    background-color: var(--grid-black);
}

.case-gallery-cell {
    background-color: var(--bg-white);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.case-gallery-cell img {
    width: 100%;
    height: 100%;
    max-height: 460px;
    object-fit: cover;
    border: 3px solid var(--grid-black);
    display: block;
}

.case-gallery-caption {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.case-content-row {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: var(--border-width);
    background-color: var(--grid-black);
}

.case-story-cell {
    background-color: var(--bg-white);
    padding: 56px 48px;
}

.case-story-cell h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.case-story-cell p {
    margin-bottom: 18px;
    font-size: 1.05rem;
    line-height: 1.75;
}

.case-story-cell blockquote {
    border-left: 6px solid var(--primary-red);
    padding-left: 20px;
    margin: 28px 0;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--text-dark);
}

.case-stack-cell {
    background-color: #f7f5f0;
    padding: 56px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.case-stack-cell h3 {
    font-size: 2rem;
    text-transform: uppercase;
}

.stack-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stack-pill {
    padding: 6px 14px;
    border: 2px solid var(--grid-black);
    background-color: var(--bg-white);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.case-next-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--border-width);
    background-color: var(--grid-black);
}

.case-next-card {
    background-color: var(--bg-white);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}

.case-next-card:hover {
    background-color: var(--primary-yellow);
}

.case-next-card h3 {
    font-size: 2.1rem;
}

/* Featured flagship badge on index.html */
.project-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.flagship-badge {
    display: inline-block;
    background-color: var(--grid-black);
    color: var(--bg-white);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 9px;
    margin-bottom: 10px;
    align-self: flex-start;
}

@media (max-width: 991px) {
    .case-metrics-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .case-gallery-row,
    .case-content-row,
    .case-next-row {
        grid-template-columns: 1fr;
    }
    .case-story-cell,
    .case-stack-cell {
        padding: 40px 28px;
    }
}

@media (max-width: 600px) {
    .case-metrics-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   BLOG 4-COLUMN MONDRIAN ROW (1:1 con Framer)
   ========================================== */
.blog-categories-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--border-width);
    background-color: var(--grid-black);
}

.blog-cat-card {
    background-color: var(--bg-white);
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: space-between;
    gap: 20px;
}

.blog-cat-card h3 {
    font-size: 2rem;
    letter-spacing: 0.04em;
    color: var(--text-dark);
}

.blog-cat-card p {
    font-size: 0.94rem;
    line-height: 1.55;
    color: var(--text-muted);
    max-width: 260px;
}

.blog-cat-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.88rem;
}

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

.btn-blue:hover {
    background-color: var(--primary-yellow);
    color: var(--text-dark);
    transform: translate(-4px, -4px);
    box-shadow: 4px 4px 0 var(--grid-black);
}

.blog-cat-blue-block {
    min-height: 220px;
}

.portfolio-filter-bar {
    padding: 16px 40px;
    background-color: var(--accent-gray);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.white-bg {
    background-color: var(--bg-white) !important;
}

.footer-signature {
    font-size: 0.88rem;
    color: var(--text-dark);
}

@media (max-width: 991px) {
    .blog-categories-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .blog-cat-blue-block {
        min-height: 140px;
    }
}

@media (max-width: 600px) {
    .blog-categories-row {
        grid-template-columns: 1fr;
    }
    .blog-cat-blue-block {
        display: none;
    }
}

/* ==========================================
   BLOG PAGE TABS & DRAWER MAXIMIZE TO FULLSCREEN
   ========================================== */
.blog-tabs-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--border-width);
    background-color: var(--grid-black);
}

.blog-tab-btn {
    background-color: var(--bg-white);
    border: none;
    padding: 18px 20px;
    font-family: var(--font-heading);
    font-size: 1.55rem;
    letter-spacing: 0.04em;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
}

.blog-tab-btn:hover {
    background-color: var(--accent-gray);
}

.blog-tab-btn.active {
    background-color: var(--grid-black);
    color: var(--bg-white);
}

.blog-tab-btn.tab-red.active {
    background-color: var(--primary-red);
    color: #fff;
}

.blog-tab-btn.tab-blue.active {
    background-color: var(--primary-blue);
    color: #fff;
}

.blog-tab-btn.tab-yellow.active {
    background-color: var(--primary-yellow);
    color: var(--text-dark);
}

.drawer-actions {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawer-icon-btn {
    width: 44px;
    height: 44px;
    border: 3px solid var(--grid-black);
    background-color: var(--bg-white);
    color: var(--grid-black);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.drawer-icon-btn:hover {
    background-color: var(--primary-yellow);
    transform: translate(-2px, -2px);
    box-shadow: 2px 2px 0 var(--grid-black);
}

.drawer-icon-btn.drawer-close-btn:hover {
    background-color: var(--primary-red);
    color: #fff;
}

.drawer.maximized {
    width: 100vw !important;
    max-width: 100vw !important;
    border-left: none;
}

.drawer.maximized .drawer-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 56px 40px 80px;
}

.drawer-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0 12px;
}

@media (max-width: 768px) {
    .blog-tabs-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .drawer.maximized .drawer-container {
        padding: 32px 22px 60px;
    }
}
