/* 
================================================================
   INCOFRENOS - MODERN TECH DESIGN SYSTEM
================================================================
*/

:root {
    /* --- PALETA DE COLORES --- */
    --primary: #004aad;           /* Azul principal */
    --primary-dark: #003366;      /* Azul profundo */
    --primary-light: #007bff;     /* Azul acción */
    --accent: #22d3ee;            /* Cyan para micro-detalles */
    
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-tech: #f1f5f9;
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-white: #ffffff;
    
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-premium: 0 20px 40px rgba(0, 74, 173, 0.12);

    /* --- TIPOGRAFÍA --- */
    --font-main: 'Inter', sans-serif;
    --font-tech: 'Roboto Condensed', sans-serif;
    
    --radius-s: 4px;
    --radius-m: 8px;
    --radius-l: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RESET & BASIC --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    padding-top: 80px; /* Space for the fixed header */
}

h1, h2, h3, h4 {
    font-family: var(--font-tech);
    text-transform: uppercase;
    font-weight: 700;
}

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

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

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

/* --- HEADER / NAVBAR --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(3, 20, 36, 0.35);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1200;
    height: 80px;
    display: flex;
    align-items: center;
    transition: background 300ms ease;
}

.header.scrolled {
    background: rgba(3, 20, 36, 0.88);
}

.nav {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

.logo-text {
    font-family: var(--font-tech);
    font-size: 2rem;
    font-weight: 700;
    font-style: italic;
    color: var(--text-white);
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: clamp(0.7rem, 1.5vw, 1.8rem);
}

.nav-link {
    color: var(--text-white);
    font-weight: 700;
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    text-decoration: none;
    opacity: 0.9;
}

/* --- HERO SECTION --- */
.hero {
    min-height: 80vh;
    background: radial-gradient(circle at 70% 50%, #0056b3 0%, #003366 100%);
    display: flex;
    align-items: center;
    color: var(--text-white);
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
}

.hero-content {
    animation: slideInLeft 1s ease-out;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 24px;
    border-bottom: 4px solid var(--accent);
    display: inline-block;
    padding-bottom: 8px;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 32px;
    opacity: 0.9;
    font-weight: 400;
}

.hero-image-wrapper {
    position: relative;
    animation: fadeInRight 1s ease-out;
}

.hero-image {
    width: 100%;
    filter: drop-shadow(0 20px 50px rgba(0,0,0,0.5));
}

.btn-group {
    display: flex;
    gap: 16px;
}

.btn {
    padding: 14px 28px;
    border-radius: var(--radius-s);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-light);
    color: var(--text-white);
    box-shadow: 0 4px 14px rgba(0, 123, 255, 0.4);
}

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

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

.btn-white:hover {
    background-color: #f1f5f9;
    transform: translateY(-2px);
}

/* --- EXPLODED VIEW SECTION --- */
.exploded-view {
    padding: 100px 0;
    text-align: center;
    background-color: var(--bg-white);
}

.section-title {
    color: var(--primary-dark);
    font-size: 1.8rem;
    margin-bottom: 12px;
    position: relative;
    padding-bottom: 16px;
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-light);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 48px;
    text-align: center;
}

.graphic-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.graphic-image {
    width: 100%;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.1));
}

/* --- PRODUCTS GRID --- */
.products {
    background-color: var(--bg-tech);
    padding: 100px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-m);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-premium);
}

.product-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.product-info {
    padding: 0;
    text-align: center;
}

.product-title {
    background: var(--primary);
    color: var(--text-white);
    margin: 0;
    padding: 16px;
    font-size: 1.1rem;
}

.catalog-btn-wrapper {
    text-align: center;
}

.btn-outline {
    border: 2px solid var(--primary-light);
    color: var(--primary-light);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-light);
    color: var(--text-white);
}

/* --- CATALOG & SERVICES --- */
.page-header {
    background: var(--primary-dark);
    color: var(--text-white);
    padding: 60px 0;
    text-align: center;
    margin-bottom: 60px;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-bottom: 80px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 80px;
}

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

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

.catalog-card {
    background: var(--bg-white);
    border-radius: var(--radius-m);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.catalog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary-light);
}

.card-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
    color: var(--primary);
}

.card-title {
    font-size: 1.25rem;
    color: var(--primary-dark);
    margin-bottom: 24px;
    min-height: 3em;
    display: flex;
    align-items: center;
}

