/**
 * ============================================
 * EL FARO - CUSTOM BULMA STYLES (MVC VERSION)
 * ============================================
 * Estilos personalizados para el sitio El Faro en arquitectura MVC.
 * Mantiene compatibilidad con Bulma CSS v1.0.
 */

/* Variables de marca */
:root {
    --faro-navy: #1e3c72;
    --faro-blue: #2a5298;
    --faro-accent: #f5a623;
    --faro-dark: #0f1f3d;
    --faro-success: #48c774;
    --faro-danger: #f14668;
}

/* --------------------------------------------
   TIPOGRAFÍA Y BASE
   -------------------------------------------- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    background-color: #f5f7fa !important;
    min-height: 100vh;
    color: #363636;
}

main {
    min-height: calc(100vh - 300px);
}

/* --------------------------------------------
   NAVBAR
   -------------------------------------------- */
.navbar.is-primary {
    background: linear-gradient(135deg, var(--faro-navy) 0%, var(--faro-blue) 100%);
    box-shadow: 0 2px 10px rgba(30, 60, 114, 0.3);
}

.navbar-item.is-active {
    background-color: rgba(255, 255, 255, 0.2) !important;
    font-weight: 700;
    border-bottom: 2px solid var(--faro-accent);
}

.navbar-burger {
    color: white;
}

.navbar-burger:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-dropdown {
    border-top: 2px solid var(--faro-accent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Badge de plan en navbar */
.navbar-item .tag.is-warning {
    font-size: 0.65rem;
    height: 1.2em;
    padding-left: 0.5em;
    padding-right: 0.5em;
}

/* --------------------------------------------
   CARDS E IMÁGENES
   -------------------------------------------- */
.card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background-color: white;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border: 1px solid #eee;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.card-image {
    position: relative;
    background-color: #f5f5f5;
    overflow: hidden;
}

.card-image img {
    transition: transform 0.4s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

/* Badge de nivel de acceso en cards */
.card-image .tag.is-warning {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
}

/* --------------------------------------------
   HERO / DESTACADOS
   -------------------------------------------- */
.hero.is-primary {
    background: linear-gradient(135deg, var(--faro-navy) 0%, var(--faro-blue) 100%);
    border-radius: 12px;
}

.hero .title,
.hero .subtitle {
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* --------------------------------------------
   NOTIFICATION BAR
   -------------------------------------------- */
.notification.is-warning.is-light {
    background-color: #fffbeb;
    border-bottom: 2px solid var(--faro-accent);
    padding: 0.75rem 1.25rem;
}

/* --------------------------------------------
   FORMULARIOS
   -------------------------------------------- */
.label {
    color: #363636 !important;
    font-weight: 600;
    font-size: 0.9rem;
}

.input,
.textarea,
.select select {
    color: #363636 !important;
    background-color: white !important;
    border-color: #dbdbdb;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input:focus,
.textarea:focus,
.select select:focus {
    border-color: var(--faro-blue);
    box-shadow: 0 0 0 0.125em rgba(42, 82, 152, 0.25);
}

.input::placeholder,
.textarea::placeholder {
    color: #b5b5b5 !important;
}

.input.is-danger,
.textarea.is-danger {
    border-color: var(--faro-danger);
}

.input.is-danger:focus,
.textarea.is-danger:focus {
    box-shadow: 0 0 0 0.125em rgba(241, 70, 104, 0.25);
}

.box.has-background-white {
    background-color: #ffffff !important;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* --------------------------------------------
   BOTONES
   -------------------------------------------- */
.button.is-primary {
    background: linear-gradient(135deg, var(--faro-navy) 0%, var(--faro-blue) 100%);
    border: none;
    transition: all 0.3s ease;
}

.button.is-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.4);
    background: linear-gradient(135deg, #1a3360 0%, #244880 100%);
}

.button.is-primary:active {
    transform: translateY(0);
}

.button.is-warning {
    background-color: var(--faro-accent);
    color: #1a1a2e;
    border: none;
    font-weight: 600;
}

.button.is-warning:hover {
    background-color: #e09513;
    color: #1a1a2e;
}

/* --------------------------------------------
   TOAST NOTIFICATIONS
   -------------------------------------------- */
#toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    width: 100%;
}

#toast-container .notification {
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease;
    border-radius: 8px;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

/* --------------------------------------------
   FOOTER
   -------------------------------------------- */
.footer.has-background-dark {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    padding: 3rem 1.5rem 1.5rem;
}

.footer .title.is-6 {
    border-bottom: 2px solid var(--faro-accent);
    padding-bottom: 0.5rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.footer a.has-text-grey-light:hover {
    color: white !important;
    text-decoration: underline;
}

.hover-white:hover {
    color: white !important;
}

/* --------------------------------------------
   PERFIL / SIDEBAR
   -------------------------------------------- */
.menu-list a.is-active {
    background-color: var(--faro-blue);
    color: white;
}

.menu-list a:hover {
    background-color: #f5f5f5;
}

/* Avatar circular */
.image.is-128x128 .has-background-primary {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --------------------------------------------
   PLANES DE SUSCRIPCIÓN
   -------------------------------------------- */
.card.has-background-primary-light {
    border: 2px solid var(--faro-blue);
}

.card.has-background-warning-light {
    border: 2px solid var(--faro-accent);
}

/* --------------------------------------------
   TABLAS ADMIN
   -------------------------------------------- */
.table thead th {
    background-color: var(--faro-navy);
    color: white;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* --------------------------------------------
   MULTIMEDIA
   -------------------------------------------- */
video,
audio {
    width: 100%;
    border-radius: 8px;
}

/* --------------------------------------------
   PAGINACIÓN
   -------------------------------------------- */
.pagination-link.is-current {
    background-color: var(--faro-blue);
    border-color: var(--faro-blue);
    color: white;
}

.pagination-link:hover:not(.is-current) {
    background-color: #f5f5f5;
    border-color: #dbdbdb;
}

/* --------------------------------------------
   BADGES Y TAGS
   -------------------------------------------- */
.tag.is-primary {
    background-color: var(--faro-blue);
}

.tag.is-warning {
    background-color: var(--faro-accent);
    color: #1a1a2e;
}

/* --------------------------------------------
   DETAILS / FAQ
   -------------------------------------------- */
details {
    border: 1px solid #dbdbdb;
    border-radius: 6px;
    padding: 1rem;
    background-color: white;
}

details summary {
    cursor: pointer;
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::before {
    content: "▶ ";
    color: var(--faro-blue);
    margin-right: 0.5rem;
    transition: transform 0.2s;
}

details[open] summary::before {
    content: "▼ ";
}

/* --------------------------------------------
   ANIMACIONES
   -------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section {
    animation: fadeIn 0.4s ease;
}

/* --------------------------------------------
   RESPONSIVE
   -------------------------------------------- */
@media (max-width: 768px) {
    .hero.is-medium .title.is-2 {
        font-size: 1.5rem;
    }

    .hero.is-medium .subtitle.is-4 {
        font-size: 1rem;
    }

    #toast-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .footer .columns .column {
        margin-bottom: 2rem;
    }

    .navbar-item .buttons {
        flex-direction: column;
        width: 100%;
    }

    .navbar-item .buttons .button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 1024px) {
    .navbar-item.has-dropdown .navbar-dropdown {
        display: none;
    }

    .navbar-item.has-dropdown.is-active .navbar-dropdown,
    .navbar-item.has-dropdown:hover .navbar-dropdown {
        display: block;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1023px) {
    .column.is-4-desktop.is-6-tablet {
        padding: 0.5rem;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
    }
}
