/* ===========================
   VARIABLES CSS GLOBALES
   =========================== */
:root {
    /* Paleta de colores pirenaicos */
    --verde-pirineo-oscuro: #1a4d36;
    --verde-pirineo: #2d6e47;
    --verde-pirineo-claro: #4a8b63;
    --verde-sage: #87a96b;
    --verde-musgo: #a8c085;
    --crema-montaña: #f8f6f0;
    --beige-piedra: #e8e4d9;
    --gris-roca: #6b7280;
    --blanco-nieve: #ffffff;
    --sombra-suave: rgba(26, 77, 54, 0.15);
    
    /* Colores administrativos */
    --admin-principal: #2c3e50;
    --admin-secundario: #34495e;
    --admin-acento: #e74c3c;
    --admin-success: #27ae60;
    --admin-warning: #f39c12;
    --admin-info: #3498db;
    --admin-danger: #e74c3c;
    --admin-bg: #ecf0f1;
    --admin-white: #ffffff;
    --admin-dark: #1a252f;
    --admin-light: #ecf0f1;
    --admin-shadow: rgba(44, 62, 80, 0.2);

    /* Variables responsive */
    --container-max-width: 1200px;
    --container-padding: 20px;
    --grid-gap: 20px;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* ===========================
   RESET Y BASE
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Verdana', sans-serif;
    color: var(--verde-pirineo-oscuro);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===========================
   UTILIDADES COMUNES
   =========================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 12px var(--sombra-suave);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    background: linear-gradient(135deg, var(--verde-sage) 0%, var(--verde-musgo) 100%);
    color: var(--verde-pirineo-oscuro);
    min-width: 120px;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--sombra-suave);
    background: linear-gradient(135deg, var(--verde-pirineo-claro) 0%, var(--verde-sage) 100%);
    color: var(--blanco-nieve);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--verde-pirineo) 0%, var(--verde-pirineo-claro) 100%);
    color: var(--blanco-nieve);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--verde-pirineo-oscuro) 0%, var(--verde-pirineo) 100%);
    color: var(--blanco-nieve);
    text-decoration: none;
}

.btn-success {
    background: linear-gradient(135deg, var(--admin-success) 0%, #2ecc71 100%);
    color: var(--admin-white);
}

.btn-warning {
    background: linear-gradient(135deg, var(--admin-warning) 0%, #e67e22 100%);
    color: var(--admin-white);
}

.btn-danger {
    background: linear-gradient(135deg, var(--admin-danger) 0%, #c82333 100%);
    color: var(--admin-white);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    margin: 2px;
    min-width: 80px;
}

/* ===========================
   ALERTAS Y MENSAJES
   =========================== */
.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-weight: 600;
    word-wrap: break-word;
}

.alert.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #b6d7a8;
}

.alert.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 2px solid #f1aeb5;
}

.alert.warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 2px solid #ffeaa7;
}

.alert.info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border: 2px solid #bee5eb;
}

/* ===========================
   GRID RESPONSIVE
   =========================== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(-1 * var(--grid-gap) / 2);
}

.col {
    flex: 1;
    padding: 0 calc(var(--grid-gap) / 2);
    min-width: 0;
}

.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }

/* ===========================
   UTILIDADES RESPONSIVE
   =========================== */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

/* ===========================
   ANIMACIONES COMUNES
   =========================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

/* Tablets y dispositivos medianos (768px a 1024px) */
@media (max-width: 1024px) {
    :root {
        --container-padding: 15px;
        --grid-gap: 15px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        min-width: 100px;
    }
}

/* Dispositivos móviles grandes (576px a 768px) */
@media (max-width: 768px) {
    :root {
        --container-padding: 10px;
        --grid-gap: 10px;
    }
    
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.8rem;
        min-width: 90px;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .btn-small {
        padding: 6px 10px;
        font-size: 0.75rem;
        min-width: 70px;
    }
    
    /* Grid responsive para móviles */
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
    .col-md-6 { flex: 0 0 100%; max-width: 100%; }
    .col-md-4 { flex: 0 0 100%; max-width: 100%; }
    .col-md-3 { flex: 0 0 100%; max-width: 100%; }
    
    .row {
        margin: 0 -5px;
    }
    
    .col {
        padding: 0 5px;
        margin-bottom: 10px;
    }
    
    /* Utilidades móviles */
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
    
    .text-md-center { text-align: center !important; }
    .text-md-left { text-align: left !important; }
}

/* Dispositivos móviles pequeños (hasta 576px) */
@media (max-width: 576px) {
    :root {
        --container-padding: 8px;
        --grid-gap: 8px;
    }
    
    html {
        font-size: 13px;
    }
    
    .container {
        padding: 0 8px;
    }
    
    .btn {
        padding: 10px 12px;
        font-size: 0.8rem;
        min-width: 80px;
        display: block;
        width: 100%;
        margin-bottom: 8px;
    }
    
    .btn-small {
        padding: 6px 8px;
        font-size: 0.7rem;
        min-width: 60px;
    }
    
    .alert {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    /* Utilidades móviles pequeños */
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
    
    .text-sm-center { text-align: center !important; }
    .text-sm-left { text-align: left !important; }
}

/* Dispositivos muy pequeños (hasta 375px) */
@media (max-width: 375px) {
    :root {
        --container-padding: 5px;
        --grid-gap: 5px;
    }
    
    html {
        font-size: 12px;
    }
    
    .container {
        padding: 0 5px;
    }
    
    .btn {
        padding: 8px 10px;
        font-size: 0.75rem;
        min-width: 70px;
    }
    
    .btn-small {
        padding: 5px 8px;
        font-size: 0.65rem;
        min-width: 50px;
    }
} 