/* Fuentes personalizadas */
@font-face {
    font-family: 'RethinkSans';
    src: url('../fonts/static/RethinkSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'RethinkSans';
    src: url('../fonts/static/RethinkSans-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'RethinkSans';
    src: url('../fonts/static/RethinkSans-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'RethinkSans';
    src: url('../fonts/static/RethinkSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Preload de fuente principal */
body {
    font-family: 'RethinkSans', 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    margin: 0;
    padding: 0;
    background-color: #0E0E11;
    color: #fff;
}

/* Asegurar que todos los elementos usen RethinkSans */
* {
    font-family: inherit;
}

/* ============================================
   Variables CSS - Sistema de Sombras y Transiciones
   ============================================ */
:root {
    /* Sombras sutiles - Sistema de profundidad */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.35), 0 6px 20px rgba(0, 0, 0, 0.3);
    
    /* Sombras hover */
    --shadow-hover-sm: 0 4px 12px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.2);
    --shadow-hover-md: 0 8px 20px rgba(0, 0, 0, 0.3), 0 4px 10px rgba(0, 0, 0, 0.25);
    --shadow-hover-lg: 0 12px 32px rgba(0, 0, 0, 0.35), 0 6px 16px rgba(0, 0, 0, 0.3);
    
    /* Sombras claras para fondos oscuros */
    --shadow-light-sm: 0 2px 8px rgba(255, 255, 255, 0.06), 0 1px 3px rgba(255, 255, 255, 0.04);
    --shadow-light-md: 0 4px 16px rgba(255, 255, 255, 0.08), 0 2px 8px rgba(255, 255, 255, 0.06);
    --shadow-light-hover: 0 8px 20px rgba(255, 255, 255, 0.1), 0 4px 10px rgba(255, 255, 255, 0.08);
    
    /* Transiciones estándar */
    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    /* Elevación hover */
    --lift-sm: -2px;
    --lift-md: -4px;
    --lift-lg: -6px;
}


/* Splash Screen Styles */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.splash-content {
    text-align: center;
    color: white;
    transform: translateY(-10vh);
}

.splash-logo {
    max-width: 200px;
    height: auto;
    margin-top: 2rem;
    animation: fadeInUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content {
    min-height: 100vh;
}

/* Navbar Styles */
.navbar {
    transition: transform var(--transition-base), background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Navbar brand: transición para ocultarse al abrir el menú */
.navbar-brand-container {
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.navbar.navbar-hidden {
    transform: translateY(-100%);
}

/* Navbar transparente sin gradiente */
.navbar-transparent {
    background: transparent !important;
    border-bottom: none;
    padding-top: 15px;
    padding-bottom: 25px;
    z-index: 1000;
}

/* Iconos de redes sociales en navbar */
.navbar-social {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-icon {
    color: #ffffff;
    font-size: 1.2rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    text-decoration: none;
}

.social-icon:hover {
    color: #cccccc;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(var(--lift-sm));
    box-shadow: var(--shadow-xs);
}

.navbar-brand-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.navbar-brand {
    margin: 0 !important;
    outline: none !important;
    border: none !important;
    background: transparent !important;
}

.navbar-brand:focus,
.navbar-brand:active,
.navbar-brand:hover {
    outline: none !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.navbar-brand img {
    height: 25px;
    border: none !important;
    outline: none !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 10px;
    transition: all var(--transition-base);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: #cccccc !important;
    transform: translateY(var(--lift-sm));
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 1px;
    background: #cccccc;
    transition: transform var(--transition-base);
}

.navbar-nav .nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 0;
    z-index: 1;
}

/* Degradado del navbar - se oculta junto con el navbar */
.hero-section::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 10vh;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.7) 20%,
        rgba(0, 0, 0, 0.5) 40%,
        rgba(0, 0, 0, 0.2) 70%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1001;
    opacity: 1;
    transition: opacity var(--transition-base);
}

/* Ocultar degradado cuando navbar está oculto */
.navbar-hidden ~ main .hero-section::before,
body.navbar-gradient-hidden .hero-section::before {
    opacity: 0;
}

/* Degradado sutil en todos los bordes del hero */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.15) 100%),
        linear-gradient(to top, rgba(0, 0, 0, 0.2) 0%, transparent 8%),
        linear-gradient(to right, rgba(0, 0, 0, 0.15) 0%, transparent 6%),
        linear-gradient(to left, rgba(0, 0, 0, 0.15) 0%, transparent 6%);
    pointer-events: none;
    z-index: 2;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.hero-title {
    font-family: 'RethinkSans', serif;
    font-size: 4rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: white;
    color: black;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    z-index: 1000;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #f0f0f0;
    color: black;
    transform: translateY(var(--lift-sm)) scale(1.05);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

/* Sección Quienes Somos - Home */
#quienes-somos {
    height: 100vh;
    display: flex;
    align-items: center;
    background-color: #0E0E11;
    padding: 90px 0 60px;
    position: relative;
    overflow: hidden;
}

/* Luz ambiental sutil de fondo */
#quienes-somos::after {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 55%;
    height: 120%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.025) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

#quienes-somos .container {
    position: relative;
    z-index: 1;
}

/* Bloque de texto */
.qs-text-block {
    padding-right: 3rem;
}

/* Línea decorativa antes del título */
.qs-text-block .section-title {
    text-align: left;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
    line-height: 1.1;
    position: relative;
    padding-top: 1.75rem;
}

.qs-text-block .section-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2.5rem;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
}

