/* Modern Section Header */
.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    position: relative;
    padding-top: 25px;
    /* Increased to give space for the bar */
}

.section-header-modern::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    /* Ensures it starts from the left */
    width: 60px;
    height: 4px;
    /* Slightly thicker for better visibility */
    background-color: #ffb81c;
    border-radius: 2px;
}

.section-header-modern .title-box {
    text-align: left;
}

.section-header-modern .title-box h2 {
    font-weight: 800;
    margin: 10px 0 5px 0;
    font-size: 1.8rem;
    color: #1a1a1a;
    line-height: 1.2;
    text-align: left;
}

.section-header-modern .title-box p {
    color: #6c757d;
    margin: 0;
    font-size: 1rem;
    font-weight: 400;
    text-align: left;
}


/* =========================================================================
   List-View Cards (Mobile First)
   Otimizado para o App / Mobile, estilo iFood
========================================================================== */

.list-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.list-card {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 8px 10px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none !important;
    gap: 12px;
    border: 1px solid #f2f2f2;
}

.list-card:active {
    transform: scale(0.98);
}

.list-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.list-card-image {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    object-fit: cover;
    background: #f8f9fa;
    flex-shrink: 0;
    border: 1px solid #eaeaea;
}

/* Fallback de logo quando não tem destaque na imagem */
.list-card-image-fallback {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    background: #ffffff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eaeaea;
    padding: 5px;
}

.list-card-image-fallback img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.list-card-content {
    flex-grow: 1;
    min-width: 0;
    /* Ensures truncation works */
}

