/* ===== RESET Y CONFIGURACIÓN BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e3a5f;
    --secondary-color: #d4a373;
    --accent-red: #c41e3a;
    --accent-purple: #6b4c8a;
    --dark-bg: #0a0e1a;
    --text-light: #ffffff;
    --text-gray: #b0b0b0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(10, 14, 26, 0.98);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h2 {
    font-size: clamp(1rem, 2.2vw, 1.6rem);
    font-weight: 800;
    letter-spacing: 2px;
    margin: 0;
    /* Use same steel texture as hero but scaled down for navbar */
    color: transparent;
    background-image: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.35)), url('images/steelback.jpg');
    background-size: 180%;
    background-position: center;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-stroke: 0px transparent;
}

.logo span {
    /* keep same visual fill as parent */
    color: inherit;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--secondary-color);
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #0a0e1a 0%, #1e3a5f 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(212, 163, 115, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(107, 76, 138, 0.1) 0%, transparent 50%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
    margin-top: -2.5rem; /* subir todo el bloque del hero un poco */
    transition: margin-top 0.25s ease;
}

.brand-title {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 900;
    letter-spacing: 5px;
    margin-bottom: 1rem;
    position: relative;
    color: transparent;
    /* Brighten steel texture as text fill (no overlay/dark shadow) */
    background-image: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.35)), url('images/steelback.jpg');
    background-size: cover;
    background-position: center;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-stroke: 0px transparent;
    text-shadow: none;
    filter: none;
    transition: transform 0.12s ease, background-position 0.6s ease;
}

/* Hero logo styling */
.hero-logo {
    display: block;
    margin: clamp(5rem, 12vh, 10rem) auto 1rem;
    width: clamp(260px, 36vw, 520px);
    max-width: 42vw;
    height: auto;
    transform: translateY(18px);
    transition: transform 0.25s ease, width 0.25s ease;
}
.brand-title:hover {
    transform: translateY(-2px);
}

/* .mc rule removed because 'MC' suffix was deleted from the markup */

.brand-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 300;
    letter-spacing: 2px;
    color: var(--text-gray);
    margin-bottom: 3rem;
}

.hero-scroll {
    animation: bounce 2s infinite;
    margin-top: -3rem; /* sube el bloque un poco más para acercarlo al logo */
}

.hero-scroll p {
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.scroll-arrow {
    font-size: 2rem;
    color: var(--secondary-color);
}

/* ===== SERVICES GRID - 4 SECCIONES EN FILA HORIZONTAL ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* aumentar alto total para mostrar las 3 filas de imágenes completas */
    min-height: 180vh;
}

.service-section {
    position: relative;
    /* mayor altura por sección para que se vean todas las filas de la grid */
    min-height: 180vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s ease;
}
/* Divider between horizontal service columns */
.services-grid > .service-section {
    border-left: 5px solid rgba(0,0,0,0.6);
}
.services-grid > .service-section:first-child {
    border-left: none;
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* menos oscuro por defecto para mejorar visibilidad de las imágenes */
    background: rgba(0, 0, 0, 0.20);
    transition: all 0.5s ease;
    z-index: 2;
}

.service-section:hover .service-overlay {
    background: rgba(0, 0, 0, 0.25);
}

/* Overlay menos oscura para que las imágenes se vean más en Soluciones Industriales */
.service-section.industrial .service-overlay {
    background: rgba(0, 0, 0, 0.25);
}

.service-section.industrial:hover .service-overlay {
    background: rgba(0, 0, 0, 0.25);
}

/* Grid de 6 imágenes de fondo para cada sección */
.service-background-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0;
    z-index: 1;
}

.bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
    /* ligeramente más brillante por defecto para mayor visibilidad */
    filter: brightness(1.03);
}

.service-section:hover .bg-img {
    transform: scale(1.05);
    filter: brightness(1.15);
}

.service-content {
    /* colocar el contenido centrado horizontalmente y elevado ~1/3 de la sección */
    position: absolute;
    top: 16.6667%; /* 50% - 33.333% => centrar el bloque más arriba */
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    text-align: center;
    padding: 2rem;
    transition: transform 0.5s ease, top 0.2s ease;
}

.service-section:hover .service-content {
    transform: translate(-50%, -10px);
}

.service-content h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.8rem);
    font-weight: 900;
    letter-spacing: 4px;
    margin-bottom: 2rem;
    /* limitar a 2 líneas para mantener consistencia visual */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    /* aura oscura duplicada para contraste */
    text-shadow:
        0 6px 18px rgba(0, 0, 0, 1),
        0 0 30px rgba(0, 0, 0, 1),
        0 1px 0 rgba(255, 255, 255, 0.30);
    line-height: 1.05;
}

/* Título y grid específicos para las secciones de servicio (2 columnas x 3 filas) */
.service-section.industrial .service-content h2,
.service-section.arquitectura .service-content h2,
.service-section.vehiculos .service-content h2,
.service-section.publicidad .service-content h2 {
    font-size: clamp(1.1rem, 2.2vw, 1.6rem);
    letter-spacing: 3px;
}

