/* Variables Globales de Diseño */
:root {
    --primary: #0a2557;
    /* Azul corporativo oscuro (del logo) */
    --primary-light: #1a6bcc;
    /* Azul medio corporativo */
    --accent: #d91c1c;
    /* Rojo corporativo (del logo) */
    --accent-hover: #b51515;
    /* Rojo oscuro hover */
    --text-main: #1e2a3a;
    /* Texto principal oscuro */
    --text-muted: #4a5568;
    /* Texto secundario */
    --bg-light: #f0f4f9;
    /* Fondo claro con toque azulado */
    --bg-white: #ffffff;
    --border: #cdd8e8;

    --radius: 12px;
    --shadow-sm: 0 4px 6px -1px rgb(10 37 87 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(10 37 87 / 0.12);
    --shadow-lg: 0 20px 25px -5px rgb(10 37 87 / 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Tipografía */
h1,
h2,
h3,
h4,
h5 {
    color: var(--primary);
    font-weight: 700;
    line-height: 1.25;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Clases Utilitarias */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    box-shadow: 0 4px 14px rgba(217, 28, 28, 0.4);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 28, 28, 0.5);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
    border-radius: 50px;
}

.btn-block {
    width: 100%;
}

/* Navegación */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0.75rem 0;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background-color: white;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
    font-weight: 800;
    font-size: 1.5rem;
}

/* Logo real en la navbar */
.brand-logo-img {
    height: 180px;
    max-width: 300px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: var(--transition);
}

.brand-logo-img:hover {
    transform: scale(1.05);
}

.nav-phones {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.phone-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.phone-icon-wrapper {
    background-color: #ebf0f9;
    color: var(--accent);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.85rem;
}

.phone-link:hover .phone-icon-wrapper {
    background-color: var(--accent);
    color: white;
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    background-image: url('./img/2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Solución para el bug de iPhone/iOS con background-attachment: fixed */
@supports (-webkit-touch-callout: none) {
    .hero {
        background-attachment: scroll;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(10, 37, 87, 0.85), rgba(10, 37, 87, 0.55));
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 800px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Nombre empresa en el hero */
.hero-company-name {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    margin-bottom: 0.5rem;
    margin-top: 100px;
}

.hero-title {
    font-size: 4rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: 1.5rem;
    max-width: 600px;
}

.experience-badge {
    margin-top: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.95rem;
    font-weight: 500;
    color: white;
}

/* Services */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.divider {
    height: 4px;
    width: 60px;
    background-color: var(--accent);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-img {
    height: 240px;
    overflow: hidden;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-card:hover .service-img img {
    transform: scale(1.08);
}

.service-info {
    padding: 2.5rem 2rem 2rem 2rem;
    position: relative;
    flex-grow: 1;
}

.service-icon {
    position: absolute;
    top: -28px;
    left: 2rem;
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    color: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 6px 15px rgba(26, 107, 204, 0.35);
}

.service-info h3 {
    margin-bottom: 1rem;
    font-size: 1.35rem;
}

.service-info ul {
    margin-top: 1rem;
}

.service-info ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.service-info ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.feature-item {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.feature-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
    border-color: rgba(26, 107, 204, 0.25);
}

.feature-icon-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--bg-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    transition: var(--transition);
}

.feature-item:hover .feature-icon-large {
    background: var(--accent);
    color: white;
    transform: rotate(10deg);
}

.feature-item h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.feature-item p {
    color: var(--text-muted);
}

/* Certifications */
.cert-title {
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.cert-subtitle {
    margin-bottom: 3.5rem;
    font-size: 1.15rem;
    color: var(--primary);
}

.cert-grid {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.cert-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 220px;
    transition: var(--transition);
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.cert-badge {
    width: 90px;
    height: 90px;
    background: #f1f5f9;
    color: var(--primary);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    text-align: center;
    line-height: 1.1;
    margin-bottom: 1.25rem;
}

.cert-issuer {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cert-desc {
    font-weight: 700;
    margin-top: 0.25rem;
    color: var(--primary);
}

/* Contact Section */
.contact-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.contact-card {
    background: var(--bg-white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.contact-card-icon {
    width: 64px;
    height: 64px;
    background-color: #ebf0f9;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.contact-card:hover .contact-card-icon {
    background-color: var(--accent);
    color: white;
    transform: scale(1.1);
}

.contact-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--primary);
}

.contact-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.contact-link {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.phone-primary {
    font-size: 1.2rem;
    font-weight: 700;
}

.contact-action-btn {
    box-shadow: 0 10px 20px rgba(217, 28, 28, 0.3) !important;
    animation: pulseContact 2s infinite;
}

@keyframes pulseContact {
    0% {
        box-shadow: 0 0 0 0 rgba(217, 28, 28, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(217, 28, 28, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(217, 28, 28, 0);
    }
}

/* Footer */
.footer {
    background-color: var(--primary);
    color: white;
    padding: 5rem 0 0 0;
    margin-bottom: 65px;
    /* Compensa la barra de navegación móvil */
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-logo {
    margin-bottom: 1.25rem;
}

/* Logo real en el footer */
.footer-logo-img {
    height: 180px;
    width: auto;
    display: block;
    object-fit: contain;
    /* El logo tiene fondo blanco, aplicamos un filtro para que encaje en el footer oscuro */
    filter: brightness(0) invert(1);
    margin-bottom: 1.25rem;
}

.footer-brand p {
    color: #94a3b8;
    max-width: 450px;
}

.footer-links h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-links ul li {
    margin-bottom: 0.85rem;
}

.footer-links ul li a {
    color: #94a3b8;
}

.footer-links ul li a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-bottom {
    padding: 2rem 0;
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
}

/* Barra inferior móvil */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0.5rem 0.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    border-top: 1px solid var(--border);
}

@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.nav-item i {
    font-size: 1.35rem;
    margin-bottom: 2px;
}

.nav-item.active {
    color: var(--accent);
}

/* ---- Estilos Navbar Links ---- */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Menú Hamburguesa */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

.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(6px, -6px);
}

/* Mobile menu overlay */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    padding: 1rem 2rem;
    transition: var(--transition);
}

.mobile-menu a:hover {
    color: var(--accent);
    background: var(--bg-light);
    border-radius: 8px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 0.4rem 0;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link:hover::after {
    width: 100%;
}

/* ---- Sección Quiénes Somos ---- */
.about {
    background-color: var(--bg-white);
}

.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

.about-tag {
    display: inline-block;
    background-color: rgba(217, 28, 28, 0.1);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    margin-bottom: 1.25rem;
}

.about-content h2 {
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
}

.about-lead {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

.about-text {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-call {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-light);
    padding: 1.25rem 1.5rem;
    border-radius: 0 10px 10px 0;
    margin-top: 0.5rem;
}

.about-call p {
    margin: 0;
    color: var(--text-main);
    font-size: 0.975rem;
    line-height: 1.7;
}

.about-call a {
    color: var(--primary-light);
    font-weight: 700;
    text-decoration: underline;
}

.about-values {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.value-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: var(--transition);
}

.value-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.value-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    transition: var(--transition);
}

.value-card:hover .value-icon {
    background: var(--accent);
}

.value-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
    color: var(--primary);
}

.value-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ---- Estilos Animaciones ---- */
/* Animaciones al escanear/bajar el scroll */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in {
    transform: translateY(0);
}

.slide-up {
    transform: translateY(40px);
}

.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Media Queries (Responsividad) */
@media (min-width: 769px) {
    .footer {
        margin-bottom: 0;
    }

    .hamburger,
    .mobile-menu,
    .mobile-bottom-nav {
        display: none !important;
    }
}

@media (max-width: 992px) {
    .about-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .contact-info-panel,
    .contact-form-panel {
        padding: 4rem 3rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    /* Ocultar nav links tradicional en móvil */
    .nav-links {
        display: none;
    }

    /* Mostrar hamburguesa */
    .hamburger {
        display: flex;
    }

    /* Mostrar menú móvil */
    .mobile-menu {
        display: flex;
    }

    /* Ocultar botón de teléfono en navbar cuando hay menú hamburguesa */
    .nav-actions .phone-link {
        display: none;
    }

    .phone-number {
        display: inline;
        font-size: 0.95rem;
    }

    /* Navbar más compacta */
    .navbar {
        padding: 0.5rem 0;
    }

    .brand-logo-img {
        height: 50px !important;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-info-panel,
    .contact-form-panel {
        padding: 3rem 1.5rem;
    }

    .cert-grid {
        flex-direction: column;
        align-items: center;
    }

    /* Ajustar padding del footer por la barra inferior */
    .footer {
        margin-bottom: 65px;
    }

    /* Labels flotantes para inputs en móvil */
    .form-group {
        margin-bottom: 1.25rem;
    }

    .about-wrapper {
        grid-template-columns: 1fr;
    }

    .about-content,
    .about-values {
        padding: 0 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu {
        display: flex;
    }

    .mobile-menu a {
        font-size: 1.35rem;
    }

    .brand-logo-img {
        height: 60px !important;
    }

    .hero-title {
        font-size: 3rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}