/* ==========================================================================
   CSS Variables & Theming - Editorial Premium Dark Purple
   ========================================================================== */
:root {
    /* Colors */
    --clr-bg: #000000;
    --clr-surface: #0a0a0a;
    --clr-surface-light: #141414;
    --clr-surface-border: #2a2a2a;

    --clr-primary: #8b5cf6;
    /* Elegant vibrant purple */
    --clr-primary-glow: rgba(139, 92, 246, 0.4);
    --clr-secondary: #a78bfa;
    /* Light purple for hover/accents */

    --clr-text: #ffffff;
    --clr-text-muted: #999999;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Animation */
    --transition: all 0.4s ease-out;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    overflow-x: hidden;
    max-width: 100%;
}

@media (max-width: 992px) {
    html {
        scroll-padding-top: calc(8.75rem + env(safe-area-inset-top, 0px));
    }

    .navbar {
        background: rgba(0, 0, 0, 0.82);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
    }

    .logo {
        flex: 1;
        min-width: 0;
    }

    .logo-img {
        height: 40px;
    }

    .logo-title {
        font-size: clamp(0.72rem, 2.8vw, 1.1rem);
        letter-spacing: 0.5px;
        line-height: 1.2;
    }

    .logo-subtitle {
        font-size: clamp(0.55rem, 1.8vw, 0.65rem);
        letter-spacing: 2px;
    }
}

body {
    font-family: var(--font-body);
    background-color: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul {
    list-style: none;
}

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

.section {
    padding: 6rem 0;
    position: relative;
    z-index: 10;
}

.dark-section {
    background: linear-gradient(to bottom, transparent, rgba(139, 92, 246, 0.03), transparent);
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1,
h2,
h3,
h4,
.logo-title {
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: 0.5px;
}

h1 span,
h2 span {
    color: var(--clr-primary);
}

.section-header {
    margin-bottom: 5rem;
    position: relative;
    padding-bottom: 1.5rem;
}

.section-title {
    font-size: 2.75rem;
    margin-bottom: 1rem;
    color: var(--clr-text);
}

.section-subtitle {
    color: var(--clr-text-muted);
    font-size: 1.125rem;
    font-weight: 300;
}

h1,
h2,
h3,
h4 {
    line-height: 1.2;
    font-weight: 400;
}

h1 span,
h2 span {
    color: var(--clr-primary);
    background: none;
    -webkit-text-fill-color: var(--clr-primary);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--clr-text-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 0;
    /* Sharp edges for professional look */
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--clr-primary);
    color: var(--clr-bg);
}

.btn-primary:hover {
    background: var(--clr-secondary);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--clr-text);
    border: 1px solid var(--clr-surface-border);
}

.btn-outline:hover {
    background: var(--clr-surface-light);
    border-color: var(--clr-primary);
    transform: translateY(-2px);
}

.w-100 {
    width: 100%;
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1100;
    transition: var(--transition);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--clr-surface-border);
}

.navbar.scrolled {
    background: var(--clr-bg);
    padding: 1rem 0;
    border-bottom: 1px solid var(--clr-surface-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    min-height: 48px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex: 0 1 auto;
}

.logo-icon {
    font-size: 2rem;
    color: var(--clr-primary);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.15rem;
    line-height: 1.1;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.logo-subtitle {
    font-size: 0.65rem;
    color: var(--clr-text-muted);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: var(--font-body);
    white-space: nowrap;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    font-weight: 400;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--clr-text-muted);
    position: relative;
    white-space: nowrap;
}

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

.nav-link.active {
    color: var(--clr-primary);
}

.btn-contact {
    background: transparent;
    border: 1px solid var(--clr-primary);
    color: var(--clr-primary) !important;
    padding: 0.5rem 1.5rem;
    border-radius: 0;
}

.btn-contact:hover {
    background: var(--clr-primary);
    color: var(--clr-bg) !important;
}

.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    font-size: 1.35rem;
    color: var(--clr-text);
    cursor: pointer;
    flex-shrink: 0;
    border: 1px solid var(--clr-surface-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.45);
}

.mobile-menu-btn:focus-visible {
    outline: 2px solid var(--clr-primary);
    outline-offset: 2px;
}

