/* ==========================================================
   COTEC EVENTS
   Agenda inspirada na referência enviada + ficha individual
   ========================================================== */

/* ----------------------------------------------------------
   1. Variáveis e regras base
   ---------------------------------------------------------- */

.cotec-events,
.cotec-event-single {
    --cotec-red: var(--cotec-color-red);
    --cotec-red-dark: var(--cotec-color-salmon);
    --cotec-coral: var(--cotec-color-salmon);
    --cotec-ink: var(--cotec-color-text);
    --cotec-muted: var(--cotec-color-muted);
    --cotec-line: var(--cotec-color-border);
    --cotec-line-light: var(--cotec-color-border);
    --cotec-soft: var(--cotec-color-surface-soft);
    --cotec-white: var(--cotec-color-white);

    color: var(--cotec-ink);
    box-sizing: border-box;
}

.cotec-events *,
.cotec-events *::before,
.cotec-events *::after,
.cotec-event-single *,
.cotec-event-single *::before,
.cotec-event-single *::after {
    box-sizing: border-box;
}

.cotec-events a,
.cotec-event-single a {
    text-underline-offset: 3px;
}

.cotec-events img,
.cotec-event-single img {
    max-width: 100%;
}

/* ----------------------------------------------------------
   2. Botões partilhados
   ---------------------------------------------------------- */

.cotec-events__load-more,
.cotec-event-single__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 22px;
    color: var(--cotec-white) !important;
    background: var(--cotec-red);
    border-radius: var(--cotec-radius-pill);
    box-shadow: none;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.cotec-events__load-more:hover,
.cotec-event-single__button:hover {
    color: var(--cotec-white) !important;
    background: var(--cotec-color-action-hover) !important;
    transform: translateY(-1px);
}

.cotec-events__load-more:focus-visible,
.cotec-event-single__button:focus-visible,
.cotec-event-card a:focus-visible,
.cotec-events__calendar button:focus-visible,
.cotec-events__filters input:focus-visible,
.cotec-events__filters select:focus-visible,
.cotec-event-single a:focus-visible {
    outline: 2px solid var(--cotec-color-focus) !important;
    outline-offset: 3px;
}

.cotec-events__load-more:disabled {
    cursor: wait;
    opacity: .55;
}

/* Respeita o atributo hidden mesmo com display:inline-flex definido acima. */
.cotec-events__load-more[hidden] {
    display: none !important;
}

/* ==========================================================
   LISTAGEM / AGENDA
   ========================================================== */

/* ----------------------------------------------------------
   3. Contentor e cabeçalho opcional
   ---------------------------------------------------------- */

.cotec-events {
    width: 100%;
    margin: 0 auto 84px;
    overflow: visible;
}

.cotec-events__page-header {
    width: min(1180px, calc(100% - 48px));
    margin: 42px auto 28px;
}

