/* ================================
   ESTILOS UNIFICADOS PARA MARCAS
   ================================ */

/* ===== VARIABLES GLOBALES ===== */
:root {
    --metal-dark: #0f172a;         /* Azul oscuro metálico */
    --metal-blue: #1b263b;         /* Azul acero */
    --metal-accent: #0d6efd;       /* Azul principal */
    --metal-light: #2a3f5f;        /* Azul grisáceo claro */
    --metal-bright: #1e40af;       /* Azul brillante */
    --highlight:  #ecf0f1;          /* Amarillo para resaltar */
    --light: #ecf0f1;              /* Blanco humo */
    --shadow: 0 6px 16px rgba(0,0,0,0.25); /* Sombras suaves */
    --transition: all 0.3s ease;   /* Transiciones suaves */
}

/* ===== NAVBAR ===== */
.navbar {
    background: linear-gradient(90deg, var(--metal-dark), var(--metal-accent), var(--metal-dark)) !important;
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0 20px;
}

/* Logo */
.nav-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    gap: 12px;
}

.logo-img {
    height: 45px;
    width: auto;
}

.nav-brand span {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--light);
}

/* Links de navegación */
.nav-links {
    display: flex;
    gap: 25px;
}

.nav-link {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
    opacity: 0.8;
}

.nav-link:hover, 
.nav-link.active {
    color: var(--highlight);
    opacity: 1;
}

.nav-link.active {
    font-weight: 700;
    transform: scale(1.05);
    text-shadow: 0 0 10px  #ecf0f1(250, 204, 21, 0.5);
}

/* Subrayado animado en link activo */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--highlight), transparent);
    border-radius: 2px;
    animation: glowUnderline 2s ease-in-out infinite;
}

@keyframes glowUnderline {
    0%, 100% {
        opacity: 0.7;
        box-shadow: 0 0 5px var(--highlight);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 15px var(--highlight);
    }
}

/* Botón menú móvil */
#mobile-menu-button {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1002;
    padding: 8px 12px;
    transition: var(--transition);
    border-radius: 4px;
}

#mobile-menu-button:hover {
    background: rgba(255,255,255,0.1);
    color: var(--highlight);
}

/* Menú móvil */
#mobile-menu {
    display: none;
    flex-direction: column;
    background: var(--metal-blue);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 1001;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    border-top: 1px solid rgba(255,255,255,0.1);
}

#mobile-menu.active {
    display: flex;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

#mobile-menu .mobile-link {
    color: var(--light);
    text-decoration: none;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
    font-weight: 500;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

#mobile-menu .mobile-link:hover, 
#mobile-menu .mobile-link.active {
    background: rgba(255,255,255,0.05);
    color: var(--highlight);
    padding-left: 25px;
}

#mobile-menu .mobile-link.active {
    font-weight: 700;
    background: linear-gradient(90deg, rgba(250, 204, 21, 0.15), transparent);
    border-left: 4px solid var(--highlight);
    text-shadow: 0 0 10px  #ecf0f1(250, 204, 21, 0.5);
    transform: translateX(5px);
}

/* ===== SECCIÓN MARCAS ===== */
.brands-section {
    background: linear-gradient(135deg, var(--metal-blue), var(--metal-light));
    min-height: 100vh;
    padding: 80px 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Título animado */
.animated-title {
    font-size: 3.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 50px;
    background: linear-gradient(45deg, #0d6efd, #1e40af, #1b263b, #0ea5e9, #0d6efd);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease infinite;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    letter-spacing: -0.5px;
    position: relative;
}

.animated-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #0d6efd, transparent);
    animation: lineGlow 2s ease-in-out infinite;
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes lineGlow {
    0%, 100% { opacity: 0.7; width: 150px; }
    50%      { opacity: 1; width: 200px; box-shadow: 0 0 20px rgba(13, 110, 253, 0.6); }
}

/* Línea divisoria */
.brands-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #0d6efd, transparent);
    margin: 40px auto;
    max-width: 200px;
    border: none;
}

/* ===== FILTROS ===== */
.brand-filters {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-bottom: 60px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

#search-brand {
    width: 100%;
    max-width: 400px;
    padding: 15px 25px;
    border: 2px solid rgba(13, 110, 253, 0.3);
    border-radius: 12px;
    background: rgba(13, 110, 253, 0.1);
    color: white;
    font-size: 1.1rem;
    transition: var(--transition);
    text-align: center;
    backdrop-filter: blur(10px);
}

#search-brand:focus {
    outline: none;
    border-color: #0d6efd;
    background: rgba(13, 110, 253, 0.15);
    box-shadow: 0 0 25px rgba(13, 110, 253, 0.4);
}

