/* ============================================
   CMS HEADER & FOOTER STYLES
   Estilos dinámicos para headers y footers configurables
   ============================================ */

/* ================== HEADER BASE ================== */
.cms-header {
    /* Background se define inline según tema */
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    width: 100%;
    display: block;
}

.cms-header.sticky {
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cms-header.transparent-on-top {
    background: transparent !important;
    border-bottom-color: transparent !important;
}

.cms-header.transparent-on-top.scrolled {
    background: white !important;
    border-bottom-color: #e5e7eb !important;
}

.cms-nav {
    width: 100%;
}

/* Logo sizes */
.cms-logo-small {
    height: 40px;
    max-width: 120px;
}

.cms-logo-medium {
    height: 55px;
    max-width: 180px;
}

.cms-logo-large {
    height: 70px;
    max-width: 250px;
}

.cms-logo {
    height: auto;
    width: auto;
    object-fit: contain;
}

.cms-site-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

/* ================== NAV LINKS ================== */
.cms-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    position: relative;
}

.cms-nav-link:hover {
    color: #2563eb;
    background-color: #f3f4f6;
}

.cms-nav-link.active {
    color: #2563eb;
    font-weight: 600;
}

.cms-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: #2563eb;
}

.cms-nav-link.highlight {
    background-color: #dbeafe;
    color: #1d4ed8;
    font-weight: 600;
}

.cms-nav-link.highlight:hover {
    background-color: #bfdbfe;
}

/* ================== BUTTONS ================== */
.cms-nav-button {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cms-nav-button-primary {
    background-color: #2563eb;
    color: white;
}

.cms-nav-button-primary:hover {
    background-color: #1d4ed8;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.cms-nav-button-outline {
    background-color: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.cms-nav-button-outline:hover {
    background-color: #2563eb;
    color: white;
}

.cms-nav-button-gradient {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
}

.cms-nav-button-gradient:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ================== BADGES ================== */
.cms-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #10b981;
    color: white;
    border-radius: 9999px;
}

/* ================== DROPDOWNS ================== */
.cms-dropdown {
    position: relative;
}

.cms-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    min-width: 12rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    padding: 0.5rem;
    z-index: 50;
}

.cms-dropdown-menu.hidden {
    display: none;
}

.cms-dropdown-item {
    display: block;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
}

.cms-dropdown-item:hover {
    background-color: #f3f4f6;
    color: #2563eb;
}

/* ================== MOBILE MENU ================== */
.cms-mobile-menu-button {
    padding: 0.5rem;
    color: #4b5563;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
}

.cms-mobile-menu-button:hover {
    background-color: #f3f4f6;
}

.cms-mobile-menu {
    background: white;
    border-top: 1px solid #e5e7eb;
}

.cms-mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
}

.cms-mobile-nav-link:hover {
    background-color: #f3f4f6;
    color: #2563eb;
}

.cms-mobile-submenu-items {
    margin-top: 0.25rem;
}

/* ================== HEADER STYLES: MODERN ================== */
.cms-header-modern {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%) !important;
    border-bottom-color: #e5e7eb !important;
}

.cms-header-modern .cms-nav-link {
    color: #1e40af !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8125rem;
}

.cms-header-modern .cms-nav-link:hover {
    color: #1e3a8a !important;
    background-color: rgba(59, 130, 246, 0.1) !important;
}

.cms-header-modern .cms-site-name {
    color: #1e40af !important;
    font-weight: 700 !important;
}

/* ================== HEADER STYLES: CLASSIC ================== */
.cms-header-classic {
    background-color: #1f2937 !important;
    border-bottom: 3px solid #374151 !important;
}

.cms-header-classic .cms-site-name,
.cms-header-classic .cms-nav-link {
    color: #f3f4f6 !important;
}

.cms-header-classic .cms-nav-link:hover {
    color: white;
    background-color: #374151;
}

.cms-header-classic .cms-nav-link.active {
    color: white;
    background-color: #4b5563;
}

.cms-header-classic .cms-nav-link.active::after {
    background-color: #60a5fa;
}

.cms-header-classic .cms-mobile-menu-button {
    color: #f3f4f6;
}