.cotec-events__page-header h2 {
    margin: 0;
    color: var(--cotec-red);
    font-size: clamp(32px, 4.5vw, 54px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -.025em;
}

.cotec-events__page-header p {
    max-width: 680px;
    margin: 12px 0 0;
    color: var(--cotec-muted);
    font-size: 15px;
    line-height: 1.55;
}

/* ----------------------------------------------------------
   4. Barra de filtros - semelhante à referência
   ---------------------------------------------------------- */

.cotec-events__filters {
    width: 100vw;
    margin: 0 0 0 calc(50% - 50vw);
    padding: 26px max(24px, calc((100vw - 1180px) / 2));
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: center;
    background: var(--cotec-soft);
    border: 0;
}

.cotec-events__select-control,
.cotec-events__search-control {
    position: relative;
    display: block;
    min-width: 0;
    margin: 0;
}

.cotec-events__filters select,
.cotec-events__filters input[type="search"] {
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 0 48px 0 29px;
    color: var(--cotec-muted);
    background: var(--cotec-white);
    border-radius: var(--cotec-radius-pill);
    box-shadow: none;
    font: inherit;
    font-size: 14px;
    font-style: italic;
    font-weight: 400;
    line-height: 48px;
    outline: 0;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.cotec-events__filters select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.cotec-events__filters input[type="search"] {
    padding-right: 52px;
}

.cotec-events__filters input[type="search"]::-webkit-search-cancel-button {
    margin-right: 4px;
}

.cotec-events__filters select:hover,
.cotec-events__filters input[type="search"]:hover,
.cotec-events__filters select:focus,
.cotec-events__filters input[type="search"]:focus {
    background: var(--cotec-white);
    box-shadow: 0 2px 7px rgba(0, 0, 0, .04);
}

.cotec-events__select-control::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 21px;
    width: 9px;
    height: 9px;
    border-right: 1px solid var(--cotec-ink);
    border-bottom: 1px solid var(--cotec-ink);
    transform: translateY(-68%) rotate(45deg);
    pointer-events: none;
}

.cotec-events__search-icon {
    position: absolute;
    top: 50%;
    right: 22px;
    width: 13px;
    height: 13px;
    border: 1px solid var(--cotec-muted);
    border-radius: 50%;
    transform: translateY(-58%);
    pointer-events: none;
}

.cotec-events__search-icon::after {
    content: "";
    position: absolute;
    right: -5px;
    bottom: -3px;
    width: 6px;
    height: 1px;
    background: var(--cotec-muted);
    transform: rotate(45deg);
    transform-origin: left center;
}

/* ----------------------------------------------------------
   5. Estrutura: eventos à esquerda + calendário à direita
   ---------------------------------------------------------- */

.cotec-events__layout {
    width: min(1180px, calc(100% - 48px));
    margin: 40px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: clamp(68px, 6.8vw, 105px);
    align-items: start;
}

.cotec-events__main {
    min-width: 0;
}

.cotec-events__grid {
    min-width: 0;
    transition: opacity .2s ease;
}

.cotec-events.is-loading .cotec-events__grid {
    opacity: .46;
}

.cotec-events__month-group + .cotec-events__month-group {
    margin-top: 42px;
}

.cotec-events__month-title {
    display: flex;
    align-items: baseline;
    gap: 9px;
    margin: 0 0 10px;
    color: var(--cotec-red);
    font-size: 31px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.02em;
}

.cotec-events__month-title small {
    color: var(--cotec-muted);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
}

.cotec-events__month-list {
    display: grid;
    gap: 16px;
}

/* ----------------------------------------------------------
   6. Cartão horizontal de evento
   ---------------------------------------------------------- */

.cotec-event-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 36px;
    align-items: center;
    min-width: 0;
    min-height: 166px;
    padding: 28px 36px 28px 34px;
    background: var(--cotec-white);
    border: 1px solid var(--cotec-line);
    box-shadow: 0 2px 8px rgba(25, 25, 25, .12);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cotec-event-card.is-past {
    background: var(--cotec-soft);
    border-color: var(--cotec-line);
    box-shadow: 0 1px 6px rgba(25, 25, 25, .08);
}

/* O primeiro grupo mensal da listagem fica sempre em destaque.
   Os restantes meses recuam visualmente, como na referência. */
.cotec-events__month-group.is-featured .cotec-event-card {
    background: var(--cotec-white);
    border-color: var(--cotec-line);
    box-shadow: 0 3px 11px rgba(25, 25, 25, .13);
}

.cotec-events__month-group:not(.is-featured) .cotec-event-card {
    background: var(--cotec-soft);
    border-color: var(--cotec-line);
    box-shadow: 0 2px 7px rgba(25, 25, 25, .08);
}

.cotec-event-card:hover {
    z-index: 1;
    border-color: var(--cotec-line);
    box-shadow: 0 5px 16px rgba(25, 25, 25, .12);
    transform: translateY(-1px);
}

.cotec-event-card__content {
    min-width: 0;
}

.cotec-event-card__date {
    margin: 0 0 7px;
    color: var(--cotec-ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.cotec-event-card h3 {
    max-width: 720px;
    margin: 0 0 14px;
    color: var(--cotec-red);
    font-size: clamp(18px, 1.55vw, 21px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.005em;
    overflow-wrap: anywhere;
}

.cotec-event-card h3 a {
    color: inherit;
    text-decoration: none;
}

.cotec-event-card h3 a:hover {
    color: var(--cotec-red-dark);
}

.cotec-event-card__venue {
    margin: 0 0 6px;
    color: var(--cotec-muted);
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.cotec-event-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 17px;
    color: var(--cotec-muted);
    font-size: 13px;
    line-height: 1.35;
}

.cotec-event-card__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 116px;
    min-height: 46px;
    padding: 0 25px;
    color: var(--cotec-white) !important;
    background: var(--cotec-red);
    border-radius: var(--cotec-radius-pill);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background-color .2s ease, transform .2s ease;
}

.cotec-event-card__link:hover {
    color: var(--cotec-white) !important;
    background: var(--cotec-red-dark);
    transform: translateY(-1px);
}

.cotec-events__actions {
    display: flex;
    justify-content: center;
    margin-top: 34px;
}

.cotec-events__empty,
.cotec-events__notice {
    margin: 8px 0 0;
    padding: 25px;
    color: var(--cotec-muted);
    background: var(--cotec-soft);
    border: 1px solid var(--cotec-line-light);
    font-size: 13px;
    text-align: center;
}

/* ----------------------------------------------------------
   7. Calendário
   ---------------------------------------------------------- */

.cotec-events__calendar {
    position: sticky;
    top: 24px;
    width: 100%;
    max-width: 340px;
    margin-top: 28px;
    padding: 12px 2px 0;
    background: var(--cotec-white);
}

.cotec-events__calendar-header {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    align-items: center;
    min-height: 54px;
    margin-bottom: 14px;
}

.cotec-events__calendar-header strong {
    color: var(--cotec-red);
    font-size: 27px;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
}

.cotec-events__calendar-nav {
    position: relative;
    width: 52px;
    height: 52px;
    padding: 0;
    color: var(--cotec-red) !important;
    background: transparent !important;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.cotec-events__calendar-nav::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 15px;
    height: 15px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
}

.cotec-events__calendar-nav.is-prev::before {
    transform: translate(-35%, -50%) rotate(-135deg);
}

.cotec-events__calendar-nav.is-next::before {
    transform: translate(-65%, -50%) rotate(45deg);
}

.cotec-events__calendar-nav:hover {
    background: rgb(var(--cotec-color-red-rgb) / 4%);
}

.cotec-events__calendar-weekdays,
.cotec-events__calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: center;
}

.cotec-events__calendar-weekdays {
    margin: 0 0 9px;
}

.cotec-events__calendar-weekdays span {
    display: grid;
    place-items: center;
    height: 36px;
    color: var(--cotec-red) !important;
    font-size: 15px;
    font-weight: 700;
}

.cotec-events__calendar-days {
    row-gap: 3px;
}

.cotec-events__calendar-days > span,
.cotec-events__calendar-days > button {
    display: grid;
    place-items: center;
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0;
}

.cotec-events__calendar-days > button {
    position: relative;
    isolation: isolate;
    color: black !important;
    background: transparent !important;
    border: 0;
    border-radius: 50%;
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease;
	box-shadow: none !important;
}

.cotec-events__calendar-days > button::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
}

.cotec-events__calendar-days > button:hover {
    background: var(--cotec-coral) !important;
	color: white !important;
}



.cotec-events__calendar-days > button.is-today::before,
.cotec-events__calendar-days > button.is-selected::before {
    background: var(--cotec-coral) !important;
	color: var(--cotec-white) !important;
}

.cotec-events__calendar-days > button.is-today,
.cotec-events__calendar-days > button.is-selected {
    color: var(--cotec-white) !important;
}

.cotec-events__calendar-days > button.is-selected::before {
    box-shadow: 0 0 0 3px rgb(var(--cotec-color-salmon-rgb) / 18%);
}


/* ==========================================================
   FICHA INDIVIDUAL DO EVENTO
   Texto a esquerda; imagem e informacao a direita
   ========================================================== */

/* ----------------------------------------------------------
   8. Contentor e estrutura principal
   ---------------------------------------------------------- */

.cotec-event-single {
    width: min(1180px, calc(100% - 40px));
    margin: 48px auto 96px;
}

.cotec-event-single__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
    grid-template-areas:
        "intro rail"
        "content rail";
    column-gap: clamp(38px, 5vw, 72px);
    row-gap: 32px;
    align-items: start;
}

