/* HEADER & NAVIGATION */
.top {
    background: var(--bg-hero);
    color: #fff;
    padding: 20px 0 70px
}

.top__bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px
}

.brand__box {
    background: #fff;
    color: #111;
    border-radius: 8px;
    padding: 18px 16px;
    width: 140px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

.brand__big {
    font-weight: 800;
    letter-spacing: .08em
}

.brand__small {
    font-weight: 700;
    font-size: 11px;
    margin-top: 6px;
    line-height: 1.1
}

.nav {
    position: relative
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 22px;
    padding-top: 6px
}

.nav__link {
    font-size: 12px;
    letter-spacing: .08em;
    opacity: .95
}

.nav__link:hover {
    opacity: 1;
    text-decoration: underline
}

.nav__link--cta {
    background: var(--red);
    padding: 8px 12px;
    border-radius: 3px;
    font-weight: 700;
    text-decoration: none !important;
}

.nav__link--cta:hover {
    background: var(--red-dark)
}

.nav__toggle {
    display: none
}

/* HERO */
.top__hero {
    margin-top: 15px;
    text-align: center
}

.top__text {
    max-width: 640px;
    margin: 0 auto 22px;
    font-size: 12px;
    line-height: 1.6;
    opacity: .95
}

.top__actions {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--red);
    color: #fff;
    border: 0;
    cursor: pointer;
    padding: 11px 16px;
    border-radius: 3px;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .02em;
}

.btn:hover {
    background: var(--red-dark)
}

.btn--primary {
    background: var(--red)
}

.btn--submit {
    width: 100%;
    padding: 12px 16px
}

/* SECTIONS */
.section {
    padding: 30px 0
}

.section__head {
    margin-bottom: 4rem;
}

.section__head p {
    margin-top: 2rem;
}

.subtitle {
    font-weight: 700;
    margin: 0 0 10px
}

.signup {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    display: flex;
    flex-direction: column;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px
}

label {
    font-size: 12px;
    color: #555
}

input, select {
    height: 38px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    padding: 0 10px;
    font: inherit;
    outline: none;
}

input:focus, select:focus {
    border-color: #bfbfbf;
    box-shadow: 0 0 0 3px rgba(210, 24, 24, .15)
}

.grid2 {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 12px
}

.form__hint {
    font-size: 12px;
    margin-top: 10px
}

.form-error-message {
    color: #d21818;
    font-size: 12px;
    margin-top: 4px;
}

.invalid-feedback {
    color: #d21818;
    font-size: 12px;
    margin-top: 4px;
}

ul.form-error-message,
ul.invalid-feedback {
    list-style: none;
    padding: 0;
    margin: 4px 0 0 0;
}

ul.form-error-message li,
ul.invalid-feedback li {
    margin-top: 2px;
}

.toast {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.toast-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.toast-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.panel--program{
    align-self: center;
}

.panel--program h3 {
    font-size: 14px;
    margin-bottom: 14px
}

.agenda {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px
}

.agenda li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ededed;
}

.time {
    color: var(--red);
    font-weight: 700;
    min-width: 42px
}

.dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--red);
    position: relative;
    flex: 0 0 auto;
}

.dot::after {
    content: "";
    position: absolute;
    inset: 3px;
    background: var(--red);
    border-radius: 50%;
}

.program__note {
    font-size: 12px;
    margin-top: 14px
}

/* FEATURES */
.features {
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    gap: 22px;
    margin-top: 30px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px
}

.feature__icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(210, 24, 24, .10);
    color: var(--red);
}

.feature__icon svg {
    width: 22px;
    height: 22px
}

.feature h3 {
    font-size: 14px;
    margin: 0
}

.feature p {
    font-size: 12px;
    margin: 0;
}

/* CITIES */
#dates .container {
    position: relative;
}

.cities {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    margin-top: 30px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.city {
    min-height: 280px;
    flex: 1 1 200px;
    max-width: 220px;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.city:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.city:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.city:hover {
    transform: scale(1.02);
}

.city::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2));
    z-index: 1;
}

.city__name,
.city__date {
    position: relative;
    z-index: 2;
    color: #fff;
}

.city__name {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: .06em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3)
}

.city__date {
    font-size: 13px;
    opacity: 0.95
}

/* CITY DETAIL MODAL */
.city-detail {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 10;
}

.city-detail[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.city-detail__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: 2px solid var(--txt);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    color: var(--txt);
}

