/* styles.css */
/* VARIABLES */
:root {
    /* Color Palette - Premium Engineering Red */
    --primary-color: #ee1c25;
    --primary-grad: linear-gradient(135deg, #ee1c25 0%, #b3141b 100%);
    --primary-dark: #b3141b;
    --secondary-color: #1a1a1a;
    --secondary-light: #2d2d2d;

    --text-main: #1f1f1f;
    --text-muted: #5a5a5a;
    --white: #ffffff;

    --bg-main: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #121212;

    --border-color: #e2e8f0;

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4.5rem;
    --spacing-xl: 7.5rem;

    /* Layout */
    --container-width: 1240px;
    --border-radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;

    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 25px 60px rgba(0, 0, 0, 0.12);
    --shadow-premium: 0 30px 60px -12px rgba(0, 0, 0, 0.15), 0 18px 36px -18px rgba(0, 0, 0, 0.2);

    /* Transitions Premium */
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* Prevent horizontal scroll from any element */
    max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
.stat-number {
    font-family: var(--font-heading);
    font-weight: 700;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* UTILITIES */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-xl) 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-primary {
    background-color: var(--primary-color);
}

.bg-darker {
    background-color: #121212;
}

.text-white {
    color: var(--white) !important;
}

.text-white-muted {
    color: rgba(255, 255, 255, 0.65) !important;
}

.text-center {
    text-align: center;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 3.5rem;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.section-title span {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    font-weight: 800;
}

.section-title span::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 10px;
    background: var(--primary-color);
    opacity: 0.15;
    z-index: -1;
    border-radius: 4px;
}

.section-desc {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-primary {
    background: var(--primary-grad);
    color: var(--white);
    box-shadow: 0 10px 25px -5px rgba(238, 28, 37, 0.4);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    background: var(--primary-grad);
    filter: brightness(1.1);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 20px 35px rgba(238, 28, 37, 0.35);
}

.btn-primary::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -150%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.1) 40%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0.1) 60%,
            rgba(255, 255, 255, 0) 100%);
    transform: rotate(45deg);
    transition: all 0.7s cubic-bezier(0.19, 1, 0.22, 1);
    opacity: 0;
    pointer-events: none;
}

.btn-primary:hover::after {
    opacity: 1;
    left: 100%;
}

.btn-secondary {
    background-color: var(--white);
    color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* HEADER & NAV */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: var(--transition);
}

.header {
    background-color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    height: 70px;
}

.header.scrolled .header-container {
    height: 70px;
}

.header.scrolled .logo img {
    height: 50px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.mobile-menu-btn {
    display: none;
}

.logo img {
    height: 60px;
    /* Aumentado de 40px para mejor lectura del texto */
}

.nav ul {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.nav-link {
    color: var(--text-main);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--secondary-color);
}

.nav-cta {
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 15px rgba(238, 28, 37, 0.2);
}

.nav-cta:hover {
    box-shadow: 0 8px 20px rgba(238, 28, 37, 0.3);
}

/* HERO SECTION */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: url('../assets/images/hero-new.webp') center/cover no-repeat;
    padding: var(--spacing-lg) 0;
}

@media (max-width: 768px) {
    .hero {
        padding: 6rem 0;
        min-height: auto;
    }
}

.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 1;
}

