/* =========================================
   CUSTOM.CSS - DokuWiki Bootstrap3
   Sidebar sticky + Footer normal
========================================= */

/* -------------------
   Paneles de información
------------------- */
.panel-info {
    background-color: #e6f0fa;
    border: 1px solid #2a6ebb;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.panel-info img {
     width: 100%;   
     max-width: 900px;
     height: auto;
     display: block;
     margin: 0 auto;
}

/* Paneles de advertencia */
.panel-warning {
    background-color: #fff4e6;
    border: 1px solid #ffa500;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

/* Panel neutro por defecto */
.panel-default {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* -------------------
   Títulos
------------------- */
.title-primary {
    color: #2a6ebb;
    font-size: 1.8em;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 2px solid #2a6ebb;
    padding-bottom: 5px;
}

.title-secondary {
    color: #4a90e2;
    font-size: 1.4em;
    margin-top: 15px;
    margin-bottom: 8px;
}

/* -------------------
   Botones
------------------- */
.btn-primary {
    display: inline-block;
    background: #80b0dE;
    color: #fff;
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s, transform 0.3s;
}

.btn-primary:hover {
    background: #1f4f8b;
    transform: scale(1.05);
}

.btn-link {
    display: inline-block;
    background: #6c8bc7;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85em;
    transition: background 0.3s, transform 0.2s;
}

.btn-link:hover {
    background: #5273a1;
    transform: scale(1.05);
}

/* -------------------
   Encabezado avanzado
------------------- */
.encabezado-avanzado {
    display: flex;
    align-items: center;
    background: linear-gradient(to right, #2a6ebb, #aaccee);
    color: white;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(42,110,187,0.5);
    margin-bottom: 25px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.encabezado-avanzado:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(42,110,187,0.6);
}

.encabezado-avanzado img {
    height: 70px;
    margin-right: 20px;
    border-radius: 10px;
    transition: transform 0.3s;
}

.encabezado-avanzado img:hover {
    transform: rotate(-5deg) scale(1.05);
}

.encabezado-avanzado h1 { margin:0; font-size:2em; }
.encabezado-avanzado h2 { margin:2px 0 0; font-size:1.2em; font-weight:normal; color:#e0f0ff; }

.encabezado-avanzado .texto {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* -------------------
   Bloque de bienvenida
------------------- */
.bloque-bienvenida {
    background:#eef;
    padding:20px;
    border-radius:10px;
    margin-bottom:20px;
}

/* -------------------
   Tarjetas
------------------- */
.tarjetas {
    display:flex;
    flex-wrap:wrap;
    gap:20px;
    margin-bottom:30px;
}

.tarjeta {
    flex:1 1 250px;
    background:#f7f7f7;
    padding:15px;
    border-radius:8px;
    box-shadow:0 2px 5px rgba(0,0,0,0.1);
}

.tarjeta h3 { color:#2a6ebb; margin-top:0; }

.anim-img, .panel-info img {
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.anim-img:hover, .panel-info img:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* -------------------
   Subbotones
------------------- */
.subboton {
    margin-left:20px;
    font-size9:0.9em;
    background:#6c8bc7;
}



/* ------------------

      Tamaño IMG
---------------------*/
.img-resp {
  display: flex;
  justify-content: center;
  margin: 15px 0; /* espacio arriba y abajo de las imágenes */
}

.img-resp img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}




/* ====================
   SIDEBAR STICKY
==================== */
/* Sidebar fija estilo panel-default */
.sidebar-panel {
    position: fixed;
    z-index: 50;
    top: 100px;
    left: 20px;
    width: 300px;
    max-height: calc(100vh - 120px); /* altura máxima: pantalla - margen */
    overflow-y: auto; /* scroll interno si es más alta que la ventana */
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Links internos de la sidebar */
.sidebar-panel a {
    text-decoration: none;
    color: #6c8bc7;
    font-size: 0.95em;
    transition: color 0.2s;
}

.sidebar-panel a:hover {
    color: #5273a1;
    text-decoration: underline;
}

/* Listas internas */
.sidebar-panel ul {
    padding-left: 20px;
    list-style-type: disc;
}

.sidebar-panel ul ul {
    list-style-type: circle;
    padding-left: 15px;
}

/* Contenido principal con margen solo en escritorio */
.main-content {
    margin-left: 340px; /* ancho sidebar + margen */
}

/* Responsivo: en pantallas pequeñas la sidebar vuelve a flujo normal */
@media (max-width: 768px) {
    .sidebar-panel {
        position: static;
        width: 100%;
        max-height: none;
        margin-bottom: 20px;
    }
    .main-content {
        margin-left: 0;
    }
}

/* -------------------
   FOOTER NORMAL
------------------- */
#dw__footer {
    position: relative !important;
    bottom: auto !important;
    width: 100%;
    z-index: auto !important;
}

/* -------------------
   RESPONSIVE
------------------- */
@media (max-width: 1024px) {
    .sidebar-panel {
        position: static !important;
        width: 100% !important;
        max-height: none;
        margin-bottom: 20px;
        z-index: auto !important;
    }
    .panel.panel-default,
    .panel-body.page  {
        margin-left: 0 !important;
       width: 100% !important;
    }

.page-container {
    display: flex;           /* pone sidebar y contenido lado a lado */
    align-items: flex-start; /* alinea al inicio de la página */
    gap: 20px;               /* separación entre sidebar y contenido */
}
}
