/* Custom CSS for Archery Events Finder */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-primary-hover: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

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

.nav-link.active {
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    min-height: 500px;
}

.hero-image {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* ===== CARD COMPONENT SYSTEM ===== */

/* Base Card Styles */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Enhanced Card Variants */
.card-enhanced {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

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

/* Clickable Card Links */
.card-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.card-link:hover {
    color: inherit;
    text-decoration: none;
}

.card-link .card {
    cursor: pointer;
}

.card-link .card-title {
    color: var(--dark-color);
    transition: color 0.2s ease;
}

.card-link:hover .card-title {
    color: var(--primary-color);
}

/* Card Image Containers */
.card-img-container {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-link:hover .card-img-container img {
    transform: scale(1.05);
}

/* Card Placeholder/Gradient Backgrounds */
.card-img-placeholder {
    height: 200px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.card-img-placeholder i {
    font-size: 3rem;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.card-link:hover .card-img-placeholder i {
    transform: scale(1.1);
}

/* Card Content Layout */
.card-body-flex {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-content-grow {
    flex-grow: 1;
}

.card-footer-actions {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
}

/* Card Button Styles */
.card .btn-primary {
    background: var(--gradient-primary);
    border: none;
    transition: all 0.2s ease;
}

.card .btn-primary:hover,
.card-link:hover .btn-primary {
    background: var(--gradient-primary-hover);
    transform: translateY(-1px);
}

/* Prevent button double-click in clickable cards */
.card-link .btn {
    pointer-events: none;
}

/* Card Grid Layouts */
.card-grid {
    display: grid;
    gap: 1.5rem;
}

.card-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Card List Alternative */
.card-list .card {
    margin-bottom: 1rem;
}

.card-list .card:hover {
    transform: translateX(5px);
}

/* Event Card Specializations */
.event-card .card-header {
    border-bottom: none;
}

.event-card .card-img-container {
    height: 180px; /* Slightly smaller for events */
}

.event-card .event-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.event-card .event-meta p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.event-card .event-status {
    font-weight: 600;
    font-size: 0.9rem;
}

.event-card .card-footer-actions {
    padding-top: 0.75rem;
}

/* Club Card Specializations */
.club-card .club-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.club-card .club-meta p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.club-card .archery-types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.club-card .archery-types .badge {
    font-size: 0.7rem;
}

/* Feature Icons */
.feature-icon i {
    transition: transform 0.3s ease;
}

.card:hover .feature-icon i {
    transform: scale(1.1);
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Footer */
footer {
    margin-top: auto;
}

footer a {
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
    
    .mobile-hidden {
        display: none !important;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .card-img-container {
        height: 150px;
    }
}

@media (min-width: 769px) {
    .desktop-hidden {
        display: none !important;
    }
}

/* Custom Utilities */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* Badge Styles */
.badge {
    font-weight: 500;
    font-size: 0.75em;
}

/* Accordion Customization */
.accordion-button:not(.collapsed) {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Custom Spacing */
.py-6 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

.my-6 {
    margin-top: 4rem !important;
    margin-bottom: 4rem !important;
}

/* Print Styles */
@media print {
    .navbar,
    footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none !important;
    }
}

a {
    color: var(--primary-color);
    text-decoration: none;
}