/* ================================
   AA EVENTOS CALENDAR
================================ */

.aa-calendar-section {
    background: #eef1f4;
    padding: 70px 0;
    color: #142236;
}

.aa-calendar-header {
    margin-bottom: 35px;
    text-align: left;
}

.aa-calendar-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #0d6efd;
}

.aa-calendar-title {
    color: #142236 !important;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 12px;
}

.aa-calendar-subtitle {
    max-width: 760px;
    margin: 0;
    color: #475569 !important;
    font-size: 1rem;
}

.aa-calendar-toolbar {
    margin-bottom: 30px;
}

.aa-calendar-status {
    color: #64748b;
    font-weight: 700;
}

/* ================================
   NAVEGACION DEL MES
================================ */

.aa-calendar-month-nav {
    flex-wrap: wrap;
}

.aa-current-month-title {
    color: #142236;
    font-size: 1.55rem;
    font-weight: 900;
    text-transform: capitalize;
}

.aa-month-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ================================
   BOTONES DE VISTA
================================ */

.aa-calendar-view-buttons .btn {
    font-weight: 800;
    border-radius: 0;
    padding: 10px 18px;
}

.aa-calendar-view-buttons .btn:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.aa-calendar-view-buttons .btn:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* ================================
   CALENDARIO MENSUAL DESKTOP
================================ */

.aa-month-calendar {
    background: transparent;
}

.aa-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.aa-month-weekdays {
    margin-bottom: 8px;
}

.aa-weekday {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 900;
    padding: 8px 4px;
}

.aa-month-day {
    min-height: 145px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.04);
    background: rgba(255, 255, 255, 0.10);
    position: relative;
}

.aa-day-number {
    color: #111827;
    font-size: 1.45rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.aa-muted-day {
    opacity: 0.55;
}

.aa-muted-day .aa-day-number {
    color: #7c8798;
}

.aa-today {
    background: rgba(13, 110, 253, 0.08);
}

.aa-today .aa-day-number {
    color: #0d6efd;
}

.aa-day-events {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.aa-month-event {
    border: 0;
    text-align: left;
    background: transparent;
    padding: 5px 6px;
    border-left: 4px solid #64748b;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.aa-month-event:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateX(2px);
}

.aa-month-event-time,
.aa-month-event-title,
.aa-month-event-category {
    display: block;
    line-height: 1.2;
}

.aa-month-event-time {
    font-size: 0.72rem;
    color: #475569;
    font-weight: 700;
}

.aa-month-event-title {
    font-size: 0.78rem;
    color: #111827;
    font-weight: 900;
}

.aa-month-event-category {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 800;
}

/* ================================
   TARJETAS LISTA
================================ */

.aa-view-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.aa-view-list .aa-event-item {
    width: 100%;
}

.aa-event-card {
    height: 100%;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.10);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.aa-event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16);
}

.aa-view-list .aa-event-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 150px;
}