.mobile-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.mobile-nav-backdrop.is-visible {
    display: block;
}

body.menu-open {
    overflow: hidden;
    touch-action: none;
}

/* ==========================================================================
   Hero Section & Overlays (Editorial)
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
    position: relative;
    z-index: 10;
    overflow: hidden;
    text-align: center;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('../img/hero-estudio.png');
    background-size: cover;
    background-position: center;
    filter: grayscale(100%);
}

.hero-bg-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.hero-container {
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.5rem;
}

.hero-subtitle-top {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--clr-primary);
    margin-bottom: 2rem;
    display: block;
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: 2rem;
    line-height: 1.1;
    color: #ffffff;
}

.hero-desc {
    font-size: 1.15rem;
    color: #cccccc;
    margin-bottom: 3rem;
    max-width: 800px;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* ==========================================================================
   About Us Section
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.image-rounded {
    border-radius: 0;
    width: 100%;
}

.shadow-gold {
    box-shadow: -15px 15px 0 0 rgba(139, 92, 246, 0.15);
}

.about-text {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--clr-text-muted);
}

.stats-container {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    border-top: 1px solid var(--clr-surface-border);
    padding-top: 2rem;
}

.stat-item {
    flex: 1;
}

.stat-number {
    font-size: 2.5rem;
    color: var(--clr-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--clr-text-muted);
    font-weight: 500;
}

/* ==========================================================================
   Features / Metodologia Section
   ========================================================================== */
.features-section {
    position: relative;
    background-image: linear-gradient(rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.95)), url('https://images.unsplash.com/photo-1603796846097-bee99e4a601f?auto=format&fit=crop&q=80&w=2000');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

.features-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    /* Darker overlay for images */
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.feature-card {
    background: transparent;
    border: 1px solid var(--clr-surface-border);
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--clr-primary);
}

.feature-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: rgba(139, 92, 246, 0.2);
    line-height: 1;
    margin-bottom: -1rem;
    text-align: left;
}

.feature-card h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
    color: var(--clr-text);
}

.feature-card p {
    color: var(--clr-text-muted);
    font-weight: 300;
}

/* ==========================================================================
   Services Grid (Editorial)
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.services-grid--areas {
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .services-grid--areas {
        grid-template-columns: repeat(2, 1fr);
    }
}

.service-card {
    padding: 2rem;
    border: 1px solid var(--clr-surface-border);
    transition: var(--transition);
    position: relative;
    background: transparent;
}

.service-card:hover {
    border-color: var(--clr-primary);
    transform: translateY(-5px);
}

.service-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--clr-secondary);
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    margin-bottom: 1.25rem;
}

.service-title {
    font-size: 1.35rem;
    font-weight: 600;
    font-family: var(--font-display);
    font-style: italic;
    color: var(--clr-text);
    margin-bottom: 1rem;
    margin-top: 0;
    letter-spacing: 0.02em;
    position: relative;
    padding-bottom: 0;
}

.service-title::after {
    display: none;
}

/* Specific styling for the highlighted card to maintain contrast */
.service-card.highlight-card .service-title {
    color: var(--clr-text);
}

.service-card.highlight-card {
    border-color: rgba(139, 92, 246, 0.4);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, transparent 100%);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.05);
}

.service-card.highlight-card .feature-number {
    color: rgba(139, 92, 246, 0.4);
}

.service-desc {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.65;
}

/* ==========================================================================
   Testimonials Section
   ========================================================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-surface-border);
    border-radius: 1rem;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stars {
    color: var(--clr-primary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    display: flex;
    gap: 0.25rem;
}

.testimonial-text {
    font-size: 1.05rem;
    color: var(--clr-text-muted);
    font-style: italic;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.testimonial-card hr {
    border: none;
    border-top: 1px solid var(--clr-surface-border);
    margin-bottom: 1.5rem;
}

.client-name {
    font-size: 1.2rem;
    color: var(--clr-text);
    margin-bottom: 0.25rem;
}

.client-case {
    font-size: 0.85rem;
    color: var(--clr-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   FAQ Section (Accordion)
   ========================================================================== */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--clr-surface);
    border: 1px solid var(--clr-surface-border);
    border-radius: 0.5rem;
    border-left: 4px solid var(--clr-primary);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: rgba(139, 92, 246, 0.3);
}