/* ================== HEADER STYLES: FRESH ================== */
.cms-header-fresh {
    background-color: white !important;
    border-bottom: 1px solid #d1fae5 !important;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.1) !important;
}

.cms-header-fresh .cms-nav-link {
    color: #065f46 !important;
    font-weight: 500 !important;
}

.cms-header-fresh .cms-nav-link:hover {
    color: #10b981 !important;
    background-color: #d1fae5 !important;
}

.cms-header-fresh .cms-nav-link.active {
    color: #059669 !important;
}

.cms-header-fresh .cms-nav-link.active::after {
    background-color: #10b981 !important;
}

.cms-header-fresh .cms-nav-link.highlight {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
}

/* ================== FOOTER BASE ================== */
.cms-footer {
    background-color: #1f2937;
    color: #d1d5db;
    margin-top: auto;
}

.cms-footer-column {
    margin-bottom: 1.5rem;
}

.cms-footer-heading {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
}

.cms-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cms-footer-links li {
    margin-bottom: 0.5rem;
}

.cms-footer-links a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.cms-footer-links a:hover {
    color: #60a5fa;
}

/* ================== SOCIAL LINKS ================== */
.cms-footer-social {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #374151;
}

.cms-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: #374151;
    color: white;
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.cms-social-link:hover {
    background-color: #60a5fa;
    transform: translateY(-2px);
}

/* ================== COPYRIGHT ================== */
.cms-footer-copyright {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    text-align: center;
}

.cms-footer-copyright p {
    font-size: 0.875rem;
    color: #9ca3af;
}

/* ================== FOOTER STYLES: MINIMAL ================== */
.cms-footer-minimal {
    background-color: #f9fafb !important;
    color: #4b5563 !important;
}

.cms-footer-minimal .cms-footer-heading {
    color: #1f2937 !important;
}

.cms-footer-minimal .cms-footer-links a {
    color: #6b7280 !important;
}

.cms-footer-minimal .cms-footer-links a:hover {
    color: #2563eb !important;
}

.cms-footer-minimal .cms-footer-social {
    border-top-color: #e5e7eb !important;
}

.cms-footer-minimal .cms-social-link {
    background-color: white !important;
    color: #4b5563 !important;
    border: 1px solid #e5e7eb !important;
}

.cms-footer-minimal .cms-social-link:hover {
    background-color: #2563eb !important;
    color: white !important;
    border-color: #2563eb !important;
}

.cms-footer-minimal .cms-footer-copyright {
    border-top-color: #e5e7eb !important;
}

.cms-footer-minimal .cms-footer-copyright p {
    color: #6b7280 !important;
}

/* ================== FOOTER STYLES: TRADITIONAL ================== */
.cms-footer-traditional {
    background-color: #111827;
    color: #d1d5db;
}

.cms-footer-traditional .cms-footer-heading {
    color: #f9fafb;
    border-bottom: 2px solid #374151;
    padding-bottom: 0.5rem;
}

.cms-footer-traditional .cms-footer-links a:hover {
    color: #fbbf24;
}

.cms-footer-traditional .cms-social-link {
    background-color: #1f2937;
}

.cms-footer-traditional .cms-social-link:hover {
    background-color: #fbbf24;
}

/* ================== FOOTER STYLES: MODERN-COMPACT ================== */
.cms-footer-modern-compact {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.cms-footer-modern-compact .cms-footer-column {
    text-align: center;
}

.cms-footer-modern-compact .cms-footer-heading {
    color: #10b981;
}

.cms-footer-modern-compact .cms-footer-links a:hover {
    color: #10b981;
}

.cms-footer-modern-compact .cms-social-link {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.cms-footer-modern-compact .cms-social-link:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

/* ================== ANIMATIONS ================== */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cms-header[data-animation="slide-down"] {
    animation: slideDown 0.3s ease-out;
}

.cms-header[data-animation="fade"] {
    animation: fadeIn 0.3s ease-out;
}

/* ================== RESPONSIVE ================== */
@media (max-width: 768px) {
    .cms-logo-medium {
        height: 45px;
        max-width: 150px;
    }
    
    .cms-logo-large {
        height: 50px;
        max-width: 180px;
    }
}