.relative-z {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title {
    font-size: clamp(2.3rem, 6vw, 4.2rem);
    line-height: 1.05;
    color: var(--white);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.05em;
    font-weight: 900;
    text-wrap: balance;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.hero-title span {
    background: var(--primary-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

.highlight-text {
    color: var(--primary-color);
    display: block;
    margin-top: 0.2em;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--spacing-lg);
    max-width: 750px;
    font-weight: 400;
    line-height: 1.5;
}

.cta-micro-copy {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* STATS */
.stats {
    padding: 2rem 0;
    background: transparent;
    position: relative;
    z-index: 5;
}

@media (max-width: 768px) {
    .stats {
        padding: 1.5rem 0;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.4);
    overflow: hidden;
}

.stat-card {
    padding: 3.5rem 2rem;
    text-align: center;
    transition: var(--transition);
    border-radius: 0;
    background: transparent;
    border: none;
    border-right: 1px solid rgba(238, 28, 37, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stat-card:last-child {
    border-right: none;
}

.stat-card:hover {
    background: rgba(238, 28, 37, 0.03);
    transform: none;
    box-shadow: none;
}

.stat-number {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.04em;
    display: inline-flex;
    align-items: baseline;
}

.stat-number::after {
    display: none;
}

.stat-desc {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.85rem;
    max-width: 90%;
    margin: 0 auto;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.4;
}

/* CAJAS GENERICAS DE GRID (Por qué y Cómo) */
.features-grid,
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

/* INDUSTRIAL SECTION (1x4 Grid) */
.industrial-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.industrial-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: var(--transition);
    height: 100%;
}

.industrial-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
}

.industrial-item:hover .feature-icon {
    background: var(--primary-grad);
    color: var(--white);
    transform: scale(1.1) rotate(5deg);
}

/* VISUAL EVIDENCE MASK REMOVED */
.ticker-wrapper {
    position: relative;
    overflow: hidden;
    padding: 0.5rem 0;
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: ticker-roll 25s linear infinite;
    gap: 20px;
}

.ticker-item {
    flex: 0 0 min(400px, 80vw);
    height: 300px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

@media (max-width: 640px) {
    .ticker-track {
        animation-duration: 18s;
    }

    .ticker-item {
        flex: 0 0 280px;
        height: 230px;
    }
}

.ticker-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9) contrast(1.1);
    transition: var(--transition);
}

.ticker-item:hover img {
    filter: brightness(1);
    transform: scale(1.05);
}

@keyframes ticker-roll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-420px * 7));
    }
}

/* Redefiniendo visual-evidence para usar el ticker consolidado */
.visual-evidence {
    padding: 0;
    background: var(--bg-main);
    overflow: hidden;
}

.industrial-item .feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--bg-light);
    color: var(--secondary-color);
    margin-bottom: var(--spacing-md);
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.industrial-item:hover .feature-icon {
    background: var(--primary-grad);
    color: var(--white);
    transform: translateY(-5px) rotate(8deg);
    box-shadow: 0 10px 20px rgba(238, 28, 37, 0.3);
}

.industrial-item .feature-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

.industrial-item .feature-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
}

@media (max-width: 1024px) {
    .industrial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .industrial-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card,
.step-card {
    padding: var(--spacing-md);
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature-card:hover,
.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon,
.step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: rgba(238, 28, 37, 0.1);
    /* Primary Red with opacity */
    color: var(--primary-color);
    border-radius: 50%;
    margin-bottom: var(--spacing-sm);
}

.feature-title,
.step-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-dark);
}

.feature-desc,
.step-desc {
    color: var(--text-muted);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-lg);
}

.rich-services {
    margin-top: var(--spacing-lg);
}

.service-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-slow);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-premium);
    border-color: rgba(238, 28, 37, 0.2);
}

.service-image-header {
    height: 280px;
    overflow: hidden;
    position: relative;
}

.service-image-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
    z-index: 1;
}

.service-image-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.service-card:hover .service-image-header img {
    transform: scale(1.15);
}

.service-content-body {
    padding: 3rem 2.5rem 2.5rem;
    position: relative;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-icon-floating {
    position: absolute;
    top: -35px;
    right: 2.5rem;
    width: 70px;
    height: 70px;
    background: var(--primary-grad);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(238, 28, 37, 0.3);
    z-index: 10;
    transition: var(--transition);
}

.service-card:hover .service-icon-floating {
    transform: translateY(-10px) rotate(-10deg);
    box-shadow: 0 15px 35px rgba(238, 28, 37, 0.4);
}

.service-title {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    color: var(--secondary-color);
    letter-spacing: -0.03em;
}

.service-text {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.service-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    margin-bottom: var(--spacing-lg);
}

.service-tags li {
    padding: 4px 12px;
    background: var(--bg-main);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.service-link {
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.service-link:hover {
    gap: 12px;
    color: var(--primary-dark);
}

/* ABOUT SECTION (BENTO GRID) */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 24px;
    margin-top: 40px;
}

.bento-item {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: var(--spacing-md);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.bento-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-premium);
}

.bento-main {
    grid-column: span 8;
    grid-row: span 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    padding: var(--spacing-lg);
}

.bento-image {
    grid-column: span 4;
    grid-row: span 2;
    padding: 0;
    background: var(--bg-dark);
}

.bento-image .director-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    mix-blend-mode: luminosity;
    transition: var(--transition);
}

