/* ================================================================
   Fantasy Golf Majors — Custom Styles
   ================================================================
   EDITING GUIDE:
   • Colors       → :root block below (CSS custom properties)
   • Buttons      → .btn-* classes
   • Cards        → .card class
   • Forms        → .form-label / .form-input
   • Alerts       → .alert-success / .alert-error / .alert-info
   • Tooltips     → .tooltip-arrow-*
   • Leaderboard  → .pos-1 / .pos-2 / .pos-3 / .score-*
   • Hero section → .hero-bg
   ================================================================ */


/* ================================================================
   COLORS
   — Update values here AND in the tailwind.config block inside
     includes/header.php and admin/header.php if you change these.
   ================================================================
   Palette:
     Championship Green  #0B3D2E
     Fairway Green       #3E7B4E
     Green Mist          #DDEBDD
     Charcoal            #282828
     Graphite            #6B6B6B
     Off White           #F7F7F4
     Bunker Sand         #DCC9A3
     Clubhouse Beige     #EFE7DA
     Water Blue          #2F6E8F
     Morning Sky         #C9DDEA
     Championship Gold   #C8A85D
   ================================================================ */
:root {
    --golf-green:    #0B3D2E;  /* Championship Green */
    --golf-dark:     #282828;  /* Charcoal */
    --golf-fresh:    #3E7B4E;  /* Fairway Green */
    --golf-light:    #DDEBDD;  /* Green Mist */
    --golf-gold:     #C8A85D;  /* Championship Gold */
    --golf-charcoal: #282828;  /* Charcoal */
    --golf-grey:     #F7F7F4;  /* Off White */

    /* Extended palette */
    --golf-graphite: #6B6B6B;  /* Graphite */
    --golf-sand:     #DCC9A3;  /* Bunker Sand */
    --golf-beige:    #EFE7DA;  /* Clubhouse Beige */
    --golf-blue:     #2F6E8F;  /* Water Blue */
    --golf-sky:      #C9DDEA;  /* Morning Sky */

    /* Hover shades */
    --golf-green-hover: #0a3527;
    --golf-gold-hover:  #b8983f;
}


/* ================================================================
   TYPOGRAPHY
   ================================================================ */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.font-display {
    font-family: 'Poppins', system-ui, sans-serif;
}


/* ================================================================
   CARDS
   ================================================================ */
.card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.06), 0 1px 2px -1px rgba(0,0,0,0.04);
    border: 1px solid #EFE7DA;
}


/* ================================================================
   BUTTONS
   ================================================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--golf-green);
    color: white;
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.15s ease;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--golf-green-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 61, 46, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--golf-grey);
    color: var(--golf-charcoal);
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.15s ease;
    border: 1px solid #DCC9A3;
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #EFE7DA;
    transform: translateY(-1px);
}

.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--golf-gold);
    color: var(--golf-charcoal);
    font-weight: 700;
    padding: 0.625rem 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.15s ease;
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: none;
}

.btn-gold:hover {
    background: var(--golf-gold-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(200, 168, 93, 0.4);
}


/* ================================================================
   FORMS
   ================================================================ */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #282828;
    margin-bottom: 0.375rem;
}

.form-input {
    width: 100%;
    border: 1.5px solid #DCC9A3;
    border-radius: 0.625rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    color: var(--golf-charcoal);
    background: white;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    font-family: inherit;
}

.form-input:focus {
    border-color: var(--golf-green);
    box-shadow: 0 0 0 3px rgba(11, 61, 46, 0.1);
}


/* ================================================================
   ALERTS
   ================================================================ */