.aa-event-top {
    padding: 18px 22px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.aa-view-list .aa-event-top {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.aa-event-date-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.aa-event-date-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 6px;
    font-size: 0.9rem;
}

.aa-event-date {
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
}

.aa-event-time {
    font-size: 1rem;
    font-weight: 800;
    white-space: nowrap;
}

.aa-event-body {
    padding: 25px 22px 26px;
}

.aa-view-list .aa-event-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.aa-event-group {
    color: #111827 !important;
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 15px;
}

.aa-view-list .aa-event-group {
    font-size: 1.35rem;
}

.aa-event-category {
    display: inline-block;
    font-size: 1rem;
    font-weight: 800;
    color: #4b5563;
    margin-bottom: 12px;
}

.aa-event-address {
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ================================
   COLORES POR CATEGORIA
================================ */

/* Fondos (Tarjetas en vista Lista) */
.aa-cat-aniversario .aa-event-top { background: linear-gradient(135deg, #facc15, #f59e0b); }
.aa-cat-visitas .aa-event-top { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.aa-cat-interoficinas .aa-event-top { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.aa-cat-maratonica .aa-event-top { background: linear-gradient(135deg, #ef4444, #dc2626); }
.aa-cat-estudio .aa-event-top { background: linear-gradient(135deg, #10b981, #059669); }
.aa-cat-interna .aa-event-top { background: linear-gradient(135deg, #64748b, #475569); }
.aa-cat-publica .aa-event-top { background: linear-gradient(135deg, #f97316, #ea580c); }
.aa-cat-seminario .aa-event-top { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.aa-cat-tecnologia .aa-event-top { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.aa-cat-apoyo .aa-event-top { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.aa-cat-general .aa-event-top { background: linear-gradient(135deg, #94a3b8, #475569); }

/* Bordes (Eventos en vista Mes) */
.aa-month-event.aa-cat-aniversario { border-left-color: #f59e0b; }
.aa-month-event.aa-cat-visitas { border-left-color: #06b6d4; }
.aa-month-event.aa-cat-interoficinas { border-left-color: #8b5cf6; }
.aa-month-event.aa-cat-maratonica { border-left-color: #dc2626; }
.aa-month-event.aa-cat-estudio { border-left-color: #10b981; }
.aa-month-event.aa-cat-interna { border-left-color: #64748b; }
.aa-month-event.aa-cat-publica { border-left-color: #f97316; }
.aa-month-event.aa-cat-seminario { border-left-color: #3b82f6; }
.aa-month-event.aa-cat-tecnologia { border-left-color: #14b8a6; }
.aa-month-event.aa-cat-apoyo { border-left-color: #f43f5e; }
.aa-month-event.aa-cat-general { border-left-color: #94a3b8; }


/* ================================
   TELEFONO
================================ */

.aa-calendar-phone {
    color: #475569;
}

.aa-calendar-phone .btn {
    border-radius: 999px;
    font-weight: 700;
    padding: 10px 22px;
}

/* ================================
   MODAL DETALLE EVENTO
================================ */

.aa-event-modal-content {
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
}

.aa-event-modal-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    padding: 26px 30px;
}

.aa-event-modal-header .modal-title {
    color: #142236;
    font-weight: 900;
    font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.aa-modal-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: #0d6efd;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.aa-modal-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.aa-modal-detail-card {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 24px;
}

.aa-modal-detail-card h4,
.aa-modal-notes h4 {
    color: #142236;
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 18px;
}

.aa-modal-detail-card p {
    color: #334155;
    font-size: 0.95rem;
}

.aa-modal-detail-card strong {
    color: #111827;
}

.aa-modal-category-pill {
    display: inline-block;
    margin-top: 4px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
}

/* Píldoras (Modal de Detalles) */
.aa-modal-category-pill.aa-cat-aniversario { background: #f59e0b; }
.aa-modal-category-pill.aa-cat-visitas { background: #06b6d4; }
.aa-modal-category-pill.aa-cat-interoficinas { background: #8b5cf6; }
.aa-modal-category-pill.aa-cat-maratonica { background: #dc2626; }
.aa-modal-category-pill.aa-cat-estudio { background: #10b981; }
.aa-modal-category-pill.aa-cat-interna { background: #64748b; }
.aa-modal-category-pill.aa-cat-publica { background: #f97316; }
.aa-modal-category-pill.aa-cat-seminario { background: #3b82f6; }
.aa-modal-category-pill.aa-cat-tecnologia { background: #14b8a6; }
.aa-modal-category-pill.aa-cat-apoyo { background: #f43f5e; }
.aa-modal-category-pill.aa-cat-general { background: #94a3b8; }

.aa-modal-notes {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 24px;
}

/* ================================
   MOBILE AGENDA BASE
================================ */

.aa-mobile-day-agenda {
    display: none;
}

/* ================================
   TABLET
================================ */

@media (max-width: 991px) {
    .aa-modal-detail-grid {
        grid-template-columns: 1fr;
    }

    .aa-view-list .aa-event-card {
        grid-template-columns: 220px 1fr;
    }
}

/* ================================
   MOBILE CALENDAR COMPACTO
================================ */

@media (max-width: 767px) {
    .aa-calendar-section {
        padding: 45px 0;
    }

    .aa-calendar-section .container {
        padding-left: 18px;
        padding-right: 18px;
    }

    .aa-calendar-title {
        font-size: 2.3rem;
        line-height: 1.05;
    }

    .aa-calendar-subtitle {
        font-size: 1.15rem;
        line-height: 1.45;
    }

    .aa-calendar-toolbar {
        display: block !important;
        align-items: stretch !important;
    }

    .aa-calendar-month-nav {
        display: grid !important;
        grid-template-columns: 54px 54px 1fr;
        gap: 10px;
        margin-bottom: 18px;
    }

    .aa-month-btn {
        width: 54px;
        height: 54px;
        border-radius: 8px;
        background: #ffffff;
        font-size: 2rem;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    }

    #aaCurrentMonthBtn {
        height: 54px;
        border-radius: 8px;
        font-size: 1rem;
    }

    .aa-current-month-title {
        grid-column: 1 / -1;
        width: 100%;
        margin-top: 12px;
        font-size: 2rem;
        font-weight: 900;
    }

    .aa-calendar-view-buttons {
        width: 100%;
        margin-bottom: 22px;
    }

    .aa-calendar-view-buttons .btn {
        flex: 1;
        padding: 13px 18px;
        font-size: 1.15rem;
        font-weight: 900;
    }

    .aa-calendar-status {
        font-size: 1.15rem;
        font-weight: 800;
        margin-bottom: 24px !important;
    }

    .aa-month-calendar {
        overflow: visible;
        width: 100%;
    }

    .aa-month-grid {
        width: 100%;
        min-width: 0 !important;
        display: grid;
        grid-template-columns: repeat(7, 1fr);
    }

    .aa-month-weekdays {
        margin-bottom: 8px;
    }

    .aa-weekday {
        text-align: center;
        font-size: 0.95rem;
        font-weight: 900;
        color: #64748b;
        padding: 8px 0;
    }

    .aa-month-days {
        border-top: 1px solid rgba(15, 23, 42, 0.08);
        border-left: 1px solid rgba(15, 23, 42, 0.08);
    }

    .aa-month-day {
        min-height: 58px;
        padding: 7px 4px;
        border-right: 1px solid rgba(15, 23, 42, 0.08);
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        background: rgba(255, 255, 255, 0.18);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        cursor: pointer;
    }

    .aa-day-number {
        font-size: 1rem;
        line-height: 1;
        margin-bottom: 5px;
        text-align: center;
    }

    .aa-day-events {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 3px;
        flex-wrap: wrap;
        width: 100%;
    }

    .aa-month-event {
        width: 8px;
        height: 8px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: #0d6efd;
        display: inline-block;
    }

    .aa-month-event-time,
    .aa-month-event-title,
    .aa-month-event-category {
        display: none;
    }

    /* Colores para los puntitos en versión móvil */
    .aa-month-event.aa-cat-aniversario { background: #f59e0b; }
    .aa-month-event.aa-cat-visitas { background: #06b6d4; }
    .aa-month-event.aa-cat-interoficinas { background: #8b5cf6; }
    .aa-month-event.aa-cat-maratonica { background: #dc2626; }
    .aa-month-event.aa-cat-estudio { background: #10b981; }
    .aa-month-event.aa-cat-interna { background: #64748b; }
    .aa-month-event.aa-cat-publica { background: #f97316; }
    .aa-month-event.aa-cat-seminario { background: #3b82f6; }
    .aa-month-event.aa-cat-tecnologia { background: #14b8a6; }
    .aa-month-event.aa-cat-apoyo { background: #f43f5e; }
    .aa-month-event.aa-cat-general { background: #94a3b8; }

    .aa-today {
        background: rgba(13, 110, 253, 0.12);
    }

    .aa-selected-day {
        background: #0d6efd !important;
    }

    .aa-selected-day .aa-day-number {
        color: #ffffff !important;
    }

    .aa-selected-day .aa-month-event {
        background: #ffffff !important;
    }

    .aa-mobile-day-agenda {
        display: block;
        margin-top: 28px;
        padding-top: 18px;
        border-top: 1px solid rgba(15, 23, 42, 0.12);
    }

    .aa-mobile-agenda-title {
        color: #142236;
        font-size: 1.25rem;
        font-weight: 900;
        margin-bottom: 16px;
        text-transform: capitalize;
    }

    .aa-mobile-agenda-item {
        width: 100%;
        text-align: left;
        border: 0;
        background: transparent;
        border-bottom: 1px solid rgba(15, 23, 42, 0.10);
        padding: 14px 0;
    }

    .aa-mobile-agenda-time {
        display: block;
        color: #64748b;
        font-size: 0.95rem;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .aa-mobile-agenda-name {
        display: block;
        color: #111827;
        font-size: 1.15rem;
        font-weight: 900;
        line-height: 1.2;
    }

    .aa-mobile-agenda-category {
        display: inline-block;
        margin-top: 7px;
        color: #0d6efd;
        font-size: 0.9rem;
        font-weight: 800;
    }

    .aa-view-list .aa-event-card {
        display: block;
    }

    .aa-view-list .aa-event-top {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .aa-event-top {
        padding: 17px 18px;
    }

    .aa-event-body {
        padding: 24px 18px;
    }

    .aa-event-group {
        font-size: 1.45rem;
    }

    .aa-event-modal-header {
        padding: 22px;
    }

    .modal-body {
        padding: 22px;
    }
}