/* ----------------------------------------------------------
   9. Cabecalho da ficha individual
   ---------------------------------------------------------- */

.cotec-event-single__intro {
    grid-area: intro;
    min-width: 0;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--cotec-line);
}

.cotec-event-single__intro h1 {
    margin: 0;
    color: var(--cotec-ink);
    font-size: clamp(38px, 5vw, 32px);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
}

.cotec-event-single__intro-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-top: 20px;
    color: var(--cotec-muted);
    font-size: 12px;
    line-height: 1.5;
}

.cotec-event-single__intro-meta span {
    position: relative;
}

.cotec-event-single__intro-meta span + span::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -13px;
    width: 3px;
    height: 3px;
    background: var(--cotec-red);
    transform: translateY(-50%);
}

/* ----------------------------------------------------------
   10. Conteudo do evento
   ---------------------------------------------------------- */

.cotec-event-single__content {
    grid-area: content;
    min-width: 0;
    color: var(--cotec-ink);
    font-size: 15px;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.cotec-event-single__content > *:first-child {
    margin-top: 0;
}

.cotec-event-single__content > *:last-child {
    margin-bottom: 0;
}

.cotec-event-single__content p {
    margin: 0 0 1.5em;
}

.cotec-event-single__content h2,
.cotec-event-single__content h3,
.cotec-event-single__content h4 {
    margin-top: 1.8em;
    margin-bottom: .7em;
    color: var(--cotec-ink);
    line-height: 1.2;
    letter-spacing: -.015em;
}

.cotec-event-single__content h2 {
    font-size: clamp(25px, 3vw, 34px);
}

.cotec-event-single__content h3 {
    font-size: clamp(20px, 2.3vw, 26px);
}

.cotec-event-single__content h4 {
    font-size: 18px;
}

.cotec-event-single__content ul,
.cotec-event-single__content ol {
    margin: 0 0 1.5em;
    padding-left: 1.4em;
}

.cotec-event-single__content li + li {
    margin-top: .45em;
}

.cotec-event-single__content a {
    color: var(--cotec-red);
}

.cotec-event-single__content img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
}