.faq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    background: transparent;
    transition: background 0.3s;
}

.faq-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.faq-question {
    font-size: 1.15rem;
    color: var(--clr-text);
    padding-right: 1rem;
}

.faq-icon {
    font-size: 1rem;
    color: var(--clr-primary);
    transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.faq-answer {
    color: var(--clr-text-muted);
    font-size: 1rem;
    padding: 0 1.5rem 1.5rem 1.5rem;
    line-height: 1.7;
}



/* ==========================================================================
   Team Section (Editorial)
   ========================================================================== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    align-items: start;
}

.team-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-surface-border);
    border-radius: 1rem;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    border-color: var(--clr-primary);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.12);
}

.lawyer-avatar {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    position: relative;
}

.team-card:hover .lawyer-avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(139, 92, 246, 0.15), transparent 50%);
}

.lawyer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(20%);
    transition: var(--transition);
}

.team-card:hover .lawyer-avatar img {
    filter: grayscale(0%);
    transform: scale(1.03);
}

.lawyer-avatar--aguero img,
.lawyer-photo--aguero {
    object-position: 50% 18%;
}

.team-card--aguero:hover .lawyer-avatar img,
.team-card--aguero:hover .lawyer-photo--aguero {
    transform: scale(1.03);
}

.team-card-info {
    padding: 1.5rem 1.25rem 2rem;
    text-align: center;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border-top: 3px solid var(--clr-primary);
}

.lawyer-name {
    font-size: 1.2rem;
    margin-bottom: 0;
    padding-bottom: 1rem;
    min-height: 2.4em;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-bottom: 1px solid var(--clr-surface-border);
}

.lawyer-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding-top: 1rem;
    min-height: 3.5em;
    align-content: flex-start;
}

.tag {
    font-size: 0.75rem;
    padding: 0.35rem 1rem;
    min-width: 110px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--clr-surface-border);
    border-radius: 9999px;
    color: var(--clr-text-muted);
    transition: var(--transition);
    white-space: nowrap;
}

.team-card:hover .tag {
    background: rgba(139, 92, 246, 0.1);
    color: var(--clr-secondary);
    border-color: rgba(139, 92, 246, 0.3);
}

.tag--wide {
    white-space: normal;
    min-width: 0;
    line-height: 1.3;
}

.team-card--aguero .team-card-info {
    text-align: left;
    align-items: stretch;
    padding-bottom: 1.5rem;
}

.lawyer-areas-panel {
    width: 100%;
    margin-top: 1rem;
}

.lawyer-areas-unfold {
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--clr-surface-border);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lawyer-areas-unfold:hover {
    border-color: rgba(139, 92, 246, 0.35);
}

.lawyer-areas-unfold[open] {
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.1);
}

.lawyer-areas-unfold__trigger {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.8rem 0.85rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.lawyer-areas-unfold__trigger::-webkit-details-marker {
    display: none;
}

.lawyer-areas-unfold__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--clr-secondary);
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.lawyer-areas-unfold__label {
    flex: 1;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--clr-text);
    text-align: left;
}

.lawyer-areas-unfold__chevron {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--clr-text-muted);
    transition: transform 0.25s ease, color 0.2s ease;
}

.lawyer-areas-unfold[open] .lawyer-areas-unfold__chevron {
    transform: rotate(180deg);
    color: var(--clr-primary);
}

.lawyer-areas-unfold__content {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0 0.65rem 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lawyer-area-card {
    border-radius: 0.55rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.65rem 0.7rem;
}

.lawyer-area-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.45rem;
}

.lawyer-area-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--clr-secondary);
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.lawyer-area-icon--art {
    color: #a3be8c;
    background: rgba(163, 190, 140, 0.15);
    border-color: rgba(163, 190, 140, 0.3);
}

.lawyer-area-icon--penal {
    color: #b0b8c4;
    background: rgba(176, 184, 196, 0.12);
    border-color: rgba(176, 184, 196, 0.25);
}

.lawyer-area-icon--civil {
    color: #c9a86c;
    background: rgba(201, 168, 108, 0.12);
    border-color: rgba(201, 168, 108, 0.3);
}

.lawyer-area-title {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--clr-text);
    line-height: 1.3;
    text-align: left;
}

.lawyer-area-desc {
    font-size: 0.72rem;
    line-height: 1.55;
    color: var(--clr-text-muted);
    margin: 0;
    padding-left: calc(30px + 0.6rem);
    text-align: left;
}

/* Logo image in header/footer */
.logo-img {
    height: 45px;
    width: auto;
    display: block;
}

.footer-logo .logo-img {
    height: 50px;
}

/* ==========================================================================
   Contacto Section
   ========================================================================== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--clr-text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-list i {
    width: 50px;
    height: 50px;
    background: rgba(139, 92, 246, 0.1);
    color: var(--clr-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
}

.contact-list div strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.contact-list div span {
    color: var(--clr-text-muted);
}

.contact-list div span a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contact-list div span a:hover {
    color: var(--clr-text);
}

/* ==========================================================================
   Proyectos / Casos (tipo blog)
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.22);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 92, 246, 0.45);
}

.project-cover {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-body {
    padding: 1.25rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-title {
    font-size: 1.3rem;
    line-height: 1.2;
}

.project-excerpt {
    color: var(--clr-text-muted);
    font-weight: 300;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.project-pill {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
}

.project-pill.primary {
    border-color: rgba(139, 92, 246, 0.45);
    color: var(--clr-secondary);
}

.project-detail {
    margin-top: 2rem;
    padding: 1.75rem;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.project-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: var(--clr-text);
    padding: 0.7rem 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.project-back:hover {
    border-color: rgba(139, 92, 246, 0.45);
    background: rgba(139, 92, 246, 0.15);
}

.project-hero {
    margin-top: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
    aspect-ratio: 16 / 7;
}

.project-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-meta {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.project-content {
    margin-top: 1.25rem;
}

.project-content p {
    margin: 0 0 1rem 0;
}

.project-gallery {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .project-detail {
        padding: 1.25rem;
    }
    .project-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

.project-gallery img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.projects-cta {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.cases-page-hero {
    padding-top: 9.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--clr-text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--clr-surface-border);
    border-radius: 0.5rem;
    color: var(--clr-text);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
    background: rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Blog / Noticias Section
   ========================================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

.blog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 25px 50px rgba(139, 92, 246, 0.12);
}

.blog-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.blog-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-cover img {
    transform: scale(1.05);
}

.blog-cover--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(139, 92, 246, 0.25);
}

.blog-body {
    padding: 1.25rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.blog-title {
    font-size: 1.2rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-excerpt {
    color: var(--clr-text-muted);
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.blog-pill {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
}

.blog-pill.primary {
    border-color: rgba(139, 92, 246, 0.45);
    color: var(--clr-secondary);
}

.blog-author {
    font-size: 0.8rem;
    color: var(--clr-text-muted);
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.blog-author i {
    color: var(--clr-primary);
    margin-right: 4px;
}

.blog-cta {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}

.blog-detail {
    margin-top: 2rem;
    padding: 1.75rem;
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 1rem;
}

.blog-detail-title {
    font-size: 2.25rem;
    margin-top: 1.25rem;
    line-height: 1.2;
    color: var(--clr-text);
}

@media (max-width: 768px) {
    .blog-detail {
        padding: 1.25rem;
    }
    .blog-detail-title {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    border-top: 1px solid var(--clr-surface-border);
    padding: 3rem 0;
    background: var(--clr-surface);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-logo .logo-icon {
    font-size: 2.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    color: var(--clr-text-muted);
    font-size: 0.9rem;
}

.footer-credit {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 300;
    color: var(--clr-text-muted);
}

.footer-credit a {
    color: var(--clr-text-muted);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: var(--transition);
}

.footer-credit a:hover {
    color: var(--clr-primary);
}

/* ==========================================================================
   Floating WhatsApp Button
   ========================================================================== */
.floating-whatsapp {
    position: fixed;
    z-index: 1000;
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    right: max(1rem, env(safe-area-inset-right, 0px));
    left: auto;
    width: 56px;
    height: 56px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.85rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: background 0.25s ease, box-shadow 0.25s ease;
    box-sizing: border-box;
    /* Evita que el hover con scale desborde y genere scroll horizontal */
    transform: translateZ(0);
}

@media (hover: hover) and (pointer: fine) {
    .floating-whatsapp:hover {
        transform: scale(1.06) translateY(-3px);
        background: #1ebc59;
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    }
}

.floating-whatsapp:active {
    transform: scale(0.98);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================================================
   Call to Action (CTA) Section
   ========================================================================== */
.cta-section {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, var(--clr-surface) 50%, rgba(139, 92, 246, 0.03) 100%);
}

.cta-content {
    padding: 5rem 3rem;
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06) 0%, transparent 100%);
    text-align: center;
}

