/* Custom styles for TeeTime Guide */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom button hover effects */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Card hover effects */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Navigation brand styling */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Hero section background pattern */
.bg-primary {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #0056b3 100%);
}

/* Custom badge styling */
.badge {
    font-size: 0.875em;
    padding: 0.5em 0.75em;
}

/* Rating stars */
.rating-stars {
    color: #ffc107;
}

/* Map iframe styling */
iframe {
    border-radius: 0.375rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Back to top button */
#backToTop {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: all 0.3s ease;
    z-index: 1000;
}

#backToTop:hover {
    opacity: 1;
    transform: translateY(-3px);
}

/* Text shadow for better readability on hero images */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7), 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Hero section enhancements */
.hero-overlay {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.3));
}

/* Course hero image styling */
.course-hero {
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.course-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.3));
    z-index: 1;
}

.course-hero .hero-content {
    position: relative;
    z-index: 2;
}

/* Enhanced badge styling for hero section */
.hero-badge {
    backdrop-filter: blur(10px);
    background: rgba(255, 193, 7, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Force dark theme for all card elements - multiple targeting approaches */
.card-body {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

.card {
    background-color: #1a202c !important;
    border-color: #4a5568 !important;
}

/* Multiple ways to target card headers */
.card-header,
.card > .card-header,
div.card-header,
.card .card-header {
    background-color: #374151 !important;
    border-color: #4a5568 !important;
    color: #f9fafb !important;
    background-image: none !important;
}

/* Specific targeting for card titles */
.card-title,
.card-header .card-title,
h1.card-title,
h2.card-title,
h3.card-title,
h4.card-title,
h5.card-title,
h6.card-title {
    color: #f9fafb !important;
}

/* Override Bootstrap's default card header styles */
.card-header.bg-light,
.card-header.bg-white,
.card-header.bg-secondary,
.card-header:not([class*="bg-"]),
.bg-light,
.bg-white {
    background-color: #374151 !important;
    color: #f9fafb !important;
}

/* Ultra-specific override for stubborn Bootstrap styles */
.container .card .card-header,
.row .col-lg-8 .card .card-header,
.row .col-lg-4 .card .card-header {
    background-color: #374151 !important;
    background-image: none !important;
    border-bottom-color: #4a5568 !important;
}

/* Google AdSense styling */
.adsense-container {
    transition: all 0.3s ease;
}

.adsense-container:hover {
    background-color: rgba(55, 65, 81, 0.4) !important;
}

/* Responsive ad sizing */
@media (max-width: 768px) {
    #adsense-banner,
    #directory-top-banner,
    #bottom-banner-ad {
        min-height: 100px !important;
    }
    
    #sidebar-ad-top,
    #sidebar-ad-bottom {
        min-height: 200px !important;
    }
    
    .adsense-container p[style*="font-size: 0.75rem"] {
        font-size: 0.7rem !important;
    }
    
    /* City header responsive adjustments */
    .city-header h4 {
        font-size: 1.1rem !important;
    }
    
    .city-header {
        height: 100px !important;
    }
    
    .city-photo {
        min-height: 100px !important;
    }
}

/* City directory styling */
.city-header {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: 0.375rem 0.375rem 0 0;
}

.city-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.city-photo {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.city-header:hover .city-photo {
    transform: scale(1.02);
}

/* Photo overlay for better text readability */
.photo-overlay {
    z-index: 1;
}

.city-photo i {
    position: relative;
    z-index: 2;
}

/* Ensure city info section has proper styling */
.city-header .col-8 > div {
    position: relative;
    z-index: 2;
}

/* Course card improvements */
.course-card .card {
    border: 1px solid rgba(0, 0, 0, 0.125);
    transition: all 0.2s ease;
}

.course-card .card:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Chevron animation */
.city-header i[id^="chevron-"] {
    transition: transform 0.3s ease;
}

/* City section spacing */
.city-section .card-body {
    background-color: var(--bs-light) !important;
}

/* Override any Bootstrap white backgrounds */
.bg-white {
    background-color: #2d3748 !important;
}

/* Ensure text contrast on dark backgrounds */
.card-body p,
.card-body div,
.card-body span,
.card-body strong {
    color: #e2e8f0 !important;
}

/* Loading animation for search */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: var(--bs-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom form styling */
.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Alert custom styling */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Footer styling */
footer {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%) !important;
}

/* Custom spacing utilities */
.py-7 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    footer,
    #backToTop {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}

/* Dark mode enhancements */
[data-bs-theme="dark"] .bg-light {
    background-color: var(--bs-gray-800) !important;
}

[data-bs-theme="dark"] .text-muted {
    color: var(--bs-gray-400) !important;
}

/* Golf-themed decorative elements */
.golf-decoration {
    position: relative;
}

.golf-decoration::before {
    content: '⛳';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1.5rem;
    opacity: 0.3;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* OAuth button specific styling */
.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-primary:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-outline-dark:hover {
    background-color: #212529;
    border-color: #212529;
}
