/* Golf Courses Specific Styles */

/* Section Titles and Descriptions */
.golf-courses-content h1 {
    color: var(--secondary-color);
    font-size: 2.5rem;
    font-weight: 300;
    font-family: 'EB Garamond', serif;
    text-align: left;
    max-width: 900px;
    margin-left: 0px;
    margin-right: auto;
    margin-top: calc(var(--spacing-unit) * 1);
    margin-bottom: var(--spacing-unit);
    line-height: 1.3;
}

.golf-courses-content h1:first-of-type {
    /* margin-top: 0; */
}

.course-section-description {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.5;
    text-align: left;
    max-width: 1069px;
    margin: 0px 0 calc(var(--spacing-unit) * 2);
}

/* Responsive adjustments for section titles */
@media (max-width: 768px) {

    
    .golf-courses-content h1{
        font-size: 2rem;
        font-weight: 300;
        line-height: 2rem;
        margin-top: 0px;
        padding-top: calc(var(--spacing-unit) * 2);

    }
    .golf-courses-content h1:first-child {
        padding-top: calc(var(--spacing-unit) * 0);

    }
    
    .course-section-description {
        font-size: 1rem;
    }
}

/* Main Content Section */
.golf-courses-content {
    padding: calc(var(--spacing-unit) * 1) 0;
}

.golf-courses-grid {
    margin-top: calc(var(--spacing-unit) * 2);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    max-width: 1200px;
    margin-left: 0;
    margin-right: auto;
    gap: calc(var(--spacing-unit) * 2);
    padding: 0;
}

/* Ensure maximum 2 columns */
@media (min-width: 900px) {
    .golf-courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.course-card {
    background-color: #00355F;
    background-color: #6E6A19;
    color: #fff;
    /* color: #6E6A19; */
    border: 1px solid var(--border-color);
    overflow: visible; /* Allow absolute child to show outside card */
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease-in-out;
    position: relative; /* Set positioning context for the absolute body */
    cursor: default;
}

/* Progressive z-index: first card has highest z-index */
.course-card:nth-child(1) { z-index: 40; }
.course-card:nth-child(2) { z-index: 30; }
.course-card:nth-child(3) { z-index: 20; }
.course-card:nth-child(4) { z-index: 10; }

/* Active card gets highest z-index to appear above all others */
.course-card.active {
    z-index: 100 !important;
}

.course-card:hover {
    box-shadow: 0 8px 20px rgba(2, 103, 71, 0.2);
}

/* Course Media Container */
.course-media-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.course-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

/* Navigation arrows for media */
.media-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: background-color 0.3s;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.media-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.media-nav.prev {
    left: 0;
}

.media-nav.next {
    right: 0;
}

/* Media dots indicator */
.media-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2; /* Relative to parent card, higher than card body */
}

.media-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.media-dot.active {
    background-color: white;
}

/* Video Play Button */
.video-play-btn {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 3; /* Higher than navigation */
}

.video-play-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.video-play-btn i {
    margin-left: 2px; /* Center the play icon better */
}

/* Video Pause Button (shows when video is playing and on hover) */
.video-pause-btn {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 3; /* Higher than navigation */
}

.video-pause-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.video-pause-btn i {
    margin-left: 0; /* Pause icon is centered better without margin */
}

/* Show pause button when hovering over playing video */
.video-pause-btn.show-on-hover {
    display: flex;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.course-media-container:hover .video-pause-btn.show-on-hover {
    opacity: 1;
}

/* Course content */
.course-card-content {
    padding: calc(var(--spacing-unit) * 1.25);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    position: relative; /* For absolute positioned toggle content */
}

.course-card h3 {
    font-family: 'EB Garamond', serif;
    color: white;
    /* color: #6E6A19; */
    font-weight: 300;
    font-size: 1.35rem;
    margin: 0;
    line-height: 1.4;
    text-align: center;
}

/* Toggle Button Styles - Copied from features */
.toggle-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    width: auto;
    height: auto;
    border-radius: 0;
    align-self: center;
}

.toggle-btn::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-bottom: 2px solid white;
    border-right: 2px solid white;
    transform: rotate(-45deg); /* Points right > */
    transition: transform 0.3s ease-out, border-color 0.3s ease-out;
}

.toggle-btn::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.toggle-btn[aria-expanded="true"]::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.toggle-btn:hover {
    background-color: transparent;
}

/* Toggle Content (Course Description) - Copied from features */
.course-card-body {
    position: absolute;
    top: calc(94%); /* Position below the header, overlapping the border */
    left: -1px; /* Align with parent border */
    right: -1px; /* Align with parent border */
    z-index: 1; /* Relative to parent card z-index */
    background-color: #6E6A19;
    border: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    
    /* Animation Properties */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out, visibility 0.3s;
    padding: 10px var(--spacing-unit) 15px var(--spacing-unit);
}

.course-card-body p {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.6;
    color: white;
    margin: 0;
    padding: 0;
    text-align: left;
}

/* Active State - Copied from features */
.course-card.active .toggle-btn {
    background-color: transparent;
}

.course-card.active .toggle-btn::before {
    transform: rotate(45deg); /* Points down v */
    border-color: white;
}

.course-card.active .course-card-body {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Video Styles */
.course-media[data-media-type="video"] {
    object-fit: cover;
}

video.course-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* YouTube iframe */
.course-media-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Arrows always on top with higher z-index */
.media-nav {
    z-index: 10 !important;
    pointer-events: auto !important;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-media-container {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-media {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    color: #ccc;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    z-index: 1001;
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.9);
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
}

/* Lightbox Video Play Button */
.lightbox-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-video-play-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.lightbox-video-play-btn i {
    margin-left: 3px; /* Center the play icon better */
}

/* Hide navigation when only one media item */
.course-media-container[data-single="true"] .media-nav,
.course-media-container[data-single="true"] .media-dots {
    display: none;
}
@media (max-width: 980px) {
    .golf-courses-content {
        padding-top: calc(var(--spacing-unit) * 1);
    }
}
/* Responsive adjustments */
@media (max-width: 768px) {
    .golf-courses-grid {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-unit) * 1.5);
        padding: 0 calc(var(--spacing-unit));
    }
    
    .course-media-container {
        height: 200px;
    }
    
    .course-card h3 {
        font-size: 1.4rem;
    }
    
    /* Lightbox responsive */
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
    }
    
    .lightbox-counter {
        bottom: 20px;
        font-size: 14px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .course-card-content {
        padding: calc(var(--spacing-unit));
    }
    
    .media-nav {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .course-card-body {
        padding: calc(var(--spacing-unit));
    }
    
    /* Extra small screens lightbox */
    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .lightbox-prev {
        left: 5px;
    }
    
    .lightbox-next {
        right: 5px;
    }
    
    .lightbox-close {
        font-size: 25px;
        top: 5px;
        right: 5px;
    }
}

/* Invert and brighten logos and social icons in dark theme */
body.dark-theme .logo,
body.dark-theme .logo-desktop,
body.dark-theme .logo-mobile,
body.dark-theme .social-logo {
    filter: invert(1) brightness(2);
}