/* =============================================================================
   PORTAL DE ARCHIVOS - FUNDACIÓN BIODIVERSIDAD
   Colores y estilos corporativos según Manual de Identidad Gráfica 2024
   ============================================================================= */

/* Variables CSS - Colores Corporativos */
:root {
    /* Color principal - Verde Pantone 363 C */
    --fb-green-primary: #4a8b2c;
    --fb-green-light: #6ba842;
    --fb-green-dark: #3a7022;
    --fb-green-pale: #e8f5e0;
    
    /* Color del Gobierno de España */
    --gov-yellow: #F1BF00;
    
    /* Grises y neutros */
    --gray-dark: #333333;
    --gray-medium: #666666;
    --gray-light: #999999;
    --gray-pale: #f5f5f5;
    
    /* Estados */
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    
    /* Tipografía */
    --font-primary: 'Poppins', 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* =============================================================================
   TIPOGRAFÍA CORPORATIVA
   ============================================================================= */

/* Importar Google Fonts - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    height: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-dark);
    background-color: #ffffff;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* =============================================================================
   HEADER Y NAVEGACIÓN
   ============================================================================= */

.navbar {
    background-color: #ffffff;
    border-bottom: 3px solid var(--fb-green-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0.75rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0;
}

.navbar-brand img {
    height: 50px;
    width: auto;
}

.navbar-nav .nav-link {
    color: var(--gray-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--fb-green-primary);
    background-color: var(--fb-green-pale);
    border-radius: 4px;
}

.navbar-nav .nav-link.active {
    color: var(--fb-green-primary);
    font-weight: 600;
}

/* =============================================================================
   MAIN CONTENT
   ============================================================================= */

main {
    flex: 1;
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
}

/* =============================================================================
   BOTONES CORPORATIVOS
   ============================================================================= */

.btn-primary {
    background-color: var(--fb-green-primary);
    border-color: var(--fb-green-primary);
    color: white;
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--fb-green-dark);
    border-color: var(--fb-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(74, 139, 44, 0.3);
}

.btn-primary:active,
.btn-primary:focus {
    background-color: var(--fb-green-dark);
    border-color: var(--fb-green-dark);
    box-shadow: 0 0 0 0.2rem rgba(74, 139, 44, 0.25);
}

.btn-secondary {
    background-color: var(--gray-medium);
    border-color: var(--gray-medium);
    color: white;
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: 4px;
}

.btn-secondary:hover {
    background-color: var(--gray-dark);
    border-color: var(--gray-dark);
}

.btn-outline-primary {
    color: var(--fb-green-primary);
    border-color: var(--fb-green-primary);
    font-weight: 500;
}

.btn-outline-primary:hover {
    background-color: var(--fb-green-primary);
    border-color: var(--fb-green-primary);
    color: white;
}

/* =============================================================================
   CARDS Y PANELES
   ============================================================================= */

.card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.card-header {
    background-color: var(--fb-green-pale);
    border-bottom: 2px solid var(--fb-green-primary);
    color: var(--gray-dark);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.5rem 1.25rem;
}

/* =============================================================================
   FORMULARIOS
   ============================================================================= */

.form-label {
    font-weight: 500;
    color: var(--gray-dark);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.625rem 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--fb-green-primary);
    box-shadow: 0 0 0 0.2rem rgba(74, 139, 44, 0.15);
    outline: 0;
}

.form-check-input:checked {
    background-color: var(--fb-green-primary);
    border-color: var(--fb-green-primary);
}

.form-check-input:focus {
    border-color: var(--fb-green-primary);
    box-shadow: 0 0 0 0.2rem rgba(74, 139, 44, 0.15);
}

/* =============================================================================
   ALERTAS Y MENSAJES
   ============================================================================= */

.alert {
    border-radius: 4px;
    border-left-width: 4px;
    padding: 1rem 1.25rem;
}

.alert-success {
    background-color: #d4edda;
    border-color: var(--success);
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: var(--danger);
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: var(--warning);
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: var(--info);
    color: #0c5460;
}

/* =============================================================================
   TABLAS
   ============================================================================= */

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: var(--fb-green-primary);
    color: white;
    font-weight: 600;
    border-bottom: 2px solid var(--fb-green-dark);
    padding: 0.875rem;
}

