#calendar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5px;
}
.title_c{
    text-align: center;
}
.seccionx{
  text-align: center;
  font-size: 18px;
  color: #FF0000;
}
.contbtncolors{
  width: 100%;
  height: auto;
  border: 1px solid #CCCCCC;
  background: #f0f0f0;
  padding: 10px;
  color: black;
  display: flex;
  font-size: 18px;
}
.clrcat {
  border: 0px;
  height: 20px;
  width: 20px !important;
  outline: 0;
  margin-right: 3px;
  margin-bottom: 3px;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #eee;
}
.dot {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  display: inline-block;
}
.lnkbtn{
  cursor:pointer;
}
/* Variables CSS para fácil personalización */
/* Variables CSS */
:root {
    --primary-gradient: linear-gradient(180deg, #0a49ab 0%, #0d56cc 100%);
    --primary-color: #0a49ab;
    --secondary-color: #0d56cc;
    --text-dark: #333;
    --text-light: #555;
    --bg-light: #f8f9fa;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
}

/* Estilos del modal - Versión corregida */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.3s ease-in-out;
    overflow-y: auto;
    box-sizing: border-box;
}

.modal-contenido {
    background-color: #fefefe;
    margin: 20px auto;
    border-radius: var(--border-radius);
    width: calc(100% - 40px); /* Siempre 20px de margen a cada lado */
    max-width: 600px;
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease-in-out;
    position: relative;
    box-sizing: border-box;
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .modal-contenido {
        width: calc(100% - 30px); /* 15px de margen a cada lado */
        margin: 15px auto;
        max-width: none; /* Eliminar el max-width en móviles */
    }
}

/* Móviles muy pequeños */
@media (max-width: 320px) {
    .modal-contenido {
        width: calc(100% - 20px); /* 10px de margen a cada lado */
        margin: 10px auto;
    }
}

.modal-header {
    background: var(--primary-gradient);
    color: white;
    padding: 20px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    flex: 1;
    padding-right: 20px;
    word-break: break-word;
    line-height: 1.4;
}

/* Ajuste para móviles */
@media (max-width: 480px) {
    .modal-header h2 {
        font-size: 1.1rem;
        padding-right: 15px;
    }
}

.cerrar {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
    line-height: 1;
    padding: 5px;
    margin: -5px;
    flex-shrink: 0; /* Evita que se encoja */
}

.modal-body {
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
    max-height: 70vh;
    overflow-y: auto;
}

/* Ajuste para móviles */
@media (max-width: 480px) {
    .modal-body {
        padding: 15px;
        max-height: 60vh;
    }
}

.info-seccion {
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.descripcion {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
    background: var(--bg-light);
    padding: 15px;
    border-radius: 8px;
    word-break: break-word;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .descripcion {
        font-size: 0.9rem;
        padding: 12px;
    }
}

/* Grid responsivo corregido */
.info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

/* Tablets y arriba */
@media (min-width: 768px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.info-item {
    padding: 15px;
    background: var(--bg-light);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    word-break: break-word;
}

@media (min-width: 768px) {
    .info-item {
        flex-direction: row;
        align-items: baseline;
        flex-wrap: wrap;
        padding: 12px 15px;
    }
}

/* Móviles */
@media (max-width: 767px) {
    .info-item {
        padding: 12px;
    }
}

.info-label {
    font-weight: 600;
    color: var(--text-dark);
    min-width: 120px;
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: block;
}

@media (min-width: 768px) {
    .info-label {
        margin-bottom: 0;
        font-size: 0.95rem;
    }
}

.info-item span:not(.info-label) {
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
    width: 100%;
}

@media (min-width: 768px) {
    .info-item span:not(.info-label) {
        width: auto;
    }
}

.hora {
    color: var(--primary-color);
    font-weight: 500;
    margin-left: 0;
    font-size: 0.85rem;
    display: inline-block;
}

@media (min-width: 768px) {
    .hora {
        margin-left: 5px;
        font-size: 0.9rem;
    }
}

.url-item {
    background: #e8f4fd;
    grid-column: 1 / -1;
    flex-direction: column;
}

.url-item a {
    color: #2196F3;
    text-decoration: none;
    word-break: break-all;
    font-size: 0.9rem;
    padding: 5px 0;
    display: inline-block;
    width: 100%;
}

@media (min-width: 768px) {
    .url-item {
        flex-direction: row;
        align-items: center;
    }

    .url-item a {
        width: auto;
        flex: 1;
        padding: 0;
    }
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
    background: var(--bg-light);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 480px) {
    .modal-footer {
        padding: 15px;
        text-align: center;
    }
}

.btn-cerrar {
    background: linear-gradient(180deg, #740a0a 0%, #b91010 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: opacity 0.2s;
    min-width: 100px;
}
.btn-cerrar:hover {
    opacity: 0.9;
}

@media (max-width: 480px) {
    .btn-cerrar {
        width: 100%;
        padding: 12px;
        font-size: 1rem;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Scroll personalizado */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* Prevenir desbordamiento en todos los elementos */
* {
    max-width: 100%;
    box-sizing: border-box;
}

/* Orientación landscape en móviles */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-contenido {
        margin: 10px auto;
    }

    .modal-body {
        max-height: 50vh;
    }
}