.cta-title {
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
}

.cta-subtitle {
    margin-bottom: 2.5rem;
    max-width: 650px;
    color: var(--clr-text-muted);
    margin-left: auto;
    margin-right: auto;
    font-size: 1.05rem;
    line-height: 1.8;
}

.btn-cta {
    font-size: 1.1rem;
    padding: 1.1rem 2.5rem;
    border-radius: 0.5rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    /* Header fijo: aire bajo la barra para que no tape el hero */
    .hero {
        padding-top: calc(8.75rem + env(safe-area-inset-top, 0px));
        align-items: flex-start;
        justify-content: flex-start;
        padding-bottom: 3rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
        padding-top: 0.75rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-desc {
        margin: 0 auto 2.5rem auto;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

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

    .contact-list {
        align-items: center;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-menu {
        position: static;
    }

    .nav-list {
        position: fixed;
        top: 5.5rem;
        left: -100%;
        width: 100%;
        max-width: none;
        height: calc(100vh - 5.5rem);
        height: calc(100dvh - 5.5rem);
        min-height: 0;
        margin: 0;
        padding: 1.25rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        row-gap: 0.35rem;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        background: linear-gradient(180deg, rgba(12, 12, 12, 0.99) 0%, rgba(5, 5, 5, 0.99) 100%);
        border-top: 1px solid rgba(139, 92, 246, 0.2);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
        transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1;
    }

    .nav-list.active {
        left: 0;
    }

    .nav-list li {
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
    }

    .nav-list .nav-link {
        display: block;
        padding: 1rem 1rem;
        font-size: 1rem;
        letter-spacing: 1px;
        text-align: center;
        border-radius: 8px;
    }

    .nav-list .nav-link:not(.btn-contact):hover,
    .nav-list .nav-link:not(.btn-contact):focus-visible {
        background: rgba(139, 92, 246, 0.12);
        color: var(--clr-text);
    }

    .nav-list .btn-contact {
        margin-top: 0.75rem;
        padding: 0.85rem 1.5rem;
        width: 100%;
        text-align: center;
    }

    .navbar.menu-open {
        border-bottom-color: rgba(139, 92, 246, 0.25);
    }
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: calc(10.5rem + env(safe-area-inset-top, 0px));
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .section {
        padding: 4rem 0;
    }

    /* Hero = una pantalla móvil completa, con más aire bajo el header */
    .hero {
        min-height: 100vh;
        min-height: 100svh;
        min-height: 100dvh;
        padding-top: calc(10.25rem + env(safe-area-inset-top, 0px));
        padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    .hero-container {
        padding-top: 1.25rem;
        gap: clamp(1.25rem, 4vw, 2rem);
        width: 100%;
        max-width: 100%;
        flex: 1;
        justify-content: center;
    }

    .hero-subtitle-top {
        margin-bottom: clamp(1rem, 3vw, 1.5rem);
    }

    .hero-title {
        font-size: clamp(1.85rem, 7vw, 2.5rem);
        margin-bottom: clamp(1rem, 3vw, 1.5rem);
    }

    .hero-desc {
        font-size: 1rem;
        margin-bottom: clamp(1.5rem, 4vw, 2rem);
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
    }

    .glass-orb {
        width: 250px;
        height: 250px;
    }

    .icon-hero {
        font-size: 6rem;
    }

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

    .stats-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .service-title {
        font-size: 1.3rem;
        padding-bottom: 1rem;
    }

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

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

    .team-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
        gap: 1.5rem;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

    .cta-content {
        padding: 2.5rem 1.25rem;
    }

    .cta-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .floating-whatsapp {
        width: 52px;
        height: 52px;
        font-size: 1.7rem;
    }

    .features-section {
        background-attachment: scroll;
    }
}