/* --- MODAL SYSTEM --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 51, 102, 0.6);
    backdrop-filter: blur(8px);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius-l);
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-title {
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.honeypot {
    display: none;
}

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

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 64px;
}

.contact-info h2 {
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 1.1rem;
    color: var(--primary-dark);
    font-weight: 500;
}

.info-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-light);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--primary-light);
}

.contact-form {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tech);
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    font-family: var(--font-main);
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

.btn-submit {
    width: 100%;
    background-color: var(--primary);
    color: var(--text-white);
    padding: 16px;
    margin-top: 16px;
}

/* --- ANIMATIONS --- */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .hero-grid, .contact-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .btn-group {
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* --- ABOUT PAGE ENHANCEMENTS --- */
.about-diff-item,
.about-info-card {
    transition: var(--transition);
}

.about-diff-item {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.about-diff-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary-light);
}

.about-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--bg-tech);
    color: var(--primary);
}

.about-info-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
}

/* --- REUSABLE HEADER/FOOTER + MOBILE NAV --- */

.logo-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
}

.logo-card-img {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.hamburger {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(0, 21, 39, 0.35);
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 99px;
    transition: transform 180ms ease, opacity 180ms ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.menu-backdrop {
    position: fixed;
    inset: 80px 0 0;
    background: rgba(1, 10, 19, 0.56);
    z-index: 1140;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.menu-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav {
    position: fixed;
    top: 80px;
    right: 0;
    width: min(78vw, 330px);
    height: calc(100vh - 80px);
    background: rgba(2, 19, 35, 0.94);
    backdrop-filter: blur(8px);
    z-index: 1150;
    padding: 1rem;
    border-left: 1px solid rgba(255,255,255,0.13);
    transform: translateX(100%);
    transition: transform 230ms ease;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.mobile-nav.open { transform: translateX(0); }

.mobile-nav-link {
    color: var(--text-on-dark, #eef5ff);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 0.75rem;
}

body.menu-open { overflow: hidden; }

.nav-item-mega { position: relative; }
.mega-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 420px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: transform 220ms ease, opacity 220ms ease;
    z-index: 1300;
}
.nav-item-mega.open .mega-menu,
.nav-item-mega:hover .mega-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.mega-menu-inner {
    padding: 18px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(10, 30, 55, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.35);
    font-family: 'Arial Narrow', Arial, sans-serif;
}

.mega-logo-card { display: none; }
.mega-logo-img  { display: none; }

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.mega-menu-item {
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.10);
    border-radius: 10px;
    padding: 10px 12px;
    color: #eef5ff;
    text-decoration: none;
    transition: background 180ms ease;
    display: block;
}

.mega-menu-item:hover {
    background: rgba(255,255,255,0.20);
}

.mega-menu-label {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.75rem;
    color: #ffffff;
}

.mega-menu-item p {
    font-size: 0.81rem;
    opacity: 0.80;
    color: #d0e4f7;
    margin: 0;
}

.reusable-footer {
    position: relative;
    z-index: 16;
    background: #031425;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #c8d8e8;
    text-align: center;
    padding: 2.2rem 0;
}

.reusable-footer .brand {
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 0.35rem;
}

.footer-phones {
    color: #c8d8e8;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.footer-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: #d9e8f8;
    text-decoration: none;
    font-weight: 400;
}

/* ── Componentes de subpáginas ──────────────────────────────── */

.about-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-l);
    padding: 28px 32px;
    box-shadow: var(--shadow-sm);
}

.feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.feature-item:last-child { border-bottom: none; }

.feature-title {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
    font-size: 1rem;
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-sm);
}

.timeline-item {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.timeline-year {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary);
    min-width: 72px;
    padding-top: 2px;
    letter-spacing: -0.02em;
}

.timeline-content {
    flex: 1;
    border-left: 2px solid var(--border);
    padding-left: 24px;
    padding-bottom: 16px;
}

@media (max-width: 768px) {
    .timeline-item { flex-direction: column; gap: 6px; }
    .timeline-content { border-left: none; padding-left: 0; }
}

@media (max-width: 900px) {
    .nav-links { display: none; }
    .hamburger { display: inline-flex; }
    .mobile-nav { top: 72px; height: calc(100vh - 72px); }
    .menu-backdrop { inset: 72px 0 0; }
}

/* ── Logo 2026 — navbar lockup ──────────────────────────────── */
.logo-lockup {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    text-decoration: none;
}

.logo-symbol-badge {
    background: #fff;
    border-radius: 8px;
    padding: 3px 5px;
    display: flex;
    align-items: center;
}

.logo-symbol-badge img {
    height: 28px;
    width: auto;
    display: block;
}

.logo-wordmark {
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: #fff;
    text-transform: uppercase;
}

/* ── Logo 2026 — megamenu lockup ─────────────────────────────── */
.mega-logo-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    margin-bottom: 14px;
}