.qs-text-block p {
    color: #bbbbbb;
    font-size: 1rem;
    line-height: 1.85;
    margin-bottom: 1.1rem;
    text-align: left;
}

.qs-text-block p:last-of-type {
    margin-bottom: 0;
}

/* Párrafo destacado - cita de cierre */
.qs-highlight {
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    padding-left: 1.25rem;
    margin-top: 1.5rem !important;
    color: #d8d8d8 !important;
    font-size: 0.95rem !important;
}

/* Bloque de imagen */
.qs-image-block {
    position: relative;
}

/* Marco offset decorativo detrás de la imagen */
.qs-image-block::before {
    content: '';
    position: absolute;
    inset: 12px -12px -12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 24px;
    z-index: 0;
}

.qs-image-block img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 560px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
    display: block;
}

.qs-image-block img:hover {
    transform: scale(1.015);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.65);
}

#servicios {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0E0E11;
    padding: 0;
}

#portfolio {
    padding: 80px 0;
    min-height: auto;
    background-color: #0E0E11;
}

.section-content {
    text-align: center;
    width: 100%;
}

.section-title {
    font-family: 'RethinkSans', serif;
    font-size: 3rem;
    margin-bottom: 2rem;
    color: #fff;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 3rem;
}

/* Servicios Home - Diseño simple y estético */
.servicios-home-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-bottom: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.servicio-home-item {
    text-align: left;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-base);
}

.servicio-home-item:hover {
    border-bottom-color: rgba(255, 255, 255, 0.3);
    transform: translateY(var(--lift-sm));
}

.servicio-home-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.servicio-home-header i {
    font-size: 1.5rem;
    color: #ffffff;
    min-width: 24px;
}

.servicio-home-header h3 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
}

.servicio-home-item p {
    color: #cccccc;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.servicio-home-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.servicio-home-features span {
    font-size: 0.85rem;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-fast);
}

.servicio-home-features span:hover {
    background-color: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
}

/* portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 3rem;
    padding: 0 60px;
    max-width: 100%;
}

.portfolio-item {
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #1a1a1a;
    box-shadow: var(--shadow-light-sm);
    transition: all var(--transition-base);
    padding: 0;
    border: 1px solid rgba(51, 51, 51, 0.6);
    width: 100%;
    max-width: 880px;
}

.portfolio-item:hover {
    transform: translateY(var(--lift-md));
    box-shadow: var(--shadow-light-hover);
    border-color: rgba(51, 51, 51, 0.8);
}

/* Ajustes para las tarjetas modernas en el índex */
.portfolio-item .project-card-modern {
    border-radius: 22px;
    background: transparent;
    box-shadow: none;
    margin: 0;
    overflow: hidden;
}

.portfolio-item .project-image-container {
    height: 350px;
    border-radius: 22px;
    overflow: hidden;
}

.portfolio-item .project-title-top h3 {
    font-size: 1.6rem;
}