.table-hover tbody tr:hover {
    background-color: var(--fb-green-pale);
}

.table tbody td {
    padding: 0.875rem;
    vertical-align: middle;
}

/* =============================================================================
   BADGES Y ESTADOS
   ============================================================================= */

.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
}

.badge-success {
    background-color: var(--success);
}

.badge-warning {
    background-color: var(--warning);
    color: var(--gray-dark);
}

.badge-danger {
    background-color: var(--danger);
}

.badge-pending {
    background-color: var(--warning);
    color: var(--gray-dark);
}

.badge-approved {
    background-color: var(--success);
}

.badge-rejected {
    background-color: var(--danger);
}

/* =============================================================================
   FOOTER
   ============================================================================= */

footer {
    background-color: var(--fb-green-primary);
    color: white;
    padding: 2rem 0 1rem;
    margin-top: auto;
    border-top: 4px solid var(--fb-green-dark);
}

footer a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

footer a:hover {
    opacity: 0.8;
}

.footer-brand {
    margin-bottom: 1rem;
}

.footer-brand img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-info {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
}

/* =============================================================================
   PÁGINA DE INICIO
   ============================================================================= */

.hero-section {
    background: linear-gradient(135deg, var(--fb-green-pale) 0%, #ffffff 100%);
    padding: 3rem 0;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.hero-title {
    color: var(--fb-green-primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    color: var(--gray-medium);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.feature-box {
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    border: 2px solid var(--fb-green-pale);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-box:hover {
    border-color: var(--fb-green-primary);
    box-shadow: 0 8px 16px rgba(74, 139, 44, 0.15);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 3rem;
    color: var(--fb-green-primary);
    margin-bottom: 1rem;
}

.feature-title {
    color: var(--fb-green-primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* =============================================================================
   LISTA DE ARCHIVOS
   ============================================================================= */

.file-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.file-item:hover {
    background-color: var(--fb-green-pale);
    border-color: var(--fb-green-primary);
}

.file-icon {
    font-size: 2rem;
    color: var(--fb-green-primary);
    margin-right: 1rem;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 0.25rem;
}

.file-meta {
    font-size: 0.875rem;
    color: var(--gray-medium);
}

/* =============================================================================
   UPLOAD AREA
   ============================================================================= */

.upload-area {
    border: 2px dashed var(--fb-green-primary);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    background-color: var(--fb-green-pale);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    background-color: #d4edcc;
    border-color: var(--fb-green-dark);
}

.upload-icon {
    font-size: 4rem;
    color: var(--fb-green-primary);
    margin-bottom: 1rem;
}

/* =============================================================================
   ADMIN PANEL
   ============================================================================= */

.admin-header {
    background-color: var(--fb-green-primary);
    color: white;
    padding: 1.5rem;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.nav-tabs {
    border-bottom: 2px solid var(--fb-green-primary);
}

.nav-tabs .nav-link {
    color: var(--gray-medium);
    font-weight: 500;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: var(--fb-green-primary);
    border-bottom-color: var(--fb-green-light);
}

.nav-tabs .nav-link.active {
    color: var(--fb-green-primary);
    background-color: transparent;
    border-bottom-color: var(--fb-green-primary);
    font-weight: 600;
}

/* =============================================================================
   UTILIDADES
   ============================================================================= */

.text-primary {
    color: var(--fb-green-primary) !important;
}

.bg-primary {
    background-color: var(--fb-green-primary) !important;
}

.border-primary {
    border-color: var(--fb-green-primary) !important;
}

.text-muted {
    color: var(--gray-medium) !important;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
    .navbar-brand img {
        height: 40px;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .feature-box {
        margin-bottom: 1rem;
    }
    
    footer {
        padding: 1.5rem 0 1rem;
    }
}

/* =============================================================================
   ANIMACIONES
   ============================================================================= */

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
    .navbar,
    footer,
    .btn {
        display: none;
    }
    
    body {
        color: black;
        background: white;
    }
}