.service-section.industrial .service-background-grid,
.service-section.arquitectura .service-background-grid,
.service-section.vehiculos .service-background-grid,
.service-section.publicidad .service-background-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

.service-btn {
    background: var(--primary-color);
    color: var(--text-light);
    border: 2px solid var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 240px;
    height: 56px;
    padding: 0 1.2rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-sizing: border-box;
}

.service-btn:hover {
    background: transparent;
    border-color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.arquitectura-btn {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--text-light);
    font-size: 0.95rem;
}

.arquitectura-btn:hover {
    background: transparent;
    color: var(--text-light);
    border-color: var(--secondary-color);
}

.vehiculos-btn {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: var(--text-light);
    font-size: 0.95rem;
}

.vehiculos-btn:hover {
    background: transparent;
    border-color: var(--accent-purple);
}

.publicidad-btn {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: var(--text-light);
    font-size: 0.95rem;
}

.publicidad-btn:hover {
    background: transparent;
    border-color: var(--accent-red);
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--dark-bg) 0%, #1a1f2e 100%);
}

.about-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.about h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.about p {
    font-size: 1.2rem;
    line-height: 2;
    color: var(--text-gray);
    margin-bottom: 3rem;
}

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

.stat-item {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(212, 163, 115, 0.1);
    border-color: var(--secondary-color);
    transform: translateY(-5px);
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1rem;
    color: var(--text-gray);
    margin: 0;
}

/* ===== CTA SECTION ===== */
.cta-section {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a4f7a 100%);
    text-align: center;
    overflow: hidden;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(212, 163, 115, 0.1) 0%, transparent 70%);
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--text-gray);
}

.cta-button-main {
    background: var(--secondary-color);
    color: #000;
    border: none;
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 10px 30px rgba(212, 163, 115, 0.3);
}

.cta-button-main:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(212, 163, 115, 0.5);
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: 100px 0;
    background: var(--dark-bg);
}

.contact h2 {
    text-align: center;
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(212, 163, 115, 0.1);
    border-color: var(--secondary-color);
    transform: translateX(10px);
}

.icon {
    font-size: 2rem;
}

.contact-item h4 {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.contact-item p {
    color: var(--text-gray);
    line-height: 1.6;
}

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

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.08);
}

.submit-btn {
    background: var(--secondary-color);
    color: #000;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.submit-btn:hover {
    background: #c49563;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 163, 115, 0.4);
}

/* ===== FOOTER ===== */
.footer {
    background: #050810;
    padding: 3rem 0 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.footer-section h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .service-section {
        min-height: 50vh;
    }
    
    .service-background-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-content {
        margin-top: -1.4rem; /* menos ajuste en pantallas medianas */
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(10, 14, 26, 0.98);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        padding: 2rem 0;
        gap: 1.5rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    /* Móviles: apilar secciones y ajustar grid de imágenes a 1 columna x 6 filas */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-section {
        min-height: 60vh;
    }

    /* On mobile (stacked), use horizontal separators instead */
    .services-grid > .service-section {
        border-left: none;
        border-top: 5px solid rgba(0,0,0,0.6);
    }

    .services-grid > .service-section:first-child {
        border-top: none;
    }

    .service-background-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 1fr);
    }

    /* Mobile optimizations */
    .hero {
        height: 72vh; /* menor alto para que no haya mucho scroll inicial */
    }

    .hero-logo {
        margin: 4.5rem auto 0.8rem;
        width: clamp(180px, 46vw, 360px);
    }

    .hero-content {
        margin-top: -0.6rem;
    }

    .services-grid {
        min-height: auto;
    }

    .service-section {
        min-height: 48vh;
    }

    .service-btn {
        width: 90%;
        min-width: 0;
        margin: 0.8rem auto 0;
        display: block;
    }

    .custom-cursor {
        display: none !important;
    }

    .service-content {
        /* Volver a comportamiento relativo en móvil (apilado) */
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        padding: 1rem 1.2rem;
    }

    .service-content h2 {
        font-size: clamp(1rem, 4vw, 1.4rem);
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    .brand-title {
        letter-spacing: 2px;
    }
    
    .service-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Botones más pequeños en pantallas muy pequeñas */
    .service-btn {
        min-width: 160px;
        height: 48px;
        font-size: 0.9rem;
        padding: 0 1rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }

    /* Ajustes extra para pantallas muy pequeñas */
    .service-section {
        min-height: 50vh;
    }

    .service-content {
        padding: 0.8rem 1rem;
    }

    .hero-content {
        margin-top: -0.8rem; /* ajuste móvil */
    }

    /* Ajuste para el texto 'Descubre nuestros servicios' en móviles */
    .hero-scroll {
        margin-top: -1.6rem;
    }

    .service-background-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 1fr);
    }

    .service-content h2 {
        font-size: clamp(0.95rem, 4.5vw, 1.2rem);
        letter-spacing: 1.5px;
    }

    /* Ajustes adicionales para pantallas muy pequeñas */
    .hero {
        height: 66vh;
    }

    .hero-logo {
        margin: 3.2rem auto 0.6rem;
        width: clamp(140px, 60vw, 280px);
    }

    .service-section {
        min-height: 44vh;
    }
}