.portfolio-item .category-tag {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.portfolio-item .project-description-bottom p {
    font-size: 1rem;
}

.portfolio-item iframe {
    border-radius: 22px;
    width: 100%;
    height: 350px;
    border: none;
    display: block;
    overflow: hidden;
    cursor: none !important;
    max-width: 100%;
    min-height: 280px;
}

.project-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

/* Asegurar que el contenedor tenga position relative */
.project-image-container {
    position: relative !important;
}

/* Degradado superior para iframes de Behance */
.project-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.4) 30%,
        rgba(0, 0, 0, 0.2) 60%,
        rgba(0, 0, 0, 0) 100%
    );
    pointer-events: none;
    z-index: 10;
    border-radius: 22px 22px 0 0;
}

/* Sección de Marcas - Grid Layout */
#marcas {
    padding: 80px 0;
    background: linear-gradient(to bottom, #999999, #ffffff);
}

#marcas .section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #333333;
}

.marcas-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.marcas-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.marca-item {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    background: transparent;
    border-radius: 0;
    transition: all var(--transition-slow);
    min-height: 100px;
}

.marca-item img {
    max-height: 60px;
    max-width: 120px;
    object-fit: contain;
    opacity: 0.7;
    transition: all var(--transition-slow);
    filter: grayscale(100%) brightness(1.2);
}

.marca-item:hover {
    background: transparent;
    transform: none;
}

.marca-item:hover img {
    opacity: 1;
    filter: grayscale(0%) brightness(1) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transform: scale(1.05);
}

/* Páginas internas */
#quienes-somos-content, #servicios-content, #portfolio-content {
    padding-top: 140px !important;
    min-height: 70vh;
    background-color: #0E0E11;
}

#quienes-somos-content h1, #servicios-content h1, #portfolio-content h1 {
    font-family: 'RethinkSans', serif;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #fff;
}

/* Portfolio Full Page Styles */
.portfolio-full-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.portfolio-full-item {
    margin-bottom: 2rem;
}

/* Nuevo diseño moderno inspirado en Porsche */
.project-card-modern {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-light-sm);
    transition: all var(--transition-base);
}

.project-card-modern:hover {
    transform: translateY(var(--lift-md));
    box-shadow: var(--shadow-light-hover);
}

.project-image-container {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
    border-radius: 20px;
}

.project-image-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 20px;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.3) 30%,
        transparent 50%,
        transparent 70%,
        rgba(0, 0, 0, 0.8) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    pointer-events: none;
}

.project-title-top {
    align-self: flex-start;
}

.project-title-top h3 {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
}

.project-info-bottom {
    align-self: flex-end;
    width: 100%;
}

.project-category-tags {
    margin-bottom: 0.8rem;
}

.category-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.9);
    color: #000000;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-description-bottom p {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    line-height: 1.4;
}

.portfolio-full-item {
    margin-bottom: 2rem;
}

.cta-inline {
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cta-section {
    background: linear-gradient(135deg, #1a1a1a, #0a0a0a) !important;
    border: 1px solid rgba(51, 51, 51, 0.6);
    box-shadow: var(--shadow-light-sm);
    transition: all var(--transition-base);
}

.cta-section:hover {
    border-color: rgba(51, 51, 51, 0.8);
    box-shadow: var(--shadow-light-md);
}

.process-number {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    font-weight: bold;
    background-color: #666666 !important;
}

/* Servicios detallados */
.services-detailed-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.service-detailed-card {
    background: #1a1a1a;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow-light-sm);
    border: 1px solid rgba(51, 51, 51, 0.6);
    transition: all var(--transition-base);
}

.service-detailed-card:hover {
    transform: translateY(var(--lift-md));
    box-shadow: var(--shadow-light-hover);
    border-color: rgba(51, 51, 51, 0.8);
}

.service-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.service-icon {
    text-align: center;
    flex-shrink: 0;
    transition: transform var(--transition-base);
}

.servicio-home-item:hover .service-icon {
    transform: scale(1.05);
}

.service-icon i {
    font-size: 2rem;
    color: #cccccc;
    transition: color var(--transition-base);
}

.servicio-home-item:hover .service-icon i {
    color: #ffffff;
}

.service-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: inline-block;
    transition: transform var(--transition-base);
}

.service-content h2 {
    color: #fff;
    margin-bottom: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.service-summary {
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-content h3 {
    color: #fff;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1rem;
}

.service-features {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.service-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #333;
    color: #ccc;
}

.service-features li i {
    font-size: 0.4rem;
    vertical-align: middle;
}

.service-features li:last-child {
    border-bottom: none;
}

/* Actualizar text-primary para usar nuevo color */
.text-primary {
    color: #cccccc !important;
}

/* Estilos específicos para Quienes Somos */
#quienes-somos-content .image-block img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 24px !important;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

#quienes-somos-content .image-block img:hover {
    transform: translateY(var(--lift-sm));
    box-shadow: var(--shadow-hover-md);
}

.text-block {
    padding: 2rem 0;
}

.text-block h2,
.text-block h3 {
    color: #fff;
    font-weight: 600;
}

.text-block p {
    color: #ccc;
    line-height: 1.7;
    font-size: 1rem;
}

/* Sección Filosofía - Bloque con Imágenes Superpuestas */
.seccion-filosofia {
    padding: 5rem 0;
    position: relative;
    overflow-x: hidden; /* Previene scroll horizontal por imágenes absolutas con offset negativo */
}

/* Texto de Filosofía - Columna Izquierda */
.texto-filosofia {
    padding-right: 2rem;
}

.titulo-filosofia {
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -1px;
}

.cuerpo-filosofia {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #ccc;
    font-weight: 400;
}

/* Contenedor de Imágenes Filosofía */
.contenedor-imagenes-filosofia {
    position: relative;
    width: 100%;
    min-height: 750px;
    padding: 3rem 0;
}

/* Imagen Base (horizontal) */
.imagen-base-filosofia {
    position: relative;
    width: 95%;
    margin: 0 auto;
    z-index: 1;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.5);
    transition: all var(--transition-slow);
}

.imagen-base-filosofia:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
}

