/**
 * Golf Countries Simple Widget Styles
 * Matches the design from the screenshot with proper card layouts
 * Includes both grid and carousel layouts
 */

/* Grid Layout (3 or fewer countries) */
.golf-countries-simple {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
}

/* Carousel Layout (more than 3 countries) */
.golf-countries-carousel-wrapper {
    position: relative;
    margin: 0;
}

.golf-countries-swiper {
    width: 100%;
    padding-bottom: 60px;
}

.golf-countries-swiper .swiper-wrapper {
    align-items: stretch;
}

.golf-countries-swiper .swiper-slide {
    height: auto;
    width: 300px;
    flex-shrink: 0;
}

.golf-countries-swiper .swiper-slide .golf-country-card {
    width: 100%;
    height: 100%;
    margin: 0;
}

/* Navigation Buttons */
.golf-countries-swiper .swiper-button-next,
.golf-countries-swiper .swiper-button-prev {
    color: #e18633;
    background: rgba(255, 255, 255, 0.9);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    top: 45%;
    margin-top: 0;
}

.golf-countries-swiper .swiper-button-next {
    right: 10px;
}

.golf-countries-swiper .swiper-button-prev {
    left: 10px;
}

.golf-countries-swiper .swiper-button-next:after,
.golf-countries-swiper .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.golf-countries-swiper .swiper-button-next:hover,
.golf-countries-swiper .swiper-button-prev:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

/* Pagination */
.golf-countries-swiper .swiper-pagination {
    bottom: 10px;
}

.golf-countries-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    width: 12px;
    height: 12px;
    transition: all 0.3s ease;
}

.golf-countries-swiper .swiper-pagination-bullet-active {
    background: #e18633;
    transform: scale(1.2);
}

.golf-country-card {
    position: relative;
    border-radius: 12px;
    /*overflow: hidden;
    */background: #fff;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 4/3;
    -webkit-transition: transform 0.3s ease, box-shadow 0.3s ease;
    -moz-transition: transform 0.3s ease, box-shadow 0.3s ease;
    -ms-transition: transform 0.3s ease, box-shadow 0.3s ease;
    -o-transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.golf-country-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.golf-country-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 40%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    color: white;
}

.golf-country-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.1;
    /* text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); */
    align-self: flex-start;
    /* margin-top: auto; */
    margin-bottom: 16px;
}

.golf-country-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #e18633;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.golf-country-button:hover {
    background: white;
    transform: translateX(5px);
    text-decoration: none;
    color: #e18633;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.golf-country-button::after {
    content: '→';
    font-size: 16px;
    transition: transform 0.3s ease;
}

.golf-country-button:hover::after {
    transform: translateX(3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .golf-countries-simple {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .golf-countries-carousel-wrapper {
    }
    
    .golf-country-card {
        aspect-ratio: 16/10;
    }
    
    .golf-country-title {
        font-size: 20px;
    }
    
    .golf-country-content {
        padding: 30px 20px 20px;
    }
}

@media (max-width: 480px) {
    .golf-countries-carousel-wrapper {
    }
    
    .golf-country-title {
        font-size: 18px;
    }
    
    .golf-country-button {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .golf-countries-swiper .swiper-button-next,
    .golf-countries-swiper .swiper-button-prev {
        width: 36px;
        height: 36px;
    }
    
    .golf-countries-swiper .swiper-button-next {
        right: 5px;
    }
    
    .golf-countries-swiper .swiper-button-prev {
        left: 5px;
    }
}

/* When there are exactly 3 items, make them equal width */
.golf-countries-simple:has(.golf-country-card:nth-child(3):last-child) {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
    .golf-countries-simple:has(.golf-country-card:nth-child(3):last-child) {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .golf-countries-simple:has(.golf-country-card:nth-child(3):last-child) {
        grid-template-columns: 1fr;
    }
}

/* Animation for loading */
.golf-country-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.golf-country-card:nth-child(1) { animation-delay: 0.1s; }
.golf-country-card:nth-child(2) { animation-delay: 0.2s; }
.golf-country-card:nth-child(3) { animation-delay: 0.3s; }
.golf-country-card:nth-child(4) { animation-delay: 0.4s; }
.golf-country-card:nth-child(5) { animation-delay: 0.5s; }
.golf-country-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}