.bento-item:hover .director-img {
    mix-blend-mode: normal;
    transform: scale(1.03);
}

.director-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--spacing-md);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--white);
}

.director-info strong {
    display: block;
    font-size: 1.25rem;
    font-family: var(--font-heading);
}

.director-info span {
    font-size: 0.9rem;
    opacity: 0.8;
}

.bento-feature {
    grid-column: span 4;
    grid-row: span 1;
    display: flex;
    align-items: center;
}

.bento-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 1.5rem 0;
    color: var(--secondary-color);
}

.bento-title span {
    color: var(--primary-color);
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(238, 28, 37, 0.1);
    color: var(--primary-color);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.bento-stats-mini {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.mini-stat {
    display: flex;
    flex-direction: column;
}

.mini-num {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.mini-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.feature-mini {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-mini svg {
    color: var(--primary-color);
}

.feature-mini h4 {
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.feature-mini p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 992px) {
    .bento-main {
        grid-column: span 12;
    }

    .bento-image {
        grid-column: span 6;
        grid-row: span 1;
        padding: 0;
        aspect-ratio: 1;
    }

    .bento-feature {
        grid-column: span 6;
    }
}

@media (max-width: 600px) {

    .bento-image,
    .bento-feature {
        grid-column: span 12;
    }

    .bento-title {
        font-size: 1.75rem;
    }
}

/* SERVICES SECTION REFINEMENT */
.rich-services {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
}

.service-card {
    background: var(--white);
    padding: var(--spacing-sm);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition-slow);
}

.service-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-premium);
    transform: translateY(-10px);
}

.image-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
}

.service-image-header {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
}

.service-image-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.image-card:hover .service-image-header img {
    transform: scale(1.05);
}

.service-content-body {
    padding: var(--spacing-md);
    position: relative;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-icon-floating {
    position: absolute;
    top: -24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(238, 28, 37, 0.3);
    z-index: 2;
}

.service-icon {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.service-title {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-xs);
}

.service-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 1rem 0;
    line-height: 1.6;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2rem;
    padding: 0;
    list-style: none;
}

.service-tags li {
    background: var(--bg-light);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: auto;
    transition: var(--transition);
}

.service-link:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

/* ===========================
   PROJECTS CAROUSEL (Casos de Estudio)
=========================== */
.projects-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg); /* espacio para que las tarjetas no queden cortadas */
}

.projects-track-container {
    overflow: hidden;
    flex: 1;
    min-width: 0;
    padding-bottom: 12px; /* absorbe el shadow inferior de las tarjetas */
    margin-bottom: -12px;
}

.projects-track {
    display: flex;
    gap: 24px;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

.project-card {
    flex: 0 0 calc(33.333% - 16px);
    min-width: 280px;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-premium);
    border-color: rgba(238, 28, 37, 0.2);
}

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.07);
}

.project-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary-grad);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 100px;
}

