/* Reset & Variables */
:root {
    --bg-black: #050505;
    --bg-dark-grey: #2a2a2a;
    --text-white: #ffffff;
    --text-light-grey: #e0e0e0;
    --accent-red: #e31b23;
    --badge-bg: #4a0d26;
    --font-main: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-black);
    color: var(--text-white);
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Layout Principal */
.hero-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* Panel Izquierdo */
.left-panel {
    flex: 0 0 38%;
    background-color: var(--bg-black);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Panel Derecho */
.right-panel {
    flex: 1;
    background-color: var(--bg-dark-grey);
    background: linear-gradient(to bottom, #2a2a2a, #1f1d1d);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-left: 5rem;
    position: relative;
    z-index: 1;
}

/* Estilos del Logo Principal (Cubo 3D) */
.cube-container {
    position: relative;
    width: 150px;
    height: 150px;
    perspective: 800px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: spinCube 20s infinite linear;
}

.cube-container:hover .cube {
    animation-play-state: paused;
}

.cube-face {
    position: absolute;
    width: 150px;
    height: 150px;
    background-color: rgba(20, 20, 20, 0.5); /* Semi-transparente para ver el interior y caras traseras */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 3px solid #FF0000; /* Borde rojo intenso y uniforme */
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.8), inset 0 0 12px rgba(255, 0, 0, 0.8); /* Glow neón rojo */
}

.cube-front  { transform: rotateY(  0deg) translateZ(75px); }
.cube-back   { transform: rotateY(180deg) translateZ(75px); }
.cube-right  { transform: rotateY( 90deg) translateZ(75px); }
.cube-left   { transform: rotateY(-90deg) translateZ(75px); }
.cube-top    { transform: rotateX( 90deg) translateZ(75px); }
.cube-bottom { transform: rotateX(-90deg) translateZ(75px); }

.logo-accent {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 4px solid var(--accent-red);
    box-shadow: 3px 3px 0px rgba(227, 27, 35, 0.3); /* Efecto 3D en el borde */
    transform: translateZ(10px);
}

.top-left {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.bottom-right {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: 900;
    font-size: 3rem;
    letter-spacing: 2px;
    z-index: 10;
    transform: translateZ(20px);
    text-shadow: 
        1px 1px 0px #444,
        2px 2px 0px #333,
        3px 3px 0px #222,
        4px 4px 0px #111,
        5px 5px 15px rgba(0,0,0,0.8);
}

.logo-top {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.logo-bottom {
    font-size: 3rem;
}

/* Contenido Principal (Derecha) */
.hero-content {
    max-width: 800px;
}

.main-title {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards 0.2s;
}

.divider {
    height: 1px;
    width: 150%; /* Extiende la línea hacia la izquierda */
    background-color: rgba(255, 255, 255, 0.2);
    margin-left: -50%;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards 0.5s;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-white);
    background-color: #d10074;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    width: fit-content;
    display: block;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards 0.8s;
}

.badge {
    display: inline-block;
    background-color: var(--badge-bg);
    color: var(--text-white);
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 4px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards 1.1s;
}

.hero-ia-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--accent-red);
    color: var(--text-white);
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    margin-top: 2rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards 1.4s;
    box-shadow: 0 4px 15px rgba(209, 0, 116, 0.4);
}

.hero-ia-btn:hover {
    background-color: #a3005a;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(209, 0, 116, 0.6);
}

.hero-ia-btn svg {
    margin-right: 5px;
}

/* Animación 3D para el logo */
@keyframes spinCube {
    0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(360deg) rotateY(720deg) rotateZ(180deg); }
}

/* Animaciones */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal Animaciones */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

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

/* Cursor parpadeante para el efecto de máquina de escribir */
.cursor {
    display: inline-block;
    color: var(--accent-red);
    font-weight: 700;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Staggered Delays for Grids */
.trabajos-grid .reveal:nth-child(1) { transition-delay: 0.1s; }
.trabajos-grid .reveal:nth-child(2) { transition-delay: 0.2s; }
.trabajos-grid .reveal:nth-child(3) { transition-delay: 0.3s; }
.trabajos-grid .reveal:nth-child(4) { transition-delay: 0.4s; }
.trabajos-grid .reveal:nth-child(5) { transition-delay: 0.5s; }
.trabajos-grid .reveal:nth-child(6) { transition-delay: 0.6s; }

.why-us-grid .reveal:nth-child(1) { transition-delay: 0.1s; }
.why-us-grid .reveal:nth-child(2) { transition-delay: 0.2s; }
.why-us-grid .reveal:nth-child(3) { transition-delay: 0.3s; }
.why-us-grid .reveal:nth-child(4) { transition-delay: 0.4s; }

.sectores-grid .reveal:nth-child(1) { transition-delay: 0.1s; }
.sectores-grid .reveal:nth-child(2) { transition-delay: 0.2s; }
.sectores-grid .reveal:nth-child(3) { transition-delay: 0.3s; }
.sectores-grid .reveal:nth-child(4) { transition-delay: 0.4s; }
.sectores-grid .reveal:nth-child(5) { transition-delay: 0.5s; }
.sectores-grid .reveal:nth-child(6) { transition-delay: 0.6s; }

/* Responsive básico */
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column;
    }
    
    .left-panel {
        flex: 0 0 40%;
        width: 100%;
    }
    
    .right-panel {
        flex: 1;
        padding: 2rem;
        justify-content: center;
        text-align: center;
    }

    .divider {
        width: 100%;
        margin-left: 0;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
}

