/* ===========================================================
   Maya Tours — Calendario de Viajes (WordPress Plugin)
   =========================================================== */

.mt-cal-shell {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: #1a2a3a;
}

/* ---- Hero banner (compact) ---- */
.mt-cal-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    min-height: 0 !important;
    margin-bottom: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.mt-cal-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,105,92,.88) 0%, rgba(0,137,123,.65) 100%);
}
.mt-cal-hero__body {
    position: relative;
    padding: 1rem 1.25rem !important;
    color: #ffffff;
    max-width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.mt-cal-hero__kicker { display: none; }
.mt-cal-hero__title {
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    color: #ffffff !important;
    letter-spacing: 0 !important;
    flex: 0 1 auto;
}
.mt-cal-hero__meta { display: inline-flex; gap: 0.5rem; align-items: center; margin: 0 !important; }
.mt-cal-hero__count {
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.3);
    color: #ffffff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.mt-cal-hero__subtitle { display: none; }

/* ---- Month tabs ---- */
.mt-cal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e0e7ef;
}
.mt-cal-tab {
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    background: #f0f4f8;
    color: #4a6080;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.mt-cal-tab:hover { background: #e0e7ef; color: #00695c; text-decoration: none; }
.mt-cal-tab--active { background: #00695c; color: #ffffff; border-color: #00695c; }
.mt-cal-tab--active:hover { background: #00897b; color: #ffffff; }

/* ---- Month sections ---- */
.mt-cal-month { display: none; animation: mtCalFadeIn 0.3s ease; }
.mt-cal-month--active { display: block; }
@keyframes mtCalFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.mt-cal-month__title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #00695c;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #00695c;
    display: inline-block;
}

/* ---- Trip cards grid — flex with explicit widths (forces theme override) ---- */
.mt-cal-shell .mt-cal-grid,
.mt-cal-month > .mt-cal-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    justify-content: center !important;
    align-items: stretch !important;
    box-sizing: border-box !important;
}
/* 4 cols desktop (>=1024px) */
.mt-cal-shell .mt-trip-card {
    flex: 0 0 calc(25% - 9px) !important;
    width: calc(25% - 9px) !important;
    max-width: calc(25% - 9px) !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
/* 3 cols tablet */
@media (max-width: 1023px) {
    .mt-cal-shell .mt-trip-card {
        flex: 0 0 calc(33.333% - 8px) !important;
        width: calc(33.333% - 8px) !important;
        max-width: calc(33.333% - 8px) !important;
    }
}
/* 2 cols small tablet / phone landscape */
@media (max-width: 767px) {
    .mt-cal-shell .mt-trip-card {
        flex: 0 0 calc(50% - 6px) !important;
        width: calc(50% - 6px) !important;
        max-width: calc(50% - 6px) !important;
    }
}
/* 1 col phone */
@media (max-width: 420px) {
    .mt-cal-shell .mt-trip-card {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}
.mt-trip-card {
    display: block !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    text-decoration: none !important;
    color: inherit !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.08) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    border: 1px solid #e0e7ef !important;
    cursor: pointer !important;
    text-align: left !important;
    padding: 0 !important;
    font: inherit !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    outline: none !important;
}
.mt-trip-card:hover,
.mt-trip-card:focus,
.mt-trip-card:active,
.mt-trip-card:focus-visible {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color: inherit !important;
    text-decoration: none !important;
}
.mt-trip-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.15) !important;
}
.mt-trip-card:focus-visible { box-shadow: 0 0 0 3px rgba(0,137,123,.4) !important; }
.mt-trip-card__visual {
    position: relative;
    height: 150px;
    background-size: cover;
    background-position: center;
    background-color: #e0e7ef;
}
.mt-trip-card__date {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,105,92,.9);
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}
.mt-trip-card__body { padding: 0.75rem 0.875rem; }
.mt-trip-card__name {
    font-size: 13px;
    font-weight: 800;
    color: #1a2a3a;
    line-height: 1.3;
    margin: 0 0 0.35rem;
    letter-spacing: -0.2px;
    text-transform: uppercase;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mt-trip-card__price { font-size: 12px; color: #00897b; font-weight: 700; }

/* ---- Empty state + footer ---- */
.mt-cal-empty {
    background: #f0f4f8;
    border-radius: 12px;
    padding: 3rem 1.5rem;
    text-align: center;
    color: #6a84a0;
    font-size: 14px;
}
.mt-cal-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e7ef;
    text-align: right;
    color: #8aa0b8;
    font-size: 11px;
}

/* ===========================================================
   MODAL — 2-column layout (media left + content right)
   =========================================================== */
body.mt-cal-modal-open { overflow: hidden; }

.mt-cal-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.mt-cal-modal--open { display: flex; }
.mt-cal-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 30, 26, 0.88);
    backdrop-filter: blur(6px);
}
.mt-cal-modal__dialog {
    position: relative;
    background: #001e1a;
    border-radius: 20px;
    max-width: 980px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,.5);
    animation: mtCalModalIn 0.25s ease;
    border: 1px solid rgba(255,255,255,0.08);
}
@keyframes mtCalModalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.mt-cal-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.95);
    color: #00695c;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 2px 10px rgba(0,0,0,.3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.mt-cal-modal__close:hover { background: #ffffff; color: #00897b; }

/* 2-column layout: media left, content right */
.mt-cal-modal__layout {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    max-height: 90vh !important;
    min-height: 0 !important;
    height: 90vh !important;
    width: 100% !important;
}