#search-brand::placeholder {
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.filter-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 30px 0;
}

.filter-btn {
    padding: 12px 25px;
    border: 2px solid rgba(13, 110, 253, 0.4);
    border-radius: 25px;
    background: rgba(13, 110, 253, 0.1);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(13, 110, 253, 0.3), transparent);
    transition: left 0.5s;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(45deg, #0d6efd, #1e40af);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(13, 110, 253, 0.5);
}

/* ===== GRID DE MARCAS ===== */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 30px 0;
    justify-items: center;
}

.brand-card {
    background: linear-gradient(135deg, var(--metal-blue), var(--metal-light));
    border-radius: 16px;
    padding: 35px 25px;
    text-align: center;
    border: 1px solid rgba(13, 110, 253, 0.2);
    transition: var(--transition);
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.brand-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(13, 110, 253, 0.1), transparent);
    transition: var(--transition);
}

.brand-card:hover::before {
    left: 100%;
}

.brand-card:hover {
    background: linear-gradient(135deg, var(--metal-light), var(--metal-blue));
    border-color: #0d6efd;
    transform: translateY(-12px) rotate3d(1,1,0,3deg);
    box-shadow: 0 20px 40px rgba(13, 110, 253, 0.3);
}

.brand-card img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    margin: 0 auto 20px;
    border-radius: 12px;
    padding: 20px;
    background: rgba(13, 110, 253, 0.08);
    transition: var(--transition);
    display: block;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(13, 110, 253, 0.2);
}

.brand-card:hover img {
    transform: scale(1.1) rotate(2deg);
    background: rgba(13, 110, 253, 0.15);
    box-shadow: 0 10px 25px rgba(13, 110, 253, 0.3);
}

.brand-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light);
    margin: 0;
    transition: var(--transition);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.brand-card:hover h3 {
    color: #0d6efd;
    transform: scale(1.05);
}

/* ===== FOOTER ===== */
.bg-gray-900.text-white.py-6 {
    background: linear-gradient(90deg, var(--metal-dark), var(--metal-blue), var(--metal-dark)) !important;
    position: relative;
}

.bg-gray-900.text-white.py-6::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.mb-4.space-x-6 a {
    transition: var(--transition);
    display: inline-block;
    color: rgba(255, 255, 255, 0.7) !important;
}

.mb-4.space-x-6 a:hover {
    color: #0d6efd !important;
    transform: translateY(-4px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links { display: none !important; }
    #mobile-menu-button { display: block !important; }
    .animated-title { font-size: 2.5rem; }
    .brand-filters { max-width: 90%; }
    .brands-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 25px; }
    .brand-card { padding: 30px 20px; max-width: 260px; }
    .brand-card img { width: 120px; height: 120px; padding: 15px; }
    .nav-brand span { font-size: 1.1rem; }
    .logo-img { height: 38px; }
}

@media (max-width: 480px) {
    .animated-title { font-size: 2rem; }
    .brands-grid { grid-template-columns: 1fr; }
    .brand-card { padding: 25px 20px; max-width: 280px; }
    .brand-card img { width: 100px; height: 100px; padding: 12px; }
    #mobile-menu .mobile-link { padding: 16px 20px; font-size: 1rem; }
    .filter-buttons { flex-direction: column; align-items: center; }
    .filter-btn { width: 200px; }
}