/* =========================================
   Menú Hamburguesa y Overlay Lateral
   ========================================= */

.hamburger-btn {
    position: fixed;
    top: 2rem;
    right: 2.5rem;
    z-index: 1000;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    transition: transform 0.3s ease;
}

.hamburger-btn .bar {
    width: 30px;
    height: 3px;
    background-color: var(--text-white);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-btn:hover {
    transform: scale(1.1);
}

/* Overlay del menú */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Panel lateral */
.menu-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background-color: var(--bg-dark-grey);
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    padding: 4rem 3rem;
    transition: right 0.4s cubic-bezier(0.77, 0.2, 0.05, 1);
    z-index: 1000;
    display: block; /* Modificado: block en lugar de flex para asegurar el scroll */
    overflow-y: auto;
}

.menu-overlay.active .menu-panel {
    right: 0;
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

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

.side-nav {
    margin-top: 2rem;
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-white);
    font-family: var(--font-main);
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.nav-item:hover {
    color: var(--accent-red);
    padding-left: 10px;
}

.nav-dropdown {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-dropdown .nav-item {
    border-bottom: none;
    padding-bottom: 0.5rem;
}

.sub-nav {
    display: flex;
    flex-direction: column;
    padding-left: 1.5rem;
    padding-bottom: 1rem;
}

.sub-nav-item {
    background: none;
    border: none;
    color: var(--text-light-grey);
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 400;
    cursor: pointer;
    text-align: left;
    width: 100%;
    padding: 0.5rem 0;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.sub-nav-item:hover {
    color: var(--accent-red);
    padding-left: 5px;
}

/* Contenido de información (Quiénes somos) */
.info-content {
    margin-top: 2rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.5s ease;
}

.info-content.active {
    max-height: 800px;
    opacity: 1;
    margin-top: 2rem;
}

.info-content h3 {
    font-size: 1.2rem;
    color: var(--accent-red);
    margin-bottom: 1rem;
}

.info-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-light-grey);
    font-weight: 300;
}

@media (max-width: 500px) {
    .menu-panel {
        width: 100%;
        right: -100%;
    }
}

/* Cajas de valores (Calidad, Rapidez, Compromiso) */
.values-container {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.value-box {
    background-color: #d10074; /* Fucsia / Magenta */
    color: var(--text-white);
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.4;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.value-box strong {
    font-weight: 900;
    letter-spacing: 0.5px;
    margin-right: 5px;
}

/* =========================================
   Sección Servicios (A qué nos dedicamos)
   ========================================= */

.services-section {
    background-color: var(--bg-dark-grey);
    padding: 6rem 10%;
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

.service-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}

/* 1. Impresión en gran formato */
.service-content {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.service-image-box {
    flex: 1;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.service-image-box img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.image-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 2rem 1.5rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.service-list {
    flex: 1;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.service-list li {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}

.service-list .arrow {
    color: var(--accent-red);
    margin-right: 15px;
    font-size: 1.5rem;
    font-weight: bold;
}

/* 2. Diseño gráfico */
.service-cards-container {
    display: flex;
    gap: 2rem;
    justify-content: space-between;
}

.design-card {
    flex: 1;
    background-color: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.design-card:hover {
    transform: translateY(-5px);
    background-color: rgba(255,255,255,0.05);
}

.design-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.design-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-white);
}

.design-card p {
    font-size: 0.9rem;
    color: var(--text-light-grey);
    line-height: 1.5;
}

/* 3. Rotulación profesional */
.rotulacion-block {
    display: flex;
    gap: 4rem;
    background-color: rgba(0,0,0,0.3);
    border-radius: 12px;
    overflow: hidden;
}

.rotulacion-image {
    flex: 1;
    min-height: 100%;
}

.rotulacion-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rotulacion-content {
    flex: 1;
    padding: 3rem 3rem 3rem 0;
}

.service-subtitle {
    font-size: 1.1rem;
    color: var(--text-light-grey);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.rotulacion-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rotulacion-item {
    background-color: #d10074; /* Fucsia / Magenta */
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease;
}

.rotulacion-item:hover {
    transform: scale(1.02);
}

.rotulacion-item .icon {
    font-size: 2rem;
    background: rgba(255,255,255,0.2);
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.rotulacion-item .text h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.rotulacion-item .text p {
    font-size: 0.85rem;
    line-height: 1.4;
    opacity: 0.9;
}

/* Responsive Services */
@media (max-width: 900px) {
    .service-content, .rotulacion-block, .service-cards-container {
        flex-direction: column;
    }
    
    .rotulacion-content {
        padding: 2rem;
    }
}

/* =========================================
   Sección Por qué elegirnos
   ========================================= */

.why-us-section {
    background-color: var(--bg-black);
    padding: 6rem 10%;
}

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

.why-us-card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(209, 0, 116, 0.3);
    border-left: 5px solid #d10074;
    padding: 2rem;
    border-radius: 6px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.why-us-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    border-color: #d10074;
}

.why-us-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-white);
}

.why-us-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-light-grey);
}

/* =========================================
   Sección Sectores
   ========================================= */

.sectores-section {
    background-color: var(--bg-dark-grey);
    padding: 6rem 10%;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.sectores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sector-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.sector-item:hover {
    transform: translateX(10px);
}

.sector-icon {
    width: 40px;
    height: 40px;
    color: #d10074; /* Fucsia / Magenta */
}

.sector-item span {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 0.5px;
}

/* =========================================
   Sección Trabajos Realizados
   ========================================= */

.trabajos-section {
    background-color: var(--bg-black);
    padding: 6rem 10%;
}

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

.trabajo-card {
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.trabajo-card:hover {
    transform: translateY(-5px);
    border-color: rgba(209, 0, 116, 0.5);
}

.trabajo-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.trabajo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.trabajo-card:hover .trabajo-image img {
    transform: scale(1.05);
}

.trabajo-content {
    padding: 2rem;
}

.trabajo-content h3 {
    font-size: 1.4rem;
    color: var(--text-white);
    margin-bottom: 1rem;
    font-weight: 700;
}

.trabajo-content p {
    font-size: 0.95rem;
    color: var(--text-light-grey);
    line-height: 1.6;
}

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

/* =========================================
   Sección Contacto
   ========================================= */

.contacto-section {
    background-color: var(--bg-dark-grey);
    padding: 6rem 10%;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
    max-width: 900px;
}

.contacto-card.full-width {
    grid-column: 1 / -1;
}

.contacto-card {
    background-color: #8b003e; /* Color burdeos/magenta oscuro */
    padding: 2.5rem;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.contacto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.3);
}

.contacto-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.contacto-info h3 {
    font-size: 1.3rem;
    color: var(--text-white);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.contacto-info p {
    font-size: 1.1rem;
    color: var(--text-white);
    opacity: 0.9;
}

@media (max-width: 650px) {
    .contacto-grid {
        grid-template-columns: 1fr;
    }
    .contacto-card.full-width {
        grid-column: auto;
    }
}

/* --- WEB CREDITS --- */
.web-credits {
    text-align: right;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.web-credits a {
    color: var(--text-white);
    opacity: 0.4;
    font-size: 0.8rem;
    text-decoration: none;
    transition: opacity 0.3s ease, color 0.3s ease;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

.web-credits a:hover {
    opacity: 1;
    color: var(--accent-red);
}

.web-credits span {
    font-weight: 700;
}

/* =========================================
   Ajustes Móviles (General)
   ========================================= */
@media (max-width: 600px) {
    /* Reducir márgenes de las secciones */
    .services-section, 
    .why-us-section, 
    .sectores-section, 
    .blog-section, 
    .contacto-section {
        padding: 3rem 5%;
    }

    /* Ajustar panel de la portada */
    .right-panel {
        padding: 2rem 1.5rem;
    }

    /* Reducir tamaño de títulos grandes */
    .main-title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
        padding: 0.4rem 0.8rem;
    }

    /* Reducir un poco el tamaño del logo 3D */
    .cube-container {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }
    .cube-face {
        width: 100px;
        height: 100px;
    }
    .cube-front  { transform: rotateY(  0deg) translateZ(50px); }
    .cube-back   { transform: rotateY(180deg) translateZ(50px); }
    .cube-right  { transform: rotateY( 90deg) translateZ(50px); }
    .cube-left   { transform: rotateY(-90deg) translateZ(50px); }
    .cube-top    { transform: rotateX( 90deg) translateZ(50px); }
    .cube-bottom { transform: rotateX(-90deg) translateZ(50px); }

    .logo-text {
        font-size: 2rem;
        transform: translateZ(10px);
    }
    .logo-top, .logo-bottom {
        font-size: 2rem;
    }

    /* Grillas a 1 columna */
    .sectores-grid,
    .why-us-grid {
        grid-template-columns: 1fr;
    }

    /* Cajas de Diseño Gráfico que son Flexbox */
    .service-cards-container {
        flex-direction: column;
    }

    /* Textos en imágenes de gran formato */
    .image-text {
        font-size: 0.85rem;
        padding: 1.5rem 1rem 1rem;
    }
    
    .service-image-box {
        margin-bottom: 1.5rem;
    }
}