/* ---- Media column (left) ---- */
.mt-cal-modal__media {
    position: relative !important;
    background: #001e1a !important;
    flex: 0 0 50% !important;
    width: 50% !important;
    max-width: 50% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.mt-cal-modal__img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    border-radius: 0 !important;
    max-width: none !important;
    max-height: none !important;
}
.mt-cal-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    color: #001e1a;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.mt-cal-modal__nav:hover { background: #ffffff; }
.mt-cal-modal__nav--prev { left: 12px; }
.mt-cal-modal__nav--next { right: 12px; }

.mt-cal-modal__dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}
.mt-cal-modal__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}
.mt-cal-modal__dot.is-active { background: #ffffff; width: 24px; border-radius: 4px; }

/* ---- Content column (right) ---- */
.mt-cal-modal__content {
    background: #ffffff !important;
    padding: 1.75rem 1.75rem 1.5rem !important;
    overflow-y: auto !important;
    min-height: 0 !important;
    max-height: 90vh !important;
    height: 100% !important;
    color: #2c3e50 !important;
    flex: 1 1 50% !important;
    width: 50% !important;
    max-width: 50% !important;
    min-width: 0 !important;
}
.mt-cal-modal__eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8aa0b8;
    margin-bottom: 0.35rem;
}
.mt-cal-modal__title {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: #00695c !important;
    margin: 0 0 1.25rem 0 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.3px !important;
    text-transform: uppercase;
}

/* Panels (Tarifas, Detalles) */
.mt-cal-modal__panel {
    margin-bottom: 1.25rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e0e7ef;
    overflow: hidden;
}
.mt-cal-modal__panel-head {
    padding: 0.75rem 1rem 0.5rem;
    text-align: center;
    background: #ffffff;
    border-bottom: 1px solid #e0e7ef;
}
.mt-cal-modal__panel-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #00897b;
    margin: 0 0 0.25rem;
}
.mt-cal-modal__panel-note {
    font-size: 11px;
    color: #8aa0b8;
    margin: 0;
    line-height: 1.5;
}

/* Tariffs */
.mt-cal-modal__tariffs {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.mt-tariff-group {
    background: #ffffff;
    border-radius: 10px;
    padding: 0.875rem 1rem;
    border: 1px solid #e0e7ef;
}
.mt-tariff-group__title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #00897b;
    text-align: center;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}
.mt-tariff-list { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.mt-tariff-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
    font-size: 13px;
    border-bottom: 1px dashed #f0f4f8;
}
.mt-tariff-item:last-child { border-bottom: none; }
.mt-tariff-item__name { color: #2c3e50; font-weight: 600; flex: 1; }
.mt-tariff-item__price { color: #00897b; font-weight: 800; white-space: nowrap; padding-left: 0.75rem; }

/* Details (strContenido HTML) */
.mt-cal-modal__details {
    padding: 1rem 1.125rem;
    font-size: 13.5px;
    line-height: 1.65;
    color: #2c3e50;
}
.mt-cal-modal__details h1,
.mt-cal-modal__details h2,
.mt-cal-modal__details h3,
.mt-cal-modal__details h4,
.mt-cal-modal__details h5,
.mt-cal-modal__details h6 {
    color: #00897b;
    font-weight: 800 !important;
    font-size: 13px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 1rem 0 0.5rem !important;
}
.mt-cal-modal__details h1:first-child,
.mt-cal-modal__details h2:first-child,
.mt-cal-modal__details h3:first-child { margin-top: 0 !important; }
.mt-cal-modal__details p { margin: 0 0 0.75rem !important; }
.mt-cal-modal__details strong { color: #00695c; }
.mt-cal-modal__details ul,
.mt-cal-modal__details ol { margin: 0.5rem 0 0.75rem !important; padding-left: 1.125rem !important; }
.mt-cal-modal__details li { margin-bottom: 0.35rem !important; padding-left: 0.25rem !important; }
.mt-cal-modal__details a { color: #00897b; }
.mt-cal-modal__details img { max-width: 100%; height: auto; border-radius: 6px; margin: 0.5rem 0; }
.mt-cal-modal__include-head { color: #2e7d32 !important; }
.mt-cal-modal__exclude-head { color: #c0392b !important; }
.mt-cal-modal__empty {
    color: #8aa0b8;
    font-style: italic;
    text-align: center;
    padding: 1rem;
    margin: 0;
}

.mt-cal-modal__actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e7ef;
    text-align: center;
}
.mt-cal-modal__cta {
    display: inline-block;
    background: #00897b;
    color: #ffffff !important;
    padding: 12px 28px;
    border-radius: 10px;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background 0.2s ease;
}
.mt-cal-modal__cta:hover { background: #00695c; color: #ffffff !important; text-decoration: none !important; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .mt-cal-modal__layout {
        flex-direction: column !important;
        height: 95vh !important;
        max-height: 95vh !important;
    }
    .mt-cal-modal__media {
        flex: 0 0 240px !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 240px !important;
        min-height: 240px !important;
        max-height: 240px !important;
    }
    .mt-cal-modal__content {
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: calc(95vh - 240px) !important;
        height: auto !important;
        padding: 1.25rem 1.25rem 1.25rem !important;
    }
    .mt-cal-modal__title { font-size: 1.25rem !important; margin-bottom: 1rem !important; }
    .mt-cal-modal__dialog { max-height: 95vh; }
}
@media (max-width: 640px) {
    .mt-cal-hero__body { padding: 1.75rem 1.25rem; }
    .mt-cal-hero__title { font-size: 1.5rem; }
    .mt-cal-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
    .mt-trip-card__visual { height: 160px; }
    .mt-cal-tabs { gap: 0.35rem; }
    .mt-cal-tab { padding: 0.4rem 0.9rem; font-size: 12px; }
    .mt-cal-modal { padding: 0.5rem; }
    .mt-cal-modal__nav { width: 36px; height: 36px; font-size: 20px; }
}
