/* =========================================
   VARIABLES GLOBALES (Paleta de HARWELT)
========================================= */
:root {
    --primary: #051A33;       /* Azul marino oscuro (Color principal) */
    --primary-dark: #020C18;  /* Tono más oscuro para efectos hover */
    --secondary: #0076E3;     /* Azul brillante (Acentos) */
    --dark: #051A33;          /* Fondo oscuro alineado a la marca */
    --light: #f7f9fb;         /* Fondo claro */
    --text-main: #333333;
    --text-muted: #666666;
    --white: #ffffff;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

/* =========================================
   RESET Y BASE
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 15px;
}

section {
    padding: 80px 0;
}

/* =========================================
   BOTONES
========================================= */
.btn-primary, .btn-secondary, .btn-submit {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary, .btn-submit {
    background: var(--secondary);
    color: var(--white);
}

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

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

/* =========================================
   HEADER Y NAVEGACIÓN
========================================= */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 999;
    padding: 15px 0;
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    color: var(--dark);
    font-weight: 500;
}

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

.btn-contact {
    background: var(--primary);
    color: var(--white) !important;
    padding: 8px 20px;
    border-radius: 5px;
}

.btn-contact:hover {
    background: var(--secondary);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--dark);
    cursor: pointer;
}

/* =========================================
   HERO SECTION (Fondo Animado Tech)
========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--primary-dark);
    overflow: hidden;
    padding-top: 80px;
}

/* Malla tecnológica animada (Grid) */
.hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: 
        linear-gradient(rgba(0, 118, 227, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 118, 227, 0.15) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: rotate(15deg);
    animation: gridMove 25s linear infinite;
    z-index: 1;
}

/* Gradiente superpuesto para profundidad */
.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, var(--primary-dark) 85%);
    z-index: 2;
    pointer-events: none;
}

@keyframes gridMove {
    0% { transform: rotate(15deg) translateY(0); }
    100% { transform: rotate(15deg) translateY(-50px); }
}

.hero-content {
    max-width: 850px;
    position: relative;
    z-index: 10; /* Por encima del fondo animado */
}


/* Efecto de texto brillante para el Lema (Corregido) */
.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 25px;
    background: linear-gradient(to right, #ffffff, var(--secondary));
    
    /* Soporte para todos los navegadores */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; 
    
    /* Filtro de sombra ajustado para no romper el degradado */
    filter: drop-shadow(0px 4px 15px rgba(0, 118, 227, 0.4));
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 35px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 650px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

/* Luces de neón flotantes */
.floating-shapes {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 3;
}

.shape {
    position: absolute;
    background: var(--secondary);
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
    animation: floatShape 12s infinite ease-in-out alternate;
}

.shape:nth-child(1) { width: 400px; height: 400px; top: -10%; left: -10%; animation-delay: 0s; }
.shape:nth-child(2) { width: 300px; height: 300px; bottom: 5%; right: -5%; animation-delay: -3s; }
.shape:nth-child(3) { width: 200px; height: 200px; top: 40%; left: 50%; animation-delay: -6s; background: #004a99; }
.shape:nth-child(4) { width: 250px; height: 250px; top: 20%; right: 20%; animation-delay: -9s; }

@keyframes floatShape {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, -40px) scale(1.1); }
}