.city-detail__close svg {
    width: 18px;
    height: 18px;
}

.city-detail__close:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.city-detail__wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 900px;
    padding: 40px;
}

.city-detail__image {
    flex: 0 0 320px;
    width: 320px;
    height: 240px;
    border-radius: 10px;
    overflow: hidden;
}

.city-detail__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.city-detail__content {
    flex: 1;
    text-align: left;
}

.city-detail__title {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--txt);
}

.city-detail__text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted);
}

/* PARTNERS */
.partners {
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    gap: 28px;
}

.partner {
    padding: 20px 14px;
    background: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.partner__logo {
    height: 140px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.partner__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.partner p {
    font-size: 13px;
    line-height: 1.6
}

/* GALLERY */
.gallery {
    margin-top: 26px;
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    grid-auto-rows: 140px;
    grid-auto-flow: dense;
    gap: 10px;
}

.ph {
    border-radius: 10px;
    overflow: hidden;
    background: #fafafa;
    margin: 0;
}

.ph img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

/* Masonry layout */
.ph:nth-child(1){grid-row:span 2; grid-column:span 1}
.ph:nth-child(2){grid-row:span 1; grid-column:span 1}
.ph:nth-child(3){grid-row:span 2; grid-column:span 2}
.ph:nth-child(4){grid-row:span 1; grid-column:span 1}
.ph:nth-child(5){grid-row:span 1; grid-column:span 1}
.ph:nth-child(6){grid-row:span 1; grid-column:span 1}
.ph:nth-child(7){grid-row:span 2; grid-column:span 1}
.ph:nth-child(8){grid-row:span 2; grid-column:span 2}
.ph:nth-child(9){grid-row:span 1; grid-column:span 1}
.ph:nth-child(10){grid-row:span 1; grid-column:span 1}
.ph:nth-child(11){grid-row:span 1; grid-column:span 1}
.ph:nth-child(12){grid-row:span 1; grid-column:span 1}

/* FOOTER */
.footer {
    background: var(--bg-footer);
    color: #fff;
    padding: 36px 0;
    margin-top: 30px;
}

.footer__grid {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.brand__box--footer {
    box-shadow: none
}

.footer__info h3 {
    font-size: 14px;
    margin: 0 0 10px
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    opacity: .95
}

/* RESPONSIVE */
@media (max-width: 980px) {
    .features {
        grid-template-columns:repeat(2, 1fr)
    }

    .partners {
        grid-template-columns:repeat(2, 1fr)
    }

    .cities {
        grid-template-columns:repeat(2, 1fr)
    }

    .gallery {
        grid-template-columns:repeat(3, 1fr);
        grid-auto-rows: 120px
    }
}

@media (max-width: 720px) {
    .top__bar {
        align-items: center;
        flex-direction: column;
        gap: 20px;
    }

    .nav {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .nav__toggle {
        display: inline-flex;
        width: 44px;
        height: 44px;
        border: 1px solid rgba(255, 255, 255, .35);
        border-radius: 10px;
        background: transparent;
        color: #fff;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        z-index: 10;
    }

    .nav__burger {
        width: 18px;
        height: 2px;
        background: #fff;
        position: relative;
    }

    .nav__burger::before, .nav__burger::after {
        content: "";
        position: absolute;
        left: 0;
        width: 18px;
        height: 2px;
        background: #fff;
    }

    .nav__burger::before {
        top: -6px
    }

    .nav__burger::after {
        top: 6px
    }

    .nav__menu {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        background: rgba(0, 0, 0, .25);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, .22);
        padding: 0 12px;
        border-radius: 12px;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    }

    .nav__menu.is-open {
        display: flex;
        max-height: 500px;
        opacity: 1;
        padding: 12px;
    }

    .signup {
        grid-template-columns:1fr
    }

    .grid2 {
        grid-template-columns:1fr
    }

    .features {
        grid-template-columns:1fr
    }

    .city-detail__wrapper {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .city-detail__image {
        flex: 0 0 auto;
        width: 100%;
        height: 200px;
    }

    .city-detail__close {
        top: 10px;
        right: 10px;
    }

    .gallery {
        grid-template-columns:repeat(2, 1fr);
        grid-auto-rows: 100px
    }

    .gallery .ph {
        grid-row: span 1 !important;
        grid-column: span 1 !important
    }

    .cities {
        grid-template-columns:1fr
    }

    .footer__grid {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