.imagen-base-filosofia img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
}

/* Imagen Secundaria (vertical, top-right) */
.imagen-secundaria-filosofia {
    position: absolute;
    top: -50px;
    right: -30px;
    width: 50%;
    z-index: 3;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 70px rgba(0, 0, 0, 0.6);
    transition: all var(--transition-slow);
    transform: rotate(-1.5deg);
}

.imagen-secundaria-filosofia:hover {
    transform: scale(1.03) rotate(-1.5deg);
    box-shadow: 0 25px 90px rgba(0, 0, 0, 0.7);
}

.imagen-secundaria-filosofia img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

/* Tercera Imagen (superpuesta) */
.imagen-tercera-filosofia {
    position: absolute;
    bottom: 50px;
    left: 15%;
    width: 38%;
    z-index: 2;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.55);
    transition: all var(--transition-slow);
    transform: rotate(2deg);
}

.imagen-tercera-filosofia:hover {
    transform: scale(1.03) rotate(2deg);
    box-shadow: 0 18px 70px rgba(0, 0, 0, 0.65);
}

.imagen-tercera-filosofia img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* Sección Historia - Carrusel Horizontal */
.seccion-historia-carrusel {
    padding: 4rem 0;
}

.carrusel-wrapper {
    position: relative;
    width: 100%;
}

.carrusel-historia {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 2rem 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.carrusel-historia::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Historia Card */
.historia-card {
    flex: 0 0 auto;
    width: 450px;
    background: #1a1a1a;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(51, 51, 51, 0.6);
    box-shadow: var(--shadow-light-sm);
    transition: all var(--transition-base);
}

.historia-card:hover {
    transform: translateY(var(--lift-md));
    box-shadow: var(--shadow-light-hover);
    border-color: rgba(51, 51, 51, 0.8);
}

.historia-card-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
}

.historia-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.historia-card:hover .historia-card-image img {
    transform: scale(1.04);
}

.historia-card-content {
    padding: 2rem;
    position: relative;
}

.historia-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #999;
    margin-bottom: 1rem;
}

.historia-number {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.1);
    line-height: 1;
}

.historia-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.historia-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #ccc;
    margin: 0;
}

/* Flechas de Navegación */
.carrusel-navigation {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.carrusel-btn {
    background-color: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-xs);
}

.carrusel-btn:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: #ffffff;
    transform: translateY(var(--lift-sm));
    box-shadow: var(--shadow-sm);
}

.carrusel-btn:active {
    background-color: rgba(255, 255, 255, 0.18);
    transform: translateY(0);
}

.carrusel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed !important;
}

/* Estilos para enlaces y botones <a> */
a {
    color: #cccccc;
    text-decoration: none;
    transition: all var(--transition-base);
}

a:hover {
    color: #ffffff;
    text-decoration: none;
}

a:focus,
a:active {
    color: #999999;
    outline: none;
}