/* Ajustes para celulares */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
    .hero-buttons {
        flex-direction: column;
    }
}
/* =========================================
   GRID BASE (Servicios, Highlights, Equipo)
========================================= */
.services-grid, .highlights-container, .team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card, .highlight-card, .team-member {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.service-card:hover, .highlight-card:hover {
    transform: translateY(-10px);
}

.service-icon, .highlight-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

/* =========================================
   REDISEÑO MODERNO: SECCIÓN NOSOTROS
========================================= */
.about {
    position: relative;
    background: var(--light);
    overflow: hidden;
}

.dot-pattern-bg {
    position: absolute;
    top: 5%;
    right: 5%;
    width: 200px;
    height: 200px;
    background-image: radial-gradient(var(--secondary) 1.5px, transparent 1.5px);
    background-size: 15px 15px;
    opacity: 0.15;
    pointer-events: none;
}

.about-grid-modern {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.about-badge {
    background: rgba(0, 118, 227, 0.1);
    color: var(--secondary);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 20px;
}

.about-lead {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.6;
    margin-bottom: 20px;
    border-left: 4px solid var(--secondary);
    padding-left: 15px;
}

.about-features-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.feature-item p {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    margin: 0;
}

.feature-icon-wrapper {
    background: var(--secondary);
    color: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-top: 2px;
    box-shadow: 0 4px 10px rgba(0, 118, 227, 0.3);
}

/* EFECTO 3D Y DECORACIÓN DE LA IMAGEN VERTICAL */
.about-image-wrapper {
    position: relative;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.image-border-deco {
    position: absolute;
    top: 0;
    right: 30px;
    width: 80%;
    height: 90%;
    border: 3px solid var(--secondary);
    border-radius: 16px;
    opacity: 0.3;
    z-index: 1;
    pointer-events: none;
    transform: translate(15px, -15px);
}

.image-3d-card {
    position: relative;
    z-index: 2;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    max-width: 420px;
    border: 4px solid var(--white);
}

.image-3d-card:hover {
    transform: translateY(-8px) rotate(1deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

.image-3d-card img {
    width: 100%;
    height: auto;
    max-height: 580px;
    object-fit: cover;
    display: block;
}

.image-overlay-info {
    position: absolute;
    bottom: 25px;
    left: 25px;
    right: 25px;
    background: rgba(5, 26, 51, 0.85); 
    backdrop-filter: blur(8px);
    color: var(--white);
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid var(--secondary);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.image-overlay-info i {
    font-size: 1.6rem;
    color: var(--secondary);
}

.image-overlay-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.image-overlay-info p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* =========================================
   REDISEÑO MODERNO: SECCIÓN PROYECTOS
========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0,0,0,0.03);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.project-image {
    width: 100%;
    height: 220px;
    background-color: #e9ecef; 
    overflow: hidden;
}

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

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.project-tag {
    background: rgba(0, 118, 227, 0.08);
    color: var(--secondary);
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 50px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.project-content h3 {
    font-size: 1.25rem;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.3;
    font-weight: 700;
}

.project-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* =========================================
   CARRUSEL DE IMÁGENES PARA PROYECTOS
========================================= */
.project-carousel {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #e9ecef;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.3s;
    z-index: 10;
    opacity: 0;
}

.project-carousel:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn:hover {
    background: var(--secondary);
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.indicator.active {
    background: var(--white);
    transform: scale(1.2);
}

/* =========================================
   EQUIPO SECTION
========================================= */
.team-member {
    padding: 0;
    overflow: hidden;
}

.member-image {
    position: relative;
    height: 250px;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center; /* Esta línea asegura que los rostros no se corten */
}

.member-info {
    padding: 25px;
    text-align: center;
}

.member-social {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* =========================================
   SECCIÓN MARCAS
========================================= */
.marcas {
    background-color: var(--white);
    padding: 80px 0;
}

.marcas-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
}

.marca-item {
    width: 160px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: var(--transition);
}

.marca-item:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.marca-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* =========================================
   CONTACTO
========================================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.contact-detail {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--secondary);
}

.contact-social h3 {
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--light);
    color: var(--primary);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary);
    color: var(--white);
    transform: translateY(-3px);
}

/* =========================================
   CTA SECTION
========================================= */
.cta {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: var(--white);
    text-align: center;
    padding: 80px 20px;
}

.cta h2 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 2.2rem;
}

.cta p {
    margin-bottom: 30px;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.cta-buttons .btn-primary {
    background: var(--white);
    color: var(--primary);
}

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

/* =========================================
   FOOTER
========================================= */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 20px;
}

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

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: var(--secondary);
}

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    outline: none;
}

.newsletter-btn {
    background: var(--secondary);
    color: var(--white);
    border: none;
    padding: 0 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-btn:hover {
    background: var(--primary);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* =========================================
   ANIMACIONES (Scroll y Utilitarios)
========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   MEDIA QUERIES (Móviles)
========================================= */
@media (max-width: 992px) {
    .about-grid-modern {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .image-border-deco {
        display: none;
    }
    
    .image-3d-card {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        display: none; 
    }
    
    .nav-menu.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .about-features-modern {
        grid-template-columns: 1fr;
    }
    .cta-buttons {
        flex-direction: column;
    }
}