.list-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.list-card-category {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 3px 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-card-rating {
    font-size: 0.8rem;
    color: #ffb81c;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.list-card-rating .rating-count {
    color: #6c757d;
    font-weight: 400;
    font-size: 0.75rem;
}

.list-card-status {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 10px;
}

.list-card-status .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

/* Status Colors */
.list-card-status.open {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.list-card-status.open .dot {
    background-color: #28a745;
}

.list-card-status.closed {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.list-card-status.closed .dot {
    background-color: #dc3545;
}

.list-card-status.whatsapp {
    color: #25d366;
    background-color: rgba(37, 211, 102, 0.1);
}

.list-card-status.whatsapp .dot {
    background-color: #25d366;
}

.list-card-status.call {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
}

.list-card-status.call .dot {
    background-color: #0d6efd;
}

.list-card-status.h24 {
    color: #00bcd4;
    background-color: rgba(0, 188, 212, 0.1);
}

.list-card-status.h24 .dot {
    background-color: #00bcd4;
}

/* Delivery Badge Helper */
.list-card-badge {
    margin-left: auto;
    background: rgba(var(--primary-rgb, 255, 184, 28), 0.1);
    color: var(--primary, #ffb81c);
    border-radius: 8px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    /* Alinha no topo */
}


/* See More Button logic */
.hidden-list-item {
    display: none !important;
}

.btn-ver-mais {
    width: 100%;
    padding: 12px;
    font-weight: 700;
    border-radius: 50px;
    background-color: rgba(var(--primary-rgb, 0, 0, 0), 0.05);
    /* Usa o rgb da cor primária ou cinza */
    color: var(--primary, #000);
    border: 1px solid rgba(var(--primary-rgb, 0, 0, 0), 0.1);
    transition: background-color 0.2s;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.btn-ver-mais:hover {
    background-color: rgba(var(--primary-rgb, 0, 0, 0), 0.1);
}

/* =========================================================================
   Grid Responsive Desktop (Up from Mobile)
========================================================================== */
@media (min-width: 768px) {
    .section-header-modern .title-box h2 {
        font-size: 1.4rem;
        white-space: nowrap;
        margin-bottom: 2px;
    }

    .section-header-modern .title-box {
        padding-right: 20px;
        flex: 1;
        min-width: 0;
    }

    .section-header-modern .title-box p {
        font-size: 0.9rem;
        line-height: 1.2;
    }

    /* Transform to Grid */
    .list-cards-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* desktop smooth sections */
@media (min-width: 1024px) {
    .section {
        border-radius: 40px;
        margin-left: 15px;
        margin-right: 15px;
        position: relative;
    }

    .section-header-modern {
        padding-left: 20px;
        padding-right: 20px;
    }

    .section .container {
        position: relative;
    }

    .list-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.home-events-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    grid-template-areas:
        "header header"
        "left right";
    gap: 2.2rem;
    align-items: stretch;
}

.home-events-header {
    grid-area: header;
    position: relative;
    padding-top: 25px;
    margin-bottom: 18px;
}

.home-events-left {
    grid-area: left;
}

.home-events-right {
    grid-area: right;
}

.home-events-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: #ffb81c;
    border-radius: 2px;
}

.home-events-header h2 {
    font-weight: 800;
    margin: 10px 0 2px 0;
    font-size: 1.8rem;
    color: #1a1a1a;
    line-height: 1.2;
}

.home-events-header p {
    display: flex;
    gap: 6px;
    align-items: baseline;
    margin: 0;
    font-size: 1rem;
    color: #6c757d;
}

.home-events-header p strong {
    color: #1a1a1a;
    font-weight: 600;
}

.home-events-list {
    display: flex;
    flex-direction: column;
}

.home-events-item {
    display: grid;
    grid-template-columns: 188px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px 0;
    text-decoration: none;
    border-bottom: 1px solid #e5e7eb;
}

.home-events-item.is-last {
    border-bottom: 0;
}

.home-events-thumb {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
    aspect-ratio: 16 / 10;
}

.home-events-thumb-img,
.home-events-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-events-thumb-placeholder,
.home-events-slide-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.72);
    background: #111827;
}

.home-events-thumb-placeholder i,
.home-events-slide-placeholder i {
    font-size: 1.6rem;
}

.home-events-content {
    min-width: 0;
}

.home-events-location {
    display: block;
    font-size: 0.82rem;
    font-weight: 800;
    color: #ffb81c;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.home-events-title {
    margin: 0;
    font-weight: 800;
    color: #1a1a1a;
    font-size: clamp(1.15rem, 2.2vw, 1.9rem);
    line-height: 1.18;
}

.home-events-date-line {
    margin-top: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6c757d;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.home-events-date {
    position: absolute;
    background: rgba(17, 24, 39, 0.92);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.home-events-date strong {
    font-size: 1.65rem;
    line-height: 1;
    font-weight: 800;
}

.home-events-date span {
    font-size: 0.8rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-top: 4px;
}

.home-events-date-side {
    top: 0;
    right: 0;
    bottom: 0;
    width: 58px;
}

.home-events-slider {
    position: relative;
}

.home-events-slide {
    display: none;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    background: #111827;
    aspect-ratio: 16 / 10;
}

.home-events-slide.is-active {
    display: block;
}

.home-events-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.86) 100%);
}

.home-events-date-corner {
    top: 16px;
    left: 16px;
    width: 66px;
    padding: 12px 8px;
    border-radius: 10px;
}

.home-events-slide-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 18px 18px 22px;
}

.home-events-chip {
    display: inline-block;
    background: #ffb81c;
    color: #111827;
    font-weight: 900;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.home-events-slide-title {
    margin: 0;
    color: #fff;
    font-weight: 900;
    font-size: clamp(1.55rem, 2.6vw, 2.4rem);
    line-height: 1.1;
}

.home-events-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
}

.home-events-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 2px solid #d1d5db;
    background: transparent;
    padding: 0;
}

.home-events-dot.is-active {
    background: #ffb81c;
    border-color: #ffb81c;
}

@media (max-width: 991.98px) {
    .home-events-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "right"
            "left";
        gap: 1.5rem;
    }

    .home-events-item {
        grid-template-columns: 136px minmax(0, 1fr);
        gap: 14px;
    }
}

@media (max-width: 575.98px) {
    .home-events-header h2 {
        font-size: 1.65rem;
    }

    .home-events-header p {
        font-size: 0.98rem;
    }

    .home-events-item {
        grid-template-columns: 118px minmax(0, 1fr);
        padding: 12px 0;
    }

    .home-events-date-side {
        width: 52px;
    }

    .home-events-date strong {
        font-size: 1.4rem;
    }

    .home-events-date span {
        font-size: 0.75rem;
    }

    .home-events-date-corner {
        top: 12px;
        left: 12px;
        width: 56px;
        padding: 10px 6px;
    }

    .home-events-slide-content {
        padding: 14px 14px 18px;
    }

    .home-events-slide-title {
        font-size: 1.45rem;
    }
}
