/* Basic layout & styling */
.aew-associations-wrap {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
}

.aew-search-row {
    margin-bottom: 20px;
}

.aew-search-input {
    width: 96%;
    max-width: 1100px;
    padding: 14px 18px;
    border-radius: 20px;
    border: 1px solid #ddd;
    font-size: 18px;
    box-sizing: border-box;
}

/* Carousel container */
.aew-carousel-container {
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    width: 100%;
    padding: 0 60px; /* Espaço para as setas */
}

.aew-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.aew-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    flex: 0 0 100%;
    min-width: 100%;
    transition: opacity 0.5s ease-in-out;
}

/* Efeito fade para slides não ativos */
.aew-grid:not(.aew-active-slide) {
    opacity: 0.4;
    filter: grayscale(30%);
}

/* Card - Largura consistente */
.aew-card {
    background: #3D6631;
    border-radius: 12px;
    padding: 20px 15px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 100%; /* Garante largura consistente */
}

.aew-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.aew-card-link { 
    color: inherit; 
    text-decoration: none; 
    display: block; 
    width: 100%;
    height: 100%;
}

.aew-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.aew-card-title {
    margin: 0 0 8px;
    font-weight: 700;
    font-size: 18px;
    color: #ffffff;
    text-align: center;
}

.aew-card-sub {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.4;
    max-width: 90%;
}

.aew-card-location {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    text-align: center;
}

/* Navigation arrows */
.aew-carousel-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 2;
    width: 100%;
}

.aew-carousel-prev,
.aew-carousel-next {
    background: #3D6631;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    position: relative;
}

.aew-carousel-prev:hover,
.aew-carousel-next:hover {
    background: #2a4a21;
    transform: scale(1.1);
}

/* Posicionamento correto das setas */
.aew-carousel-prev {
    left: 0;
    margin-left: 0;
}

.aew-carousel-next {
    right: 0;
    margin-right: 0;
}

/* Button row */
.aew-button-row {
    margin-top: 30px;
}

.aew-see-all-btn {
    display: inline-block;
    background: #9ecd42;
    color: #fff;
    padding: 12px 26px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 0 rgba(0,0,0,0.06);
    transition: background 0.3s ease;
}

.aew-see-all-btn:hover {
    background: #8bb936;
}

.aew-see-all-btn--no-link {
    border: none;
    cursor: default;
}

.aew-arrow {
    margin-left: 5px;
}

/* Hidden state */
.aew-hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 992px) {
    .aew-grid { 
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
    .aew-carousel-container {
        padding: 0 50px;
    }
}

@media (max-width: 768px) {
    .aew-carousel-container {
        padding: 0 40px;
    }
}

@media (max-width: 640px) {
    .aew-grid { 
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 1fr);
    }
    .aew-card { 
        min-height: 120px; 
        padding: 15px 10px; 
    }
    .aew-card-title { font-size: 16px; }
    .aew-card-sub { font-size: 13px; }
    .aew-card-location { font-size: 13px; }
    .aew-carousel-container {
        padding: 0 35px;
    }
    .aew-carousel-prev,
    .aew-carousel-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .aew-carousel-container {
        padding: 0 30px;
    }
}