/* Estilos generales y Variables CSS */
:root {
    --primary-color: #0d6efd;
    --dark-color: #1a1a1a;
    --light-color: #ffffff;
    --light-gray: #f8f9fa;
    --shadow-color-light: rgba(0, 0, 0, 0.1);
    --shadow-color-dark: rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Arial', sans-serif;
    padding-top: 56px;
    background-color: var(--light-gray);
}

/* Hero Banner */
.hero-banner {
    background-color: #000;
    color: var(--light-color);
    padding: 5rem 0;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow-color-light);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-color-light);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Tablas */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table td, .table th {
    vertical-align: middle;
    padding: 12px;
}

/* Navbar */
.navbar {
    box-shadow: 0 4px 12px var(--shadow-color-light);
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.navbar.scrolled {
    background-color: rgba(13, 110, 253, 0.98);
    padding: 0.3rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: rotate(10deg);
}

.nav-link {
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
}

.nav-link.active {
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--light-color);
    border-radius: 2px;
}

/* Dropdowns con animación (CSS-driven) */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 25px var(--shadow-color-dark);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(13, 110, 253, 0.95);
    opacity: 0;
    visibility: hidden;
    transform-origin: top center;
    transform: scaleY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s;
}

.dropdown-menu.show {
    visibility: visible;
    opacity: 1;
    transform: scaleY(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    transition: all 0.2s ease;
    position: relative;
    color: var(--light-color);
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    padding-left: 1.75rem;
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-item:hover:before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--light-color);
    border-radius: 50%;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    position: relative;
}

footer a {
    color: var(--light-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--primary-color);
    text-decoration: none;
    padding-left: 5px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-right: 0.5rem;
}

.social-icons a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}

/* Modal de cookies */
.cookie-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000; /* Aumentado para estar por encima del chat */
    justify-content: center;
    align-items: center;
}

.cookie-modal {
    background: var(--light-color);
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 2px 10px var(--shadow-color-dark);
}

.cookie-modal p {
    margin-bottom: 15px;
    font-size: 1rem;
}

.cookie-modal .cookie-links a {
    margin: 0 10px;
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-modal .cookie-buttons button {
    margin: 5px;
}

/* Asegurar que el chat de n8n no interfiera */
#n8n-chat {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

/* Responsive y Lógica de Dropdown */
@media (max-width: 991.98px) {
    .navbar-collapse {
        padding-top: 1rem;
    }
    
    .dropdown-menu {
        margin-left: 1rem;
        width: calc(100% - 2rem);
    }
    
    .dropdown-menu.show {
        visibility: visible;
        opacity: 1;
        transform: scaleY(1);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
}

@media (min-width: 992px) {
    .dropdown-hover:hover > .dropdown-menu {
        visibility: visible;
        opacity: 1;
        transform: scaleY(1);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s;
    }
}

/* Botones */
.btn-outline-light:hover {
    color: var(--primary-color);
    background-color: var(--light-color);
}

.btn-light {
    transition: all 0.3s ease;
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color-light);
}

/* Efectos globales */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Badges */
.badge {
    font-weight: 500;
    font-size: 0.7rem;
}