.project-info {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.project-metrics {
    list-style: none;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.project-metrics li strong {
    color: var(--text-main);
}

/* Los estilos de .case-study-list y .carousel-btn se encuentran unificados en la sección de Proyectos */


.carousel-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.carousel-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

/* Responsive: 2 cards en tablet, 1 en móvil */
@media (max-width: 900px) {
    .project-card {
        flex: 0 0 calc(50% - 12px);
        min-width: 260px;
    }
}


/* CONTACT */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.contact-form-wrapper {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    color: var(--text-main);
}

.form-title {
    margin-bottom: var(--spacing-md);
    color: var(--primary-dark);
}

.form-group {
    margin-bottom: var(--spacing-sm);
}

.form-group label {
    display: block;
    margin-bottom: .5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* WIZARD FORM */
.wizard-header {
    margin-bottom: var(--spacing-md);
}

.wizard-progress {
    height: 6px;
    background-color: var(--bg-main);
    border-radius: 3px;
    margin-bottom: var(--spacing-sm);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.4s ease;
}

.wizard-steps-indicators {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.step-indicator.active {
    color: var(--primary-dark);
}

.radio-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
}

.radio-card {
    cursor: pointer;
    position: relative;
}

.radio-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-sm);
    background-color: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-muted);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

.radio-content svg {
    margin-bottom: var(--spacing-sm);
    color: var(--primary-dark);
    transition: var(--transition);
}

.radio-card:hover .radio-content {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(238, 28, 37, 0.1);
}

.radio-card input:checked+.radio-content {
    border-color: var(--primary-color);
    color: var(--secondary-color);
    background-color: var(--white);
    box-shadow: 0 15px 35px rgba(238, 28, 37, 0.15), 0 0 0 1px var(--primary-color);
    transform: translateY(-8px);
}

.radio-card input:checked+.radio-content::before {
    content: "";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.radio-card input:checked+.radio-content svg {
    transform: scale(1.1);
}

.wizard-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--spacing-md);
}

.dual-actions {
    justify-content: space-between;
}

/* SUCCESS MESSAGE */
.success-message {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.2, 1, 0.3, 1);
}

.success-message.active {
    opacity: 1;
    transform: translateY(0);
}

.success-icon {
    color: #10b981;
    /* Green success color */
    margin-bottom: var(--spacing-md);
    animation: scaleIn 0.5s cubic-bezier(0.2, 1, 0.3, 1.5) forwards;
}

.success-title {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
}

.success-text {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: var(--spacing-xs);
    line-height: 1.6;
}

.success-subtext {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

@keyframes scaleIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* CLIENTS CAROUSEL */
.clients-carousel {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.carousel-container {
    max-width: var(--container-width);
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    padding: 0 var(--spacing-sm);
}

/* Efecto degradado a los bordes - Removido a pedido del cliente */
.carousel-container::before,
.carousel-container::after {
    display: none;
}

.carousel-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: scroll 25s linear infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.carousel-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 250px;
    padding: 0 var(--spacing-md);
    filter: grayscale(100%) opacity(0.6);
    transition: var(--transition);
}

.carousel-logo img {
    max-height: 50px;
    object-fit: contain;
}

.carousel-logo:hover {
    filter: grayscale(0%) opacity(1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-250px * 4));
    }
}

/* FOOTER */
.footer {
    background-color: var(--bg-light);
    color: var(--text-muted);
    padding: 0;
    /* Changed to handle footer-top */
    border-top: 1px solid var(--border-color);
}

.footer-top {
    transform: translateY(-50%);
    margin-bottom: -60px;
    /* Offset the translation */
}

.footer-cta-box {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: var(--spacing-lg) var(--spacing-xl);
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.footer-cta-box h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.footer-cta-box p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: var(--spacing-lg);
    padding: var(--spacing-xl) 0;
    margin-bottom: var(--spacing-lg);
}

.footer-logo {
    height: 40px;
    margin-bottom: var(--spacing-md);
    /* filter retirado para respetar logo a color */
}

.footer-tagline {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    max-width: 320px;
}

.certifications-row {
    display: flex;
    gap: 10px;
    margin-bottom: var(--spacing-md);
}

.certifications-row span {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-main);
    background: var(--white);
    padding: 2px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-transform: uppercase;
}

.footer-heading {
    color: var(--primary-dark);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: 12px;
}

.footer-heading::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 25px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact-list {
    list-style: none;
    padding: 0;
}

