/* Custom Clay Shoot Theme */
:root {
    --clay-orange: #e65100;
    --forest-green: #2e7d32;
    --dark-green: #1b5e20;
}

body {
    background-color: #f8f9fa;
    font-family: 'Roboto', sans-serif;
    padding-bottom: 25px; /* Space for the status bar */
}

.font-serif {
    font-family: 'Bitter', serif;
}

.bg-dark-green {
    background-color: var(--dark-green) !important;
}

.text-dark-green {
    color: var(--dark-green) !important;
}

.text-clay {
    color: var(--clay-orange) !important;
}

.btn-clay {
    background-color: var(--clay-orange);
    color: white;
    border: none;
}

.btn-clay:hover {
    background-color: #bf360c;
    color: white;
}

/* Hero Image */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3)), url('images/header.jpg');
    background-size: cover;
    background-position: center;
    padding: 60px 0; /* Reduced from 100px for a thinner look */
    margin-bottom: 30px;
    border-bottom: 5px solid var(--clay-orange);
    position: relative;
    overflow: hidden; /* Important for the ribbon */
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Improved readability */
}

.border-top-clay {
    border-top: 4px solid var(--clay-orange) !important;
}

/* Privacy Blurring */
.blur-text {
    filter: blur(4px);
    user-select: none; /* Prevent selection to reveal text */
    -webkit-user-select: none;
    display: inline-block; /* Required for transform/filter sometimes */
}

/* --- HOMEPAGE CARDS --- */

/* Carousel Layout */
.carousel-wrapper {
    position: relative;
    width: 100%;
    margin: 0 -15px;
    padding: 0 15px;
}

.squad-carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 2rem;
    padding: 1.5rem 0.5rem 3.5rem 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--clay-orange) rgba(0,0,0,0.05);
    scroll-behavior: smooth;
}

.squad-carousel-container::-webkit-scrollbar {
    display: block;
    height: 6px;
}

.squad-carousel-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
}

.squad-carousel-container::-webkit-scrollbar-thumb {
    background: var(--clay-orange);
    border-radius: 10px;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #eee;
    color: var(--dark-green);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0;
}

.carousel-wrapper:hover .carousel-arrow {
    opacity: 1;
}

.carousel-arrow:hover {
    background: var(--dark-green);
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.carousel-arrow.left {
    left: -10px;
}

.carousel-arrow.right {
    right: -10px;
}

.carousel-arrow.disabled {
    display: none !important;
}

@media (max-width: 768px) {
    .carousel-arrow {
        display: none;
    }
    .squad-carousel-container {
        -webkit-mask-image: none;
        mask-image: none;
        gap: 1.2rem;
    }
}

.squad-carousel-item {
    flex: 0 0 auto;
    width: 280px;
    height: 280px;
    scroll-snap-align: center;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@media (max-width: 768px) {
    .squad-carousel-item {
        width: 240px;
        height: 240px;
    }
}

/* Ground and Register Cards */
.ground-card, .register-card {
    height: 100%;
    width: 100%;
    position: relative;
    border-radius: 20px;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.ground-card:hover, .register-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.25) !important;
}

/* Ground Card Background & Overlay */
.ground-card .card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.ground-card:hover .card-bg {
    transform: scale(1.1); /* Zoom effect on hover */
}

.ground-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay for text readability */
    transition: background 0.3s ease;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Start from the top */
    align-items: center;
    padding: 4rem 1.5rem 2.5rem 1.5rem; /* Increased top padding to avoid conflict with fav icon */
}

.ground-card:hover .card-overlay {
    background: rgba(0, 0, 0, 0.6); /* Darken slightly on hover */
}

.ground-card h3 {
    position: relative;
    z-index: 2;
    margin-top: 0;
    margin-bottom: auto; /* Push the button to the bottom */
    font-size: 1.4rem;
    text-align: center;
}

.ground-card .btn {
    position: relative;
    z-index: 2;
    margin-top: 1rem;
    margin-bottom: 0.5rem; /* Anchor to bottom */
}

/* Favourite Button */
.fav-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100; /* Ensure it's above the overlay */
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    backdrop-filter: blur(4px);
    padding: 0;
}

.fav-btn:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.15);
    border-color: white;
}

.fav-btn.active {
    background: #ff5252;
    border-color: #ff5252;
    color: white;
}

/* Register Card Styling */
.register-card {
    background: linear-gradient(135deg, var(--clay-orange), #ff9800);
}

.register-card .icon-wrapper {
    background: rgba(255, 255, 255, 0.2);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.register-card:hover .icon-wrapper {
    transform: rotate(90deg);
}

/* Beta Ribbon */
.beta-ribbon {
    width: 200px; /* Standard width for corner ribbon */
    background: var(--clay-orange);
    position: absolute;
    top: 25px; /* Classic top position */
    right: -50px; /* Classic right position */
    text-align: center;
    line-height: 50px;
    letter-spacing: 1px;
    color: #f0f0f0;
    transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    z-index: 100;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    font-family: 'Roboto', sans-serif;
    pointer-events: none;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* --- MOBILE SPECIFIC TWEAKS --- */
@media (max-width: 768px) {
    /* Reduce Hero padding on mobile so it doesn't take up the whole screen */
    .hero-section {
        padding: 40px 0; 
    }
    
    .hero-section h1 {
        font-size: 2rem; /* Smaller title */
    }

    /* Ensure navbar items display horizontally when collapsed on small screens */
    .navbar-collapse.show .navbar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px 0;
    }

    .navbar-collapse.show .nav-item {
        margin: 0 10px;
    }

    /* Adjust Calendar height for mobile */
    #calendar {
        height: auto !important;
        min-height: 500px;
    }
    
    /* Ensure tables scroll horizontally instead of breaking layout */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Environment Watermarks */
.env-ribbon {
    position: fixed;
    bottom: 40px;
    right: -40px;
    width: 200px;
    text-align: center;
    padding: 10px;
    transform: rotate(-45deg);
    z-index: 9999;
    font-weight: bold;
    font-family: monospace;
    font-size: 1.2rem;
    pointer-events: none;
    opacity: 0.8;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.env-ribbon.staging {
    background-color: #ffc107; /* Bootstrap Warning */
    color: #000;
    border: 2px dashed #000;
}

.env-ribbon.development {
    background-color: #17a2b8; /* Bootstrap Info */
    color: #fff;
    border: 2px dashed #fff;
}

/* Fixed Status Bar */
.system-status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #212529;
    color: #ced4da;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.7rem;
    padding: 3px 12px;
    z-index: 10000;
    border-top: 1px solid #343a40;
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    height: 7px;
    width: 7px;
    background-color: #28a745;
    border-radius: 50%;
    display: inline-block;
}

/* Weather Temperature Alignment */
.weather-temp-adjust {
    display: inline-block;
    transform: translateY(-2px); /* Nudge up by 2px (total) */
}
