/**
 * Manual de Marca GeoDos 2026
 * Paleta y tipografía institucional
 */

/* ========== Variables de marca ========== */
:root {
    /* Paleta primaria */
    --geodos-primary: #0092D5;
    /* Azul corporativo */
    --geodos-bg-light: #F4F4F4;
    /* Gris claro fondo */
    --geodos-text: #1F2732;
    /* Azul oscuro texto */
    /* Paleta secundaria */
    --geodos-accent: #26E394;
    /* Verde acento */
    --geodos-text-muted: #727272;
    /* Gris medio texto secundario */
}

/* ========== Tipografía institucional ========== */
/* Fuentes en public/fonts/geodos/: gotham_book.otf, gotham_bold.otf */
@font-face {
    font-family: 'Gotham Book';
    src: url('/fonts/geodos/gotham_book.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gotham Bold';
    src: url('/fonts/geodos/gotham_bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/**
 * Tipografía aplicada globalmente desde variables (definidas en layout con config/site.php).
 * No es necesario añadir font-geodos en cada página: body e headings ya heredan la marca.
 */
@layer base {
    body {
        font-family: var(--geodos-font-body, 'Gotham Book'), -apple-system, BlinkMacSystemFont, sans-serif;
    }

    h1, h2, h3, h4, h5, h6,
    .font-bold-custom {
        font-family: var(--geodos-font-heading, 'Gotham Bold'), sans-serif;
    }
}

footer *:not([class^="fa"]):not([class*=" fa-"]) {
    font-family: var(--geodos-font-body, 'Gotham Book'), sans-serif !important;
}

/* Solo para elementos que no son body ni h1–h6 pero deben usar la fuente de título/cuerpo */
.font-geodos-body {
    font-family: var(--geodos-font-body, 'Gotham Book'), -apple-system, BlinkMacSystemFont, sans-serif;
}

.font-geodos-title {
    font-family: var(--geodos-font-heading, 'Gotham Bold'), -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========== Panel admin: altura adecuada del header/topbar ========== */
.fi-topbar-ctn,
.fi-topbar { min-height: 4.5rem !important; }
.fi-topbar nav { height: 4.5rem !important; min-height: 4.5rem !important; }
.fi-sidebar-header-ctn,
.fi-sidebar-header { min-height: auto !important; padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }

/* ========== Notificaciones flash: fondo visible (éxito = verde suave, error = rojo suave) ========== */
.fi-no .fi-no-notification.fi-color {
    background-color: color-mix(in oklab, white 75%, var(--color-400)) !important;
}
.dark .fi-no .fi-no-notification.fi-color {
    background-color: color-mix(in oklab, var(--gray-900) 80%, var(--color-400)) !important;
}
/* Verde suave para éxito */
.fi-no .fi-no-notification.fi-status-success {
    background-color: #dcfce7 !important; /* green-100 */
    border: 1px solid rgba(22, 163, 74, 0.2);
}
.dark .fi-no .fi-no-notification.fi-status-success {
    background-color: rgba(22, 163, 74, 0.2) !important;
    border-color: rgba(34, 197, 94, 0.3);
}
/* Rojo suave para error */
.fi-no .fi-no-notification.fi-status-danger {
    background-color: #fee2e2 !important; /* red-100 */
    border: 1px solid rgba(185, 28, 28, 0.2);
}
.dark .fi-no .fi-no-notification.fi-status-danger {
    background-color: rgba(185, 28, 28, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.3);
}

/* ========== Panel admin: separación entre formulario y botones Guardar/Cancelar ========== */
[data-key="form-actions"],
.fi-fo-form [class*="footer"],
.fi-schema-form footer,
.fi-form-actions-ctn,
/* Contenedor de acciones del form (Filament 5) */
.fi-ac[data-key="form-actions"],
#form .fi-ac:last-child {
    margin-top: 1.5rem !important;
    padding-top: 1rem !important;
}

/* ========== Ficha de servicio: contenido HTML del editor ========== */
.service-ficha-content {
    color: var(--geodos-text-muted);
    font-family: 'Gotham Book', sans-serif;
    line-height: 1.75;
}
.service-ficha-content > * + * {
    margin-top: 1rem;
}
.service-ficha-content h2,
.service-ficha-content h3 {
    color: var(--geodos-text);
    font-family: 'Gotham Bold', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}
.service-ficha-content h2 {
    font-size: 1.5rem;
}
.service-ficha-content h3 {
    font-size: 1.25rem;
}
.service-ficha-content ul,
.service-ficha-content ol {
    padding-left: 1.5rem;
}
.service-ficha-content ul {
    list-style-type: disc;
}
.service-ficha-content ol {
    list-style-type: decimal;
}
.service-ficha-content li + li {
    margin-top: 0.5rem;
}
.service-ficha-content a {
    color: var(--geodos-primary);
    text-decoration: underline;
}
.service-ficha-content a:hover {
    opacity: 0.85;
}
.service-ficha-content strong {
    color: var(--geodos-text);
    font-family: 'Gotham Bold', sans-serif;
}
.service-ficha-content blockquote {
    border-left: 4px solid var(--geodos-primary);
    padding-left: 1rem;
    color: var(--geodos-text);
    font-style: italic;
}
.service-ficha-content [style*="text-align: justify"],
.service-ficha-content [style*="text-align:justify"] {
    text-align: justify;
}
.service-ficha-content [style*="text-align: center"],
.service-ficha-content [style*="text-align:center"] {
    text-align: center;
}
.service-ficha-content [style*="text-align: right"],
.service-ficha-content [style*="text-align: end"],
.service-ficha-content [style*="text-align:right"],
.service-ficha-content [style*="text-align:end"] {
    text-align: right;
}

/* Enlace de vista previa en edición de servicios (admin) */
.geodos-ficha-preview-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-family: 'Gotham Book', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--geodos-primary);
    text-decoration: none;
}
.geodos-ficha-preview-link:hover {
    opacity: 0.85;
    text-decoration: underline;
}
.geodos-ficha-preview-link svg {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

/* Vista previa de imágenes activas en edición de servicios (admin) */
.geodos-service-image-active {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fafafa;
}
.dark .geodos-service-image-active {
    border-color: #374151;
    background: rgba(255, 255, 255, 0.03);
}
.geodos-service-image-active-title {
    margin: 0 0 0.25rem;
    font-family: 'Gotham Bold', sans-serif;
    font-size: 0.8125rem;
    color: var(--geodos-text);
}
.geodos-service-image-active-source {
    margin: 0 0 0.75rem;
    font-family: 'Gotham Book', sans-serif;
    font-size: 0.8125rem;
    color: var(--geodos-text-muted);
}
.geodos-service-image-active-img {
    display: block;
    max-width: 100%;
    max-height: 10rem;
    width: auto;
    height: auto;
    border-radius: 0.5rem;
    object-fit: cover;
    border: 1px solid #e5e7eb;
}
.dark .geodos-service-image-active-img {
    border-color: #374151;
}
.geodos-service-image-empty {
    margin: 0;
    font-family: 'Gotham Book', sans-serif;
    font-size: 0.8125rem;
    color: var(--geodos-text-muted);
    font-style: italic;
}

/* Editor de fichas de servicio en el panel admin */
.fi-fo-rich-editor.geodos-service-rich-editor .tiptap,
.fi-fo-rich-editor .geodos-service-rich-editor {
    min-height: 22rem;
}
.fi-fo-field-wrp:has(.geodos-service-rich-editor) .fi-fo-rich-editor-main {
    min-height: 22rem;
}