.cotec-event-single__content figure {
    max-width: 100%;
    margin: 1.8em 0;
}

.cotec-event-single__content figcaption {
    margin-top: 8px;
    color: var(--cotec-muted);
    font-size: 12px;
    line-height: 1.5;
}

.cotec-event-single__content blockquote {
    margin: 1.8em 0;
    padding: 4px 0 4px 22px;
    border-left: 4px solid var(--cotec-red);
    color: var(--cotec-muted);
    font-size: 1.08em;
}

.cotec-event-single__content table {
    width: 100%;
    margin: 1.8em 0;
    border-collapse: collapse;
}

.cotec-event-single__content th,
.cotec-event-single__content td {
    padding: 10px 12px;
    border: 1px solid var(--cotec-line);
    text-align: left;
    vertical-align: top;
}

.cotec-event-single__content th {
    background: var(--cotec-soft);
}

/* ----------------------------------------------------------
   11. Coluna direita
   ---------------------------------------------------------- */

.cotec-event-single__rail {
    grid-area: rail;
    position: sticky;
    top: 30px;
    align-self: start;
    display: grid;
    gap: 20px;
    min-width: 0;
}

/* Imagem de destaque */

.cotec-event-single__featured-image {
    position: relative;
    width: 100%;
    margin: 0;
   overflow: hidden;
}