/* Enlaces como botones */
/* Botones minimalistas outline */
a.btn,
.btn {
    background-color: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    border-radius: 8px;
    transition: all var(--transition-base);
    text-transform: none;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-block;
    text-decoration: none;
    box-shadow: var(--shadow-xs);
}

a.btn:hover,
.btn:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: #ffffff;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(var(--lift-sm));
    box-shadow: var(--shadow-sm);
}

/* Botón primario */
a.btn-primary,
.btn-primary {
    background-color: transparent !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    border-radius: 8px;
    transition: all var(--transition-base);
    text-transform: none;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-block;
    box-shadow: var(--shadow-xs);
}

a.btn-primary:hover,
.btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.12) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
    transform: translateY(var(--lift-sm));
    outline: none !important;
    box-shadow: var(--shadow-sm);
}

a.btn-primary:focus,
.btn-primary:focus {
    background-color: transparent !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
    outline: none !important;
}

a.btn-primary:active,
.btn-primary:active {
    background-color: rgba(255, 255, 255, 0.18) !important;
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

/* Botón outline primario */
a.btn-outline-primary,
.btn-outline-primary {
    background-color: transparent !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    border-radius: 8px;
    transition: all var(--transition-base);
    text-transform: none;
    letter-spacing: 0.5px;
    position: relative;
    box-shadow: var(--shadow-xs);
}

a.btn-outline-primary:hover,
.btn-outline-primary:hover {
    background-color: rgba(255, 255, 255, 0.12) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
    transform: translateY(var(--lift-sm));
    outline: none !important;
    box-shadow: var(--shadow-sm);
}

a.btn-outline-primary:focus,
.btn-outline-primary:focus {
    background-color: transparent !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
    outline: none !important;
}

/* Enlaces de navegación - mantener estilos específicos */
.navbar-nav a.nav-link {
    color: inherit;
}

.navbar-nav a.nav-link:hover {
    color: #cccccc !important;
    text-decoration: none;
}

/* Botón Volver Arriba - Sin bordes */
.btn-scroll-top {
    border: none !important;
    border-bottom: 2px solid transparent !important;
    outline: none !important;
    box-shadow: none !important;
    color: white !important;
    background-color: transparent !important;
    transition: all var(--transition-base) !important;
}

.btn-scroll-top:hover {
    border: none !important;
    border-bottom: 2px solid #ffffff !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
    transform: translateY(var(--lift-sm));
}

.btn-scroll-top:focus,
.btn-scroll-top:active {
    border: none !important;
    border-bottom: 2px solid #ffffff !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

/* Enlaces en footer - mantener estilos específicos */
.footer-link, 
.footer-section a {
    color: #cccccc !important;
    text-decoration: none !important;
    transition: all var(--transition-base);
    position: relative;
}

.footer-link:hover,
.footer-section a:hover {
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateX(2px);
}

/* Enlaces en texto - estilo sutil */
p a, .content a, .description a {
    color: #cccccc;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all var(--transition-base);
}

p a:hover, .content a:hover, .description a:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
    text-decoration: none;
}

/* Estados adicionales para botones */
a.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

a.btn:disabled, a.btn.disabled {
    background-color: #cccccc;
    border-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Tamaños de botones */
a.btn-sm,
.btn-sm {
    padding: 12px 24px;
    font-size: 0.9rem;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

a.btn-lg,
.btn-lg {
    padding: 20px 40px;
    font-size: 1.1rem;
    border-radius: 10px;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Responsive para botones */
@media (max-width: 768px) {
    a.btn-lg {
        padding: 12px 24px;
        font-size: 1.1rem;
    }
    
    a.btn {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
}

/* Footer Styles */
.footer-section {
    background-color: #0E0E11;
    color: white;
    padding: 60px 0 20px 0;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #ffffff;
}

.footer-content p {
    margin-bottom: 8px;
    color: #cccccc;
    font-size: 0.95rem;
    line-height: 1.5;
}

.footer-credit {
    color: #888888;
    font-size: 0.9rem;
    margin: 0;
}

.border-top {
    border-color: #333333 !important;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Formulario iframe wrapper (Servicios) */
.form-iframe-wrapper {
    padding: 2rem;
    border-radius: 15px;
    background: #1a1a1a;
    border: 1px solid rgba(51, 51, 51, 0.6);
    box-shadow: var(--shadow-light-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.form-iframe-wrapper:hover {
    transform: translateY(var(--lift-sm));
    box-shadow: var(--shadow-light-hover);
}

.notion-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    text-align: center;
    padding: 2rem;
}

/* Portfolio responsive para pantallas muy grandes */
/* @media (min-width: 1200px) {
    .portfolio-grid {
        padding: 0 80px;
        max-width: 1400px;
        margin: 0 auto;
    }
} */

/* ============================================
   Menú hamburguesa desplegado (mobile)
   ============================================ */
@media (max-width: 991.98px) {
    /* Fondo oscuro con blur cuando el menú está abierto */
    .navbar-transparent.menu-open {
        background: rgba(10, 10, 14, 0.95) !important;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
        padding-bottom: 0.5rem;
    }

    /* Ocultar logo al desplegar el menú */
    .navbar.menu-open .navbar-brand-container {
        opacity: 0;
        visibility: hidden;
    }

    /* Contenedor del menú desplegado */
    .navbar-collapse {
        margin-top: 0.75rem;
        padding-bottom: 1.5rem;
    }

    /* Separador superior antes del primer ítem */
    .navbar-collapse .navbar-nav {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 0.5rem;
    }

    /* Cada ítem de menú */
    .navbar-collapse .nav-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    /* Links del menú: más grandes, mejor espaciado */
    .navbar-collapse .nav-link {
        font-size: 0.85rem;
        font-weight: 500;
        letter-spacing: 1.5px;
        padding: 1rem 0.25rem !important;
        margin: 0 !important;
        color: rgba(255, 255, 255, 0.85) !important;
        transition: color var(--transition-base), padding-left var(--transition-fast);
    }

    .navbar-collapse .nav-link:hover,
    .navbar-collapse .nav-link:focus {
        color: #ffffff !important;
        padding-left: 0.75rem !important;
        transform: none;
    }

    /* Desactivar el underline animado (no aplica en mobile) */
    .navbar-collapse .nav-link::after {
        display: none !important;
    }
}

/* Responsive Design para tablets */
@media (max-width: 992px) {
    /* Ajustar iconos sociales en tablets */
    .navbar-social {
        gap: 0.75rem;
    }
    
    .social-icon {
        font-size: 1.1rem;
        width: 32px;
        height: 32px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 2rem;
    }
    
    .portfolio-item .project-image-container {
        height: 350px;
    }
    
    .portfolio-item iframe {
        height: 350px;
    }
    
    /* Responsive Sección Filosofía */
    .seccion-filosofia {
        padding: 3rem 0;
    }
    
    .texto-filosofia {
        padding-right: 0;
        text-align: center;
        margin-bottom: 3rem;
    }
    
    .titulo-filosofia {
        font-size: 2.2rem;
    }
    
    .cuerpo-filosofia {
        font-size: 1rem;
    }
    
    .contenedor-imagenes-filosofia {
        min-height: 0;
        padding: 1rem 0;
    }
    
    /* Apilar imágenes verticalmente en mobile */
    .imagen-base-filosofia,
    .imagen-secundaria-filosofia,
    .imagen-tercera-filosofia {
        position: relative;
        width: 100%;
        margin: 0 auto 2rem;
        transform: none !important;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
    }

    .imagen-tercera-filosofia {
        margin-bottom: 0;
    }
    
    /* Responsive Historia Carrusel */
    .seccion-historia-carrusel {
        padding: 3rem 0;
    }
    
    .historia-card {
        width: 350px;
    }
    
    .historia-card-image {
        height: 220px;
    }
    
    .historia-card-content {
        padding: 1.5rem;
    }
    
    .historia-number {
        font-size: 2.5rem;
        top: 1.5rem;
        right: 1.5rem;
    }
    
    .historia-title {
        font-size: 1.3rem;
    }
    
    .historia-text {
        font-size: 0.95rem;
    }
    
    .carrusel-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* Breakpoint intermedio para tablets pequeños */
@media (max-width: 850px) {
    .portfolio-grid {
        padding: 0 1.5rem;
    }
    
    .portfolio-item .project-image-container {
        height: 350px;
    }
    
    .portfolio-item iframe {
        height: 350px;
    }
    
    /* Servicios home en 1 columna desde 850px */
    .servicios-home-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1.5rem;
    }

    /* Servicios: height fijo causa overflow con 1 columna - usar min-height */
    #servicios {
        height: auto;
        min-height: 100vh;
        padding: 80px 0;
        align-items: center;
    }
}

/* Responsive Design para móviles */
@media (max-width: 768px) {
    /* Ocultar iconos sociales en móviles para no interferir con el layout */
    .navbar-social {
        display: none;
    }
    
    #servicios, #portfolio {
        padding-top: 90px;
        margin-top: -70px;
        height: auto;
        min-height: 100vh;
        padding-bottom: 2rem;
    }

    /* Responsive Quienes Somos - nuevo layout */
    #quienes-somos {
        height: auto;
        min-height: 100svh;
        padding: 100px 0 60px;
        align-items: flex-start;
    }

    #quienes-somos::after {
        display: none;
    }

    .qs-text-block {
        padding-right: 0;
        margin-bottom: 2rem;
    }

    .qs-text-block .section-title {
        font-size: 2rem;
        padding-top: 1.25rem;
    }

    .qs-text-block p {
        font-size: 0.97rem;
        line-height: 1.75;
    }

    .qs-highlight {
        font-size: 0.92rem !important;
        padding-left: 1rem;
    }

    .qs-image-block::before {
        display: none;
    }

    .qs-image-block img {
        height: 280px;
        border-radius: 16px;
    }
    
    /* Páginas internas responsive */
    #quienes-somos-content, #servicios-content, #portfolio-content {
        padding-top: 110px !important;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Servicios Home Responsive */
    #servicios .section-title {
        margin-top: 2rem;
    }

    .servicios-home-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }
    
    .servicio-home-item {
        padding: 1.5rem 0;
    }
    
    .servicio-home-header {
        gap: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .servicio-home-header h3 {
        font-size: 1.25rem;
    }
    
    .servicio-home-item p {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    
    .servicio-home-features span {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    /* Marcas Grid Responsive */
    .marcas-grid {
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .marcas-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        justify-items: center;
    }

    .marca-item {
        padding: 0;
        min-height: 70px;
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .marca-item img {
        max-height: 40px;
        max-width: 90px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
        max-width: 100%;
    }
    
    .portfolio-item {
        max-width: 100%;
    }
    
    .portfolio-item .project-image-container {
        height: 350px;
    }
    
    .portfolio-item iframe {
        height: 350px;
        border-radius: 15px;
    }
    
    /* Marcas Carousel Responsive */
    #marcas {
        padding: 3rem 0;
    }
    
    #marcas .section-title {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }
    
    /* Portfolio Full Page Responsive */
    .portfolio-full-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .project-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .project-meta {
        align-items: center;
    }
    
    .project-iframe-container iframe {
        height: 220px;
    }
    
    .project-title {
        font-size: 1.1rem;
    }

    /* Responsive para nuevo diseño moderno */
    .project-card-modern {
        margin-bottom: 2rem;
    }
    
    .project-image-container {
        height: 350px;
    }
    
    .project-overlay {
        padding: 1.5rem;
    }
    
    .project-title-top h3 {
        font-size: 1.4rem;
    }
    
    .category-tag {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    .project-description-bottom p {
        font-size: 0.9rem;
    }

    /* Responsive para Quienes Somos */
    #quienes-somos-content .image-block img {
        height: 250px;
        margin-bottom: 1rem;
        border-radius: 24px !important;
    }

    .text-block {
        padding: 1rem 0;
    }

    /* Responsive para páginas internas */
    .services-detailed-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .service-detailed-card {
        padding: 1.5rem;
    }
    
    .service-header {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .service-icon img {
        width: 14px;
        height: 14px;
    }
    
    .service-content h2 {
        font-size: 1.3rem;
    }

    .service-icon i {
        font-size: 1.5rem;
    }
    
    .process-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        background-color: #666666 !important;
    }
    
    .mission-card, .vision-card {
        min-height: auto;
        margin-bottom: 1rem;
    }
    
    .footer-section .col-lg-4:last-child {
        text-align: center !important;
    }
    
    .footer-section .col-lg-4:first-child {
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
    
    /* Responsive Historia Carrusel Mobile */
    .historia-card {
        width: 320px;
    }
    
    .historia-card-image {
        height: 200px;
    }
    
    .historia-card-content {
        padding: 1.5rem;
    }
    
    .historia-number {
        font-size: 2rem;
        top: 1.5rem;
        right: 1.5rem;
    }
    
    .historia-title {
        font-size: 1.2rem;
    }
    
    .historia-text {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .carrusel-navigation {
        margin-top: 1.5rem;
    }
    
    .carrusel-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    /* Hero: svh excluye barra del browser; object-position centra el texto integrado */
    .hero-section {
        height: 100svh;
    }

    .hero-video {
        object-position: center 35%;
    }

    /* Tipografía: títulos hero reducidos */
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    /* Títulos sección genéricos */
    .section-title {
        font-size: 1.8rem;
    }

    /* Filosofía textos */
    .titulo-filosofia {
        font-size: 2rem;
    }

    .cuerpo-filosofia {
        font-size: 1rem;
    }

    .portfolio-grid {
        padding: 0 0.5rem;
        gap: 1.5rem;
    }
    
    .portfolio-item .project-image-container {
        height: 300px;
    }
    
    .portfolio-item iframe {
        height: 300px;
        border-radius: 12px;
    }
    
    .portfolio-item .project-title-top h3 {
        font-size: 1.3rem;
    }
    
    /* Historia Carrusel Mobile Pequeño */
    .historia-card {
        width: 280px;
    }
    
    .historia-card-image {
        height: 180px;
    }
    
    .historia-eyebrow {
        font-size: 0.7rem;
    }
    
    .historia-number {
        font-size: 1.8rem;
    }
    
    .historia-title {
        font-size: 1.1rem;
    }
    
    .historia-text {
        font-size: 0.85rem;
    }
}

/* Responsive para móviles en landscape */
@media (max-width: 896px) and (orientation: landscape) {
    .portfolio-item .project-image-container {
        height: 350px;
    }
    
    .portfolio-item iframe {
        height: 350px;
    }
    
    .portfolio-grid {
        gap: 1rem;
    }
}

/* Sobrescribir estilos de Bootstrap para tema oscuro */
.text-muted {
    color: #999 !important;
}

.lead {
    color: #ccc !important;
}

.bg-light {
    background-color: #1a1a1a !important;
}

p, h2, h3, h4, h5, h6 {
    color: #fff;
}

.display-4 {
    color: #fff !important;
}

/* ============================================
   Breakpoint 390px - Pantallas muy pequeñas
   ============================================ */
@media (max-width: 390px) {
    /* Historia card: ancho basado en viewport para que quepa bien */
    .historia-card {
        width: calc(100vw - 3rem);
        min-width: 260px;
    }

    /* Portfolio iframe en pantallas muy pequeñas */
    .portfolio-item .project-image-container,
    .portfolio-item iframe {
        height: 260px;
    }

    /* Títulos de sección: reducir un poco más */
    .section-title {
        font-size: 1.7rem;
    }

    .qs-text-block .section-title {
        font-size: 1.75rem;
    }

    .qs-image-block img {
        height: 260px;
    }

    /* Servicios features pills: evitar overflow */
    .servicio-home-features {
        gap: 0.4rem;
    }

    .servicio-home-features span {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    /* Botón WhatsApp: más pequeño y pegado al borde */
    .whatsapp-float {
        width: 48px;
        height: 48px;
        font-size: 22px;
        bottom: 16px;
        right: 14px;
    }

    /* Filosofía textos */
    .titulo-filosofia {
        font-size: 1.8rem;
    }

    /* Footer compacto */
    .footer-section {
        padding: 40px 0 16px;
    }

    /* Navbar brand (logo) más compacto */
    .navbar-brand img {
        max-height: 28px;
    }
}

/* ============================================
   Breakpoint 320px - Teléfonos mínimos
   ============================================ */
@media (max-width: 320px) {
    .portfolio-item .project-image-container,
    .portfolio-item iframe {
        height: 220px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .historia-card {
        width: calc(100vw - 2rem);
    }

    .marcas-row {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .hero-title {
        font-size: 2rem;
    }
}

/* ============================================
   Accesibilidad: Reducir movimiento (prefers-reduced-motion)
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    /* Deshabilitar animaciones de entrada al scroll */
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .slide-in-up,
    .slide-in-down,
    .slide-in-left,
    .slide-in-right,
    .fade-in,
    .scale-in {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    /* Reducir todas las transiciones */
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    /* Mantener transiciones funcionales (no meramente decorativas) */
    .navbar {
        transition: transform 0.01ms !important;
    }

    /* Evitar movimiento en parallax */
    [data-parallax-speed],
    [data-parallax-mision] {
        transform: none !important;
    }
}

/* ============================================
   Corrección: Overflow horizontal global
   ============================================ */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}