/* =========================================================
   SEARCH BAR CORSI
========================================================= */

.corsi-search-box {
    width: 100%;
    max-width: 360px;
    height: 42px;

    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;

    background-color: #ffffff;
    border: 1px solid #e2ddd8;
    border-radius: 0;
    overflow: hidden;

    box-sizing: border-box;

    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.corsi-search-box .corsi-search-input {
    flex: 1;
    width: auto !important;
    height: auto !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 14px !important;
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1;
    color: #333333;
}

.corsi-search-box .corsi-search-input::placeholder {
    color: #8a8a8a;
    opacity: 1;
}

.corsi-search-box .corsi-search-input:focus {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.corsi-search-button {
    width: 42px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-left: 1px solid #e2ddd8;
    border-radius: 0;
    background-color: #4a3a30;
    color: #ffffff;
    padding: 0;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.corsi-search-button:hover {
    background-color: #2f241d;
    transform: none;
}

.corsi-search-button img {
    display: block;
    width: 16px;
    height: 16px;
    object-fit: contain;
}


/* =========================================================
   CATEGORY BUTTONS
========================================================= */

.corsi-categorie-list {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 0;
}

.button-categorie-wrapper {
    width: 100%;
    min-height: 42px;
    height: auto;

    display: flex;
    flex-wrap: wrap;

    gap: 15px;
}

.prodotti-filter-categorie {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-around;
}

.corso-categoria-btn,
.prodotti-filter-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #dddddd;
    background: #ffffff;
    padding: 10px 16px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
    font-family: 'Nunito';
    font-weight: 700;
}

.corso-categoria-btn,
.corso-categoria-btn span {
    font-family: var(--font-family) !important;
}

.corso-categoria-btn:hover,
.prodotti-filter-btn:hover {
    transform: translateY(-2px);
    border-color: var(--cc-primary);
}

.corso-categoria-btn.active,
.prodotti-filter-btn.active {
    background: var(--cc-primary);
    color: #ffffff;
    border-color: var(--cc-primary);
}

.corso-categoria-btn img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}


/* =========================================================
   GRID CORSI
========================================================= */

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

.single-corso-principale .corsi-risultati {
    display: none !important;
}

.corsi-ajax-results-wrapper.is-loading {
    pointer-events: none;
}

.corsi-ajax-results-wrapper.is-loading .corsi-ajax-results {
    opacity: 0.55;
}

.corsi-ajax-results {
    transition: opacity 0.2s ease;
}

.corsi-ajax-error {
    text-align: center;
}


/* =========================================================
   CARD CORSI
========================================================= */

.single-corso-principale .wd-page-title .wd-post-cat,
.single-corso-principale .wd-page-title .meta-post-categories,
.single-corso-principale .page-title .wd-post-cat,
.single-corso-principale .page-title .meta-post-categories,
.single-corso-principale .title-design-centered .wd-post-cat,
.single-corso-principale .title-design-centered .meta-post-categories,
.single-corso-principale .wd-page-title .entry-meta,
.single-corso-principale .page-title .entry-meta {
    display: none !important;
}

.corso-card {
    display: flex;
    flex-direction: row;
    align-items: flex-end;

    max-height: 262px;
    min-height: 262px;

    background: #ffffff;
    overflow: hidden;

    text-decoration: none;
    color: inherit;

    border: 1px solid #eeeeee;
    gap: 25px;

    transition: 0.3s;
    transform: translateY(0);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.corso-card:hover {
    transform: translateY(-6px);
    box-shadow: hsl(148 18% 80% / 1) 0 2px 8px;
}

.corso-card-image {
    max-width: 50%;
    min-width: 50%;
}

.corso-card-image img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.corso-card-content {
    padding: 22px;
    align-self: center;
}

.corso-card-content h3 {
    font-family: var(--font-family);
    font-weight: 800;    
    font-size: 22px;
    margin: 0 0 12px;
    line-height: 1.2;
}

.corso-card-content p {
    margin: 6px 0;
    font-size: 15px;
    line-height: 1.4;
    place-self: baseline;
}

.corso-card-tipologia strong {
    font-weight: 600;
}

.corso-card-luogo,
.corso-card-data {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 18px !important;
    font-weight: 700;
    color: #222222;
}

.corso-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 16px;
    line-height: 1;
}

.corso-card-luogo .corso-card-icon,
.corso-card-data .corso-card-icon {
    font-size: 20px;
}


/* =========================================================
   EVENTI NELLA CARD
========================================================= */

.corso-card-eventi {
    margin-top: 14px;

    display: flex;
    flex-direction: column;
    gap: 7px;
}

.corso-card-eventi-title {
    display: block;

    font-size: 13px;
    font-weight: 700;
    color: var(--cc-primary);

    margin-bottom: 2px;
}

.corso-card-evento {
    display: flex;
    flex-direction: row;
    gap: 2px;

    padding: 6px 0;
    border-top: 1px solid #eeeeee;

    font-size: 13px;
    line-height: 1.3;
}

.corso-card-evento-data,
.corso-card-evento-citta {
    color: #555555;
}

.corso-card-no-eventi {
    margin-top: 12px;

    font-size: 14px;
    color: #999999;
}


/* =========================================================
   PAGINATION
========================================================= */

.corsi-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;

    margin-top: 40px;
}

.corsi-pagination button {
    width: 42px;
    height: 42px;

    border-radius: 50%;
    border: 1px solid #dddddd;
    background: #ffffff;

    cursor: pointer;
    transition: 0.3s;

    font-weight: 600;
}

.corsi-pagination button:hover {
    border-color: var(--cc-primary);
}

.corsi-pagination button.active {
    background: var(--cc-primary);
    color: #ffffff;
    border-color: var(--cc-primary);
}


/* =========================================================
   NO RESULTS
========================================================= */

.corsi-no-results {
    text-align: center;

    margin-top: 40px;

    font-size: 18px;
}


/* =========================================================
   CUSTOM POST IMAGE
========================================================= */

.custom-fixed-image {
    position: relative;

    height: 300px;

    overflow: hidden;
    border-radius: 20px;
}

.custom-fixed-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    display: block;

    transition: transform 0.6s ease;
}

.custom-fixed-image:hover img {
    transform: scale(1.05);
}

.custom-post-overlay {
    position: absolute;
    inset: 0;

    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.30),
        rgba(0, 0, 0, 0)
    );

    pointer-events: none;
}

.wd-post-inner {
    height: 100%;

    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;

    transition: all 0.35s ease;
}

.wd-post:hover .wd-post-inner {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.wd-post-content {
    padding: 28px;
}

.wd-post-title {
    font-size: 26px;
    line-height: 1.3;

    margin-bottom: 16px;
}

.wd-post-excerpt {
    font-size: 15px;
    line-height: 1.7;
    color: #666666;
}


/* =========================================================
   LINK LUOGHI CORSI
========================================================= */

.corsi-luoghi-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.corso-luogo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 20px;
    border-radius: 999px;

    background-color: #ffffff;
    color: #222222;

    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    text-decoration: none;
    white-space: nowrap;

    transition: all 0.2s ease;
}

.corso-luogo-link:hover {
    background-color: #f2f2f2;
    color: #222222;
}

.corso-luogo-link.active {
    background-color: #222222;
    color: #ffffff;
}