.cotec-event-single__featured-image-element {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.cotec-event-single__featured-image.is-placeholder {
    background:
        repeating-radial-gradient(
            ellipse at 100% 118%,
            transparent 0 24px,
            rgba(255, 255, 255, .18) 25px 28px
        ),
        linear-gradient(
            135deg,
            var(--cotec-red-dark) 0%,
            var(--cotec-red) 62%,
            var(--cotec-coral) 100%
        );
}

/* Informacao do evento */

.cotec-event-single__sidebar {
    width: 100%;
    padding: 26px;
    background: var(--cotec-white);
    border: 1px solid var(--cotec-line);
    border-top: 4px solid var(--cotec-red);
}

.cotec-event-single__sidebar h2 {
    margin: 0 0 18px;
    color: var(--cotec-ink);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;
}

.cotec-event-single__detail {
    padding: 13px 0;
    border-bottom: 1px solid var(--cotec-line-light);
}

.cotec-event-single__detail:first-of-type {
    padding-top: 4px;
}

.cotec-event-single__detail:last-of-type {
    border-bottom: 0;
}

.cotec-event-single__detail small {
    display: block;
    margin-bottom: 5px;
    color: var(--cotec-red);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .075em;
    line-height: 1.3;
    text-transform: uppercase;
}

.cotec-event-single__detail strong {
    display: block;
    color: var(--cotec-ink);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.cotec-event-single__button {
    width: 100%;
    min-height: 48px;
    margin-top: 22px;
    padding: 12px 22px;
    line-height: 1.2;
}

.cotec-event-single__button:hover {
    width: 100%;
    min-height: 48px;
    margin-top: 22px;
    padding: 12px 22px;
    line-height: 1.2;
	background-color: var(--cotec-color-salmon);
	border-color: var(--cotec-color-salmon) !important;
}

/* ==========================================================
   RESPONSIVIDADE
   ========================================================== */

@media (max-width: 820px) {
    .cotec-events__filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .cotec-events__layout {
        grid-template-columns: minmax(0, 1fr) 250px;
        gap: 38px;
    }

    .cotec-events__calendar {
        max-width: 250px;
    }

    .cotec-event-card {
        padding-right: 24px;
    }
}

@media (max-width: 900px) {
    .cotec-event-single {
        width: min(760px, calc(100% - 32px));
        margin-top: 28px;
    }

    .cotec-event-single__layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "intro"
            "rail"
            "content";
        row-gap: 28px;
    }

    .cotec-event-single__rail {
        position: static;
    }

    .cotec-event-single__featured-image {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 780px) {
    .cotec-events__layout {
        width: min(100% - 32px, 700px);
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .cotec-events__calendar {
        position: static;
        order: -1;
        max-width: 420px;
        justify-self: center;
        padding: 0 14px 12px;
    }

    .cotec-events__month-group + .cotec-events__month-group {
        margin-top: 26px;
    }
}

@media (max-width: 680px) {
    .cotec-events,
    .cotec-event-single {
        margin-top: 0;
    }

    .cotec-events__page-header {
        width: calc(100% - 28px);
        margin-top: 26px;
    }

    .cotec-events__filters {
        grid-template-columns: 1fr;
        gap: 9px;
        padding: 16px 14px;
    }

    .cotec-events__filters select,
    .cotec-events__filters input[type="search"] {
        height: 42px;
        font-size: 12px;
        line-height: 40px;
    }

    .cotec-events__layout {
        width: calc(100% - 24px);
        margin-top: 22px;
        gap: 24px;
    }

    .cotec-events__calendar {
        width: 100%;
        max-width: 370px;
        padding-inline: 4px;
    }

    .cotec-events__calendar-header strong {
        font-size: 19px;
    }

    .cotec-events__calendar-days > span,
    .cotec-events__calendar-days > button {
        height: 36px;
    }

    .cotec-events__month-title {
        margin-bottom: 8px;
        font-size: 22px;
    }

    .cotec-event-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 15px;
        min-height: 0;
        padding: 20px 20px 19px;
    }

    .cotec-event-card h3 {
        max-width: 100%;
        font-size: 15px;
        line-height: 1.22;
    }

    .cotec-event-card__link {
        justify-self: start;
        min-height: 34px;
    }

    .cotec-event-single {
        width: min(100% - 24px, 1160px);
        margin-bottom: 64px;
    }

    .cotec-event-single__intro {
        padding: 20px;
    }

    .cotec-event-single__intro h1 {
        font-size: clamp(26px, 8vw, 34px);
        line-height: 1.1;
    }

    .cotec-event-single__intro-meta {
        display: grid;
        gap: 6px;
        margin-top: 16px;
    }

    .cotec-event-single__intro-meta span + span::before {
        display: none;
    }

    .cotec-event-single__sidebar {
        padding: 22px 20px;
    }

    .cotec-event-single__content {
        font-size: 14px;
        line-height: 1.7;
    }

    .cotec-event-single__content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 420px) {
    .cotec-events__filters {
        padding-inline: 12px;
    }

    .cotec-event-single__intro {
        padding-inline: 12px;
    }

    .cotec-event-single__intro h1 {
        font-size: clamp(24px, 8vw, 30px);
    }

    .cotec-events__layout {
        width: calc(100% - 20px);
    }

    .cotec-events__calendar {
        padding-inline: 0;
    }

    .cotec-event-card {
        padding: 18px 17px;
    }
}


/* ----------------------------------------------------------
   13. Escala ampliada da Agenda + responsividade final
   ---------------------------------------------------------- */

@media (max-width: 1100px) {
    .cotec-events__filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 22px 24px;
    }

    .cotec-events__layout {
        width: calc(100% - 48px);
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 44px;
    }

    .cotec-events__calendar {
        max-width: 300px;
    }

    .cotec-event-card {
        gap: 26px;
        padding: 26px 28px;
    }

    .cotec-event-card h3 {
        font-size: clamp(17px, 2vw, 20px);
    }
}

@media (max-width: 820px) {
    .cotec-events__layout {
        width: min(760px, calc(100% - 36px));
        grid-template-columns: minmax(0, 1fr);
        gap: 34px;
    }

    .cotec-events__calendar {
        position: static;
        order: -1;
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        padding: 4px 10px 12px;
        justify-self: center;
    }

    .cotec-events__month-title {
        font-size: 29px;
    }

    .cotec-event-card {
        min-height: 154px;
    }
}

@media (max-width: 680px) {
    .cotec-events__filters {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 18px 14px;
    }

    .cotec-events__filters select,
    .cotec-events__filters input[type="search"] {
        height: 50px;
        padding-left: 24px;
        font-size: 14px;
        line-height: 48px;
    }

    .cotec-events__layout {
        width: calc(100% - 24px);
        margin-top: 28px;
        gap: 28px;
    }

    .cotec-events__calendar {
        max-width: 410px;
        padding-inline: 2px;
    }

    .cotec-events__calendar-header {
        grid-template-columns: 48px minmax(0, 1fr) 48px;
        min-height: 50px;
        margin-bottom: 10px;
    }

    .cotec-events__calendar-header strong {
        font-size: 24px;
    }

    .cotec-events__calendar-nav {
        width: 48px;
        height: 48px;
    }

    .cotec-events__calendar-weekdays span {
        height: 32px;
        font-size: 11px;
    }

    .cotec-events__calendar-days > span,
    .cotec-events__calendar-days > button {
        height: 43px;
    }

    .cotec-events__calendar-days > button {
        font-size: 13px;
    }

    .cotec-events__calendar-days > button::before {
        width: 31px;
        height: 31px;
    }

    .cotec-events__month-group + .cotec-events__month-group {
        margin-top: 34px;
    }

    .cotec-events__month-title {
        margin-bottom: 10px;
        font-size: 27px;
    }

    .cotec-event-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        min-height: 0;
        padding: 24px 22px;
    }

    .cotec-event-card__date {
        font-size: 13px;
    }

    .cotec-event-card h3 {
        max-width: 100%;
        margin-bottom: 12px;
        font-size: 18px;
        line-height: 1.22;
    }

    .cotec-event-card__venue {
        font-size: 13.5px;
    }

    .cotec-event-card__meta {
        font-size: 12.5px;
    }

    .cotec-event-card__link {
        justify-self: start;
        min-width: 108px;
        min-height: 43px;
        font-size: 11.5px;
    }
}

@media (max-width: 420px) {
    .cotec-events__filters {
        padding-inline: 12px;
    }

    .cotec-events__layout {
        width: calc(100% - 20px);
    }

    .cotec-events__calendar {
        max-width: 100%;
    }

    .cotec-events__calendar-days > span,
    .cotec-events__calendar-days > button {
        height: 40px;
    }

    .cotec-event-card {
        padding: 22px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cotec-events *,
    .cotec-events *::before,
    .cotec-events *::after,
    .cotec-event-single *,
    .cotec-event-single *::before,
    .cotec-event-single *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
