/**
 * Golf Continents Countries Widget Styles
 * Similar to hotels widget but adapted for countries
 */

/* Grid Layout - Always 3 columns on desktop */
.golf-continents-countries-simple {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 0;
    padding: 0;
}

/* Country Card Styles */
.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;
}

.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(180deg, rgba(0,0,0,0.45) 0%,rgba(255,255,255,0) 40%);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 24px;
        color: white;
        border-radius: 10px;
        -webkit-border-radius: 10px;
        -moz-border-radius: 10px;
        -ms-border-radius: 10px;
        -o-border-radius: 10px;
}

.golf-course-button-wrapper{
    display: flex;
    justify-content: flex-end;
}

.golf-country-title {
    font-size: 28px !important;
    font-weight: 700;
    margin: 0;
    color: white !important;
    text-transform: uppercase;
    /* letter-spacing: 1.2px; */
    line-height: 36.4px;
    /* text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); */
    align-self: flex-start;
    /* margin-top: auto; */
    margin-bottom: 8px;
}

.golf-country-description {
    font-size: 14px;
    font-weight: 400;
    margin: 0 0 16px;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.golf-country-button {
     display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #415464 !important;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600 !important;
    font-size: 14px !important;
    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: #415464 !important;
    color: #fff !important;
    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: 1024px) {
    .golf-continents-countries-simple {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .golf-continents-countries-simple {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .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-country-title {
        font-size: 18px;
    }
    
    .golf-country-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* When there are exactly 3 items, make them equal width */
.golf-continents-countries-simple:has(.golf-country-card:nth-child(3):last-child) {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
    .golf-continents-countries-simple:has(.golf-country-card:nth-child(3):last-child) {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .golf-continents-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);
    }
}

/* Custom styles for larger screens */
@media (min-width: 1200px) {
    .golf-continents-countries-simple {
        gap: 24px;
    }
    
    .golf-country-card {
        /* aspect-ratio: 5/4; */
        min-height: 345px;
    }
    
    .golf-country-title {
        font-size: 26px;
    }
}