.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.footer-contact-list svg {
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 3px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--white);
    border-radius: 50%;
    color: var(--text-muted);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.social-icon:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    padding: var(--spacing-md) 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-legal a:hover {
    color: var(--primary-color);
}

.cert-badges {
    display: flex;
    gap: 15px;
    margin-left: var(--spacing-md);
}

.cert-badges span {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom-flex {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal {
        flex-direction: column;
        gap: 10px;
    }

    .cert-badges {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* MEDIA QUERIES */
@media (max-width: 992px) {
    .bento-item:nth-child(n) {
        grid-column: span 12;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .border-left {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-top: var(--spacing-sm);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        height: 60px;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav {
        display: none;
        /* Hide by default on mobile, handled in JS */
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: var(--spacing-md);
        box-shadow: var(--shadow-sm);
    }

    .nav.active {
        display: block;
    }

    .nav ul {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-cta {
        width: 100%;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
}

/* PROJECTS CAROUSEL (CASE STUDIES) */
.projects-carousel-wrapper {
    position: relative;
    padding: 0 var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
}

.projects-track-container {
    overflow: hidden;
    width: 100%;
    padding-bottom: 12px;
    margin-bottom: -12px;
}

.projects-track {
    display: flex;
    gap: var(--spacing-md);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.project-card {
    min-width: 100%;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    border: 1px solid transparent;
}

.project-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-premium);
    border-color: var(--border-color);
}

@media (min-width: 768px) {
    .project-card {
        min-width: calc(50% - (var(--spacing-md) / 2));
    }
}

@media (min-width: 1200px) {
    .project-card {
        min-width: calc(33.333% - (var(--spacing-md) * 2 / 3));
    }
}

.project-image {
    height: 250px;
    position: relative;
    background-color: var(--bg-main);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.project-info {
    padding: var(--spacing-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-title {
    font-size: 1.25rem;
    color: var(--primary-dark);
}

.project-metrics {
    list-style: none;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.case-study-content {
    background: var(--bg-light);
    padding: 1.25rem;
    border-radius: 12px;
    font-size: 0.875rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.case-study-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.case-study-list li {
    position: relative;
    padding-left: 18px;
    line-height: 1.5;
    color: var(--text-main);
    font-weight: 400;
}

.case-study-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 1px;
    opacity: 0.8;
}

.carousel-btn {
    background: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    z-index: 10;
    position: absolute;
    transition: var(--transition);
}

.carousel-btn:hover {
    background: var(--primary-color);
    color: white;
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.prev-btn {
    left: -10px;
}

.next-btn {
    right: -10px;
}

/* VISUAL EVIDENCE GALLERY */
.visual-evidence {
    padding-bottom: var(--spacing-lg);
}

/* VISUAL EVIDENCE GALLERY */
/* VISUAL EVIDENCE INFINITE TICKER */
.visual-evidence {
    padding: 100px 0;
    background-color: var(--white);
    overflow: hidden;
    position: relative;
    /* Degradados removidos a solicitud */
}

.visual-evidence::before,
.visual-evidence::after {
    display: none;
}

.ticker-wrapper {
    display: flex;
    width: 100%;
}

.ticker-track {
    display: flex;
    gap: 40px;
    animation: ticker-scroll 80s linear infinite;
    width: max-content;
    padding-left: 40px;
}

.ticker-track:hover {
    animation-play-state: paused;
}

.gallery-item {
    flex: 0 0 600px;
    height: 400px;
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay-tag {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(238, 28, 37, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .gallery-item {
        flex: 0 0 320px;
        height: 280px;
        border-radius: 20px;
    }

    .ticker-track {
        animation-duration: 40s;
        gap: 20px;
    }
}

/* Removed obsolete founder section in favor of Bento Grid */

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(1, 1fr);
        grid-template-rows: auto;
        height: auto;
        gap: 16px;
    }

    .gallery-item {
        height: 350px;
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    .video-item {
        order: -1;
        /* Video first on mobile for engagement */
    }
}

/* TESTIMONIALS */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-md);
}

.testimonial-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.quote-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    opacity: 0.1;
}

.testimonial-text {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.author-name {
    display: block;
    font-weight: 700;
    color: var(--primary-dark);
}

.author-role {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ACCESSIBILITY & UTILITIES */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* REVEAL ANIMATIONS */
.reveal {
    position: relative;
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.2, 0, 0, 1);
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.active.reveal {
    opacity: 1 !important;
    transform: translate(0, 0) !important;
}

/* Delay Utilites */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

.delay-400 {
    transition-delay: 0.4s;
}

/* CURSOR TRAILER */
#cursor-trailer {
    height: 30px;
    width: 30px;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 500ms ease, transform 300ms cubic-bezier(0.2, 1, 0.3, 1);
    mix-blend-mode: soft-light;
    filter: blur(8px);
}

body:hover #cursor-trailer {
    opacity: 0.4;
}

#cursor-trailer.hovering {
    transform: scale(2.5);
    background-color: var(--secondary-color);
    mix-blend-mode: overlay;
    opacity: 0.15;
}

@media (max-width: 1024px) {
    #cursor-trailer {
        display: none !important;
    }
}

/* TRUST SHIELD & CREDIBILITY */
.shield-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.shield-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.s-feature {
    display: flex;
    gap: 15px;
}

.s-icon {
    color: var(--primary-color);
    flex-shrink: 0;
}

.s-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--white);
}

.s-text p {
    font-size: 0.9rem;
    opacity: 0.7;
    line-height: 1.4;
}

.authority-badge {
    background: var(--primary-grad);
    padding: var(--spacing-md);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 320px;
    margin: 0 auto;
    transition: var(--transition-slow);
}

.authority-badge:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 40px 80px rgba(238, 28, 37, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.badge-item span {
    display: block;
}

.badge-year {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    opacity: 0.9;
}

.badge-exp {
    font-size: clamp(2rem, 3.2vw, 3.2rem); /* se adapta al ancho disponible */
    font-weight: 900;
    line-height: 1;
    font-family: var(--font-heading);
    margin-bottom: 5px;
    white-space: nowrap; /* fuerza una sola línea */
}

.badge-label {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.8;
}

@media (max-width: 992px) {
    .shield-grid {
        grid-template-columns: 1fr;
    }

    .shield-features {
        grid-template-columns: 1fr;
    }

    .authority-badge {
        margin-top: var(--spacing-md);
    }
}

/* BENTO GRID FOUNDER */
.bento-grid {
    display: grid;
    grid-template-columns: 1.4fr 1.6fr 1fr;
    grid-auto-rows: minmax(130px, auto);
    gap: var(--spacing-md);
    margin-top: calc(var(--spacing-md) * 1.5);
}

/* ==========================================================================
   FOUNDER SECTION (Split-Screen)
   ========================================================================== */
.founder-section {
    padding: var(--spacing-xl) 0;
    overflow: hidden;
}

.founder-section .section-header {
    text-align: left;
    max-width: 800px;
    margin-left: 0;
    margin-bottom: var(--spacing-lg);
}

.founder-content {
    display: grid;
    grid-template-columns: 2.5fr 7fr; /* Columna izquierda más angosta ahora que la foto es menor */
    gap: var(--spacing-xl);
    align-items: center;
}

/* Left: Visual */
.founder-visual {
    background: var(--white);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-slow);
    max-width: 294px; /* 70% de 420px */
    margin: 0 auto;
}

.founder-visual:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.founder-img {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: var(--radius-sm);
    display: block;
    object-fit: cover;
    object-position: center 15%;
    /* Adjusts focus onto the face to avoid cutting forehead/chin */
}

.founder-info {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.founder-info h3 {
    font-size: 1.4rem;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.founder-info p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* Right: Content */
.founder-text {
    display: flex;
    flex-direction: column;
}

.founder-stats {
    display: flex;
    gap: 3rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.founder-stats .stat-item {
    display: flex;
    flex-direction: column;
}

.founder-stats .stat-val {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--primary-color);
    line-height: 1;
    letter-spacing: -0.02em;
}

.founder-stats .stat-lbl {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

.founder-quote {
    margin-bottom: 3rem;
    position: relative;
}

.founder-quote .quote-icon {
    position: absolute;
    top: -15px;
    left: -20px;
    color: var(--border-color);
    opacity: 0.5;
    z-index: 0;
    width: 60px;
    height: 60px;
}

.founder-quote blockquote {
    position: relative;
    z-index: 1;
    font-size: 1.7rem;
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--secondary-color);
    line-height: 1.4;
    letter-spacing: -0.02em;
    margin: 0;
}

.founder-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(238, 28, 37, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
}

.founder-message .message-title {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1.2rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.founder-message p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

.founder-message p strong {
    color: var(--text-main);
    font-weight: 600;
}

@media (max-width: 1024px) {
    .founder-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    /* En columna única, la tarjeta tiene todo el ancho disponible:
       280px es equilibrado — no enorme, no miniatura */
    .founder-visual {
        max-width: 280px;
        margin: 0 auto;
    }

    .founder-img {
        object-position: center 10%; /* centra la cara sin cortarla */
    }
}

@media (max-width: 768px) {
    .founder-section {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }

    .founder-section .section-header {
        text-align: center;
        max-width: 100%;
    }

    .founder-stats {
        justify-content: center;
        gap: 2rem;
    }

    .founder-quote blockquote {
        font-size: 1.4rem;
    }

    .founder-message .message-title {
        font-size: 1.5rem;
    }
}


/* WHATSAPP BUTTON */
.whatsapp-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    /* Ensure it's on top of footer or carousel */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    color: white;
}

@media (max-width: 768px) {
    .whatsapp-btn {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
    }

    .whatsapp-btn svg {
        width: 24px;
        height: 24px;
    }
}

/* ==========================================================================
   MOBILE UX/UI OPTIMIZATIONS 
   ========================================================================== */
@media (max-width: 768px) {

    /* 1. Soluciones Integrales */
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .service-content-body {
        padding: 2.5rem 1.5rem 1.5rem !important;
    }

    .service-title {
        font-size: 1.5rem !important;
    }

    /* 2. Casos de Estudio (Carrusel) — scroll nativo en móvil */
    .projects {
        overflow-x: hidden !important;
    }

    .projects .container {
        padding: 0 var(--spacing-sm) !important;
        max-width: 100% !important;
    }

    .projects-carousel-wrapper {
        margin: 0 calc(-1 * var(--spacing-sm)) !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .projects-track-container {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .projects-track-container::-webkit-scrollbar {
        display: none;
    }

    .carousel-btn {
        display: none !important;
    }

    .projects-track {
        width: max-content !important;
        transform: none !important;
        gap: 1rem !important;
    }

    .project-card {
        flex: 0 0 80vw !important;
        min-width: unset !important;
        width: auto !important;
        scroll-snap-align: start;
        border-radius: 12px !important;
        box-shadow: var(--shadow-sm) !important;
    }

    .project-image {
        height: 200px !important;
    }

    .project-info {
        padding: 1.25rem !important;
    }

    /* 3. Cotizador Interactivo */
    /* Evitamos el colapso de texto ("1. Requerimientos2. Detalles") */
    .wizard-steps-indicators {
        display: flex;
        flex-wrap: wrap;
        gap: 0.8rem;
        justify-content: flex-start;
        margin-bottom: 0.5rem;
    }

    .step-indicator {
        font-size: 0.85rem;
    }

    /* Aire para inputs, selects y textarea */
    .select-wrapper {
        margin-bottom: 1rem;
    }

    .contact-form textarea {
        width: 100%;
        min-height: 120px;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    /* Botones de acción anchos para fácil touch */
    .wizard-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        margin-top: 1rem;
    }

    .wizard-actions button.btn {
        width: 100%;
        margin: 0;
    }
}