﻿/* ========================================
   RESET Y VARIABLES
======================================== */

:root {
    --azul-cr: #002B7F;
    --rojo-cr: #CE1126;
    --blanco: #FFFFFF;
    --negro: #1a1a1a;
    --gris-oscuro: #2c2c2c;
    --gris-medio: #6c757d;
    --gris-claro: #f8f9fa;
    --verde-acento: #00A859;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--negro);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

.main-content {
    padding-top: 0;
}

/* ========================================
   NAVBAR MODERNA STICKY
======================================== */

.navbar-modern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar-modern.navbar-scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo del Navbar */
.navbar-logo {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-img {
    height: 70px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--azul-cr);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo-link:hover .logo-img {
    transform: scale(1.05);
}

.logo-link:hover .logo-text {
    color: var(--rojo-cr);
}

/* Responsive Logo */
@media (max-width: 767px) {
    .logo-img {
        height: 50px;
    }

    .logo-text {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 35px;
    }

    .logo-text {
        font-size: 1.3rem;
    }
}

.navbar-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--negro);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--rojo-cr);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--rojo-cr);
    text-decoration: none;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link-special {
    background-color: var(--verde-acento);
    color: var(--blanco) !important;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.nav-link-special::after {
    display: none;
}

.nav-link-special:hover {
    background-color: #008f4b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 168, 89, 0.3);
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.navbar-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--azul-cr);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* ========================================
   HERO SECTION
======================================== */

.hero-section {
    position: relative;
    background-color: #f8f9fa;
    background-image: url('images/herobar.jpeg');
    background-size: cover;
    background-position: center 50px;
    /* Bajar la imagen para dar aire arriba */
    background-repeat: no-repeat;
    height: auto;
    min-height: 85vh;
    /* Reducir altura para mostrar menos de abajo */
    display: flex;
    align-items: flex-end;
    /* Botones al fondo */
    justify-content: center;
    overflow: hidden;
    padding-bottom: 4rem;
    /* Espacio inferior para botones */
}

/* Pseudo-elemento eliminado (ya no necesario con la imagen wide) */

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Overlay casi transparente */
    background: rgba(0, 0, 0, 0.02);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--blanco);
    max-width: 800px;
    padding: 2rem;
    pointer-events: auto;
    /* Reactivar clicks en botones */
    margin-bottom: 0;
}

/* Ocultar texto superpuesto porque la imagen ya tiene texto */
.hero-title,
.hero-subtitle {
    display: none;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--rojo-cr);
    color: var(--blanco);
    box-shadow: 0 4px 15px rgba(206, 17, 38, 0.3);
}

.btn-primary:hover {
    background-color: #a00f20;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(206, 17, 38, 0.4);
    color: var(--blanco);
    text-decoration: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--blanco);
    border: 2px solid var(--blanco);
}

.btn-secondary:hover {
    background-color: var(--blanco);
    color: var(--azul-cr);
    text-decoration: none;
}

/* Animaciones */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   CATEGORÍAS
======================================== */

.categorias-section {
    padding: 6rem 0;
    background-color: var(--blanco);
}

.categoria-card {
    margin-bottom: 2rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    background-color: var(--blanco);
}

.categoria-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.categoria-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.categoria-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.categoria-card:hover .categoria-image img {
    transform: scale(1.1);
}

.categoria-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 43, 127, 0.9) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.categoria-card:hover .categoria-overlay {
    opacity: 1;
}

.btn-categoria {
    background-color: var(--rojo-cr);
    color: var(--blanco);
    padding: 0.8rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-categoria:hover {
    background-color: #a00f20;
    transform: scale(1.05);
    text-decoration: none;
    color: var(--blanco);
}

.categoria-content {
    padding: 2rem;
    text-align: center;
}

.categoria-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--azul-cr), #003d99);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blanco);
    font-size: 2rem;
}

.categoria-content h3 {
    font-size: 1.5rem;
    color: var(--azul-cr);
    margin-bottom: 0.8rem;
    font-weight: bold;
}

.categoria-content p {
    color: var(--gris-medio);
    line-height: 1.8;
}

/* ========================================
   VALORES
======================================== */

.valores-section {
    padding: 6rem 0;
    background-color: var(--gris-claro);
}

.valores-row {
    margin-top: 3rem;
}

.valor-card {
    text-align: center;
    padding: 2rem;
    transition: transform 0.3s ease;
}

.valor-card:hover {
    transform: translateY(-5px);
}

.valor-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background-color: var(--rojo-cr);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blanco);
    font-size: 2.5rem;
    box-shadow: 0 4px 15px rgba(206, 17, 38, 0.2);
}

.valor-card h4 {
    font-size: 1.3rem;
    color: var(--azul-cr);
    margin-bottom: 0.8rem;
    font-weight: bold;
}

.valor-card p {
    color: var(--gris-medio);
    line-height: 1.6;
}

/* ========================================
   CTA SECTION
======================================== */

.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--azul-cr) 0%, #003d99 100%);
    color: var(--blanco);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta {
    padding: 1rem 2.5rem;
    background-color: var(--rojo-cr);
    color: var(--blanco);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(206, 17, 38, 0.3);
}

.btn-cta:hover {
    background-color: #a00f20;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(206, 17, 38, 0.4);
    text-decoration: none;
    color: var(--blanco);
}

.btn-cta-secondary {
    background-color: transparent;
    border: 2px solid var(--blanco);
}

.btn-cta-secondary:hover {
    background-color: var(--blanco);
    color: var(--azul-cr);
}

/* ========================================
   FOOTER MODERNO
======================================== */

.modern-footer {
    background-color: var(--gris-oscuro);
    color: var(--blanco);
    padding: 4rem 0 0;
}

.footer-section {
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
    color: var(--blanco);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-social {
    margin-top: 1rem;
}

.footer-social a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: var(--azul-cr);
    color: var(--blanco);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background-color: var(--rojo-cr);
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--rojo-cr);
    padding-left: 5px;
}

.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact i {
    color: var(--rojo-cr);
    font-size: 1.2rem;
}

.footer-bottom {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   WHATSAPP FLOTANTE
======================================== */

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background-color: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.3s ease;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.7);
}

.whatsapp-float img {
    width: 40px;
    height: 40px;
}

@keyframes pulse-whatsapp {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    }

    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.8);
    }
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 991px) {
    .logo-img {
        height: 55px;
    }

    .navbar-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 300px;
        height: calc(100vh - 70px);
        background-color: var(--blanco);
        flex-direction: column;
        padding: 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        align-items: flex-start;
    }

    .navbar-menu.active {
        right: 0;
    }

    .nav-link::after {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .categoria-image {
        height: 250px;
    }
}

@media (max-width: 767px) {
    .hero-section {
        min-height: 500px;
        background-attachment: scroll !important;
        /* Desactivar Parallax en móviles para mejor rendimiento */
        height: auto;
        /* Permitir ajuste automático en móviles */
        padding: 4rem 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn-hero {
        width: 100%;
        justify-content: center;
    }

    .valores-row [class*="col-"] {
        margin-bottom: 2rem;
    }

    .cta-content h2 {
        font-size: 1.8rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn-cta {
        width: 100%;
        justify-content: center;
    }

    .whatsapp-float {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float img {
        width: 35px;
        height: 35px;
    }
}