.alert-success {
    background: #DDEBDD;
    border: 1px solid #b8d4b8;
    color: #3E7B4E;
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-info {
    background: #C9DDEA;
    border: 1px solid #a8c9dd;
    color: #2F6E8F;
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}


/* ================================================================
   STATUS BADGES
   ================================================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.status-upcoming  { background: #C9DDEA; color: #2F6E8F; }
.status-active    { background: #DDEBDD; color: #3E7B4E; }
.status-completed { background: #F7F7F4; color: #6B6B6B; }


/* ================================================================
   SCORE COLORS
   ================================================================ */
.score-under { color: #3E7B4E; font-weight: 700; }
.score-even  { color: var(--golf-charcoal); }
.score-over  { color: #dc2626; }


/* ================================================================
   LEADERBOARD POSITION BADGES
   ================================================================ */
.pos-1 { background: linear-gradient(135deg, #C8A85D, #b8983f); color: white; }
.pos-2 { background: linear-gradient(135deg, #6B6B6B, #555555); color: white; }
.pos-3 { background: linear-gradient(135deg, #DCC9A3, #C8A85D); color: #282828; }


/* ================================================================
   TAILWIND COLOR OVERRIDES
   — These map Tailwind's built-in utility classes to the new
     brand palette so existing HTML doesn't need to change.
   ================================================================ */

/* Blue → Water Blue / Morning Sky */
.bg-blue-50,  .bg-blue-100 { background-color: #C9DDEA !important; }
.bg-blue-200                { background-color: #b5cedf !important; }
.bg-blue-600, .bg-blue-700  { background-color: #2F6E8F !important; }
.hover\:bg-blue-100:hover   { background-color: #b5cedf !important; }
.text-blue-400              { color: #5fa0bc !important; }
.text-blue-600, .text-blue-700, .text-blue-800 { color: #2F6E8F !important; }
.border-blue-100, .border-blue-200 { border-color: #C9DDEA !important; }

/* Yellow → Championship Gold / Clubhouse Beige */
.bg-yellow-50, .bg-yellow-100 { background-color: #EFE7DA !important; }
.bg-yellow-200                 { background-color: #DCC9A3 !important; }
.bg-yellow-400                 { background-color: #C8A85D !important; }
.hover\:bg-yellow-100:hover    { background-color: #DCC9A3 !important; }
.hover\:bg-yellow-400:hover    { background-color: #b8983f !important; }
.text-yellow-300, .text-yellow-400 { color: #C8A85D !important; }
.text-yellow-600, .text-yellow-700 { color: #b8983f !important; }
.border-yellow-200 { border-color: #DCC9A3 !important; }
.border-yellow-400 { border-color: #C8A85D !important; }

/* Orange → Clubhouse Beige / Bunker Sand */
.bg-orange-50, .bg-orange-100 { background-color: #EFE7DA !important; }
.text-orange-600, .text-orange-700 { color: #C8A85D !important; }
.border-orange-100             { border-color: #DCC9A3 !important; }

/* Purple → Water Blue */
.bg-purple-600, .bg-purple-700 { background-color: #2F6E8F !important; }
.text-purple-600, .text-purple-700 { color: #2F6E8F !important; }
.border-purple-100             { border-color: #C9DDEA !important; }


/* ================================================================
   TOOLTIPS
   ================================================================ */

/* Arrow pointing down from a tooltip that appears above the trigger */
.tooltip-arrow-right {
    position: absolute;
    top: 100%;
    right: 10px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #282828;
}

.tooltip-arrow-center {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #282828;
}


/* ================================================================
   HERO SECTION
   ================================================================ */

/* Home page hero — photo with dark overlay for text readability */
.hero-bg {
    background-color: #0B3D2E;
    background-image:
        linear-gradient(135deg, rgba(11,61,46,0.90) 0%, rgba(11,61,46,0.78) 55%, rgba(62,123,78,0.55) 100%),
        url('/golf_app/assets/images/home-hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 90vh;
}

/* Subtle gold glow overlay on hero sections */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top right, rgba(200,168,93,0.08) 0%, transparent 60%);
    pointer-events: none;
}


/* ================================================================
   BLOG / PROSE
   ================================================================ */
.prose-golf p {
    color: #6B6B6B;
    line-height: 1.8;
    margin-bottom: 1.25rem;
    font-size: 1.0625rem;
}

.prose-golf h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #282828;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.prose-golf h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #282828;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}

.prose-golf strong {
    color: #282828;
    font-weight: 700;
}


/* ================================================================
   SCORECARD TABLE
   ================================================================ */
.scorecard-table {
    border-collapse: separate;
    border-spacing: 0;
}

.scorecard-table th {
    background: #282828;
    color: white;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.75rem;
}

.scorecard-table td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid #DDEBDD;
}


/* ================================================================
   DECORATIVE ELEMENTS
   ================================================================ */
.grass-border {
    border-top: 4px solid var(--golf-fresh);
}

.gold-underline {
    border-bottom: 3px solid var(--golf-gold);
    padding-bottom: 0.25rem;
}


/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fade-in-up 0.5s ease forwards;
}


/* ================================================================
   UTILITIES
   ================================================================ */

/* Alpine.js cloak — hides elements until Alpine initialises */
[x-cloak] { display: none !important; }

/* Line clamp */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ================================================================
   SCROLLBAR
   ================================================================ */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #F7F7F4; }
::-webkit-scrollbar-thumb { background: #DCC9A3; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #C8A85D; }


/* ================================================================
   MOBILE ADJUSTMENTS
   ================================================================ */
@media (max-width: 640px) {
    .card { padding: 1rem; border-radius: 0.75rem; }
    .btn-primary, .btn-secondary, .btn-gold { padding: 0.5rem 1.25rem; }
}
