/* ===================================================
   MSI — Mini Soccer Indonesia — Frontend Stylesheet
   =================================================== */

:root {
  --green:     #16a34a;
  --green-dark:#15803d;
  --green-lite:#dcfce7;
  --gold:      #d97706;
  --dark:      #0f172a;
  --gray:      #64748b;
  --light:     #f8fafc;
  --white:     #ffffff;
  --shadow:    0 4px 24px rgba(0,0,0,.10);
  --radius:    12px;
  --transition:.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', system-ui, sans-serif; color: var(--dark); background: var(--white); line-height: 1.6; }

img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-dark); }

/* ---- NAVBAR ---- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(15,23,42,.95); backdrop-filter: blur(12px);
  padding: .9rem 0; transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.3); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 1rem; }
.nav-logo { display: flex; align-items: center; gap: .6rem; color: var(--white); font-weight: 700; font-size: 1.15rem; }
.nav-logo img { width: 38px; height: 38px; object-fit: contain; }
.nav-logo .logo-text span { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: .2rem; margin-left: auto; }
.nav-links a { color: rgba(255,255,255,.8); padding: .45rem .85rem; border-radius: 8px;
  font-size: .9rem; font-weight: 500; transition: all var(--transition); }
.nav-links a:hover, .nav-links a.active { background: var(--green); color: var(--white); }
.nav-cta { background: var(--green) !important; color: var(--white) !important;
  padding: .5rem 1.2rem !important; font-weight: 600 !important; }
.nav-cta:hover { background: var(--green-dark) !important; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .4rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: all var(--transition); }

/* ---- HERO ---- */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  background: linear-gradient(135deg, #0f172a 0%, #064e3b 50%, #1a3a1a 100%);
  position: relative; overflow: hidden; padding-top: 80px;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2316a34a' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { max-width: 1200px; margin: 0 auto; padding: 4rem 1.5rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
  position: relative; z-index: 1; }
.hero-badge { display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(22,163,74,.2); border: 1px solid rgba(22,163,74,.4);
  color: #86efac; padding: .35rem .9rem; border-radius: 100px; font-size: .8rem;
  font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1.2rem; }
.hero-title { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800;
  color: var(--white); line-height: 1.15; margin-bottom: 1.2rem; }
.hero-title span { color: #4ade80; }
.hero-subtitle { font-size: 1.1rem; color: rgba(255,255,255,.75); margin-bottom: 2rem; max-width: 500px; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-primary { display: inline-flex; align-items: center; gap: .5rem;
  background: var(--green); color: var(--white); padding: .8rem 1.8rem;
  border-radius: 8px; font-weight: 700; font-size: 1rem; transition: all var(--transition); border: none; cursor: pointer; }
.btn-primary:hover { background: var(--green-dark); color: var(--white); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(22,163,74,.4); }
.btn-outline { display: inline-flex; align-items: center; gap: .5rem;
  background: transparent; color: var(--white); padding: .8rem 1.8rem;
  border: 2px solid rgba(255,255,255,.3); border-radius: 8px; font-weight: 600;
  font-size: 1rem; transition: all var(--transition); }
.btn-outline:hover { border-color: var(--white); color: var(--white); background: rgba(255,255,255,.1); }
.hero-visual { display: flex; justify-content: center; align-items: center; }
.hero-card { background: rgba(255,255,255,.06); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.12); border-radius: 20px; padding: 2rem;
  width: 100%; max-width: 380px; }
.hero-card-title { color: rgba(255,255,255,.6); font-size: .8rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1.2rem; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hero-stat { text-align: center; background: rgba(22,163,74,.1); border-radius: 12px; padding: 1.2rem; }
.hero-stat .num { font-size: 2rem; font-weight: 800; color: #4ade80; display: block; }
.hero-stat .lbl { font-size: .8rem; color: rgba(255,255,255,.65); }

/* ---- STATS SECTION ---- */
.stats-section { background: var(--green); padding: 3rem 0; }
.stats-grid { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
.stat-item .number { font-size: 2.5rem; font-weight: 800; color: var(--white); display: block; }
.stat-item .label { font-size: .9rem; color: rgba(255,255,255,.8); margin-top: .3rem; }

/* ---- SECTION BASE ---- */
.section { padding: 5rem 0; }
.section-alt { background: var(--light); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-tag { display: inline-block; background: var(--green-lite); color: var(--green-dark);
  font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .3rem .9rem; border-radius: 100px; margin-bottom: .8rem; }
.section-title { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 800; color: var(--dark); margin-bottom: .8rem; }
.section-desc { color: var(--gray); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* ---- TOURNAMENT CARDS ---- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.card { background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform var(--transition), box-shadow var(--transition); border: 1px solid #e2e8f0; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.15); }
.card-img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.card-img-placeholder { aspect-ratio: 16/9; background: linear-gradient(135deg, #064e3b, #16a34a);
  display: flex; align-items: center; justify-content: center; }
.card-img-placeholder svg { width: 60px; height: 60px; opacity: .4; color: var(--white); }
.card-body { padding: 1.4rem; }
.card-badge { display: inline-block; font-size: .72rem; font-weight: 700;
  padding: .2rem .7rem; border-radius: 100px; margin-bottom: .7rem; }
.badge-open    { background: #dcfce7; color: #15803d; }
.badge-ongoing { background: #fef9c3; color: #a16207; }
.badge-selesai { background: #f1f5f9; color: #475569; }
.badge-draft   { background: #f1f5f9; color: #94a3b8; }
.card-title { font-size: 1.1rem; font-weight: 700; color: var(--dark); margin-bottom: .5rem; }
.card-meta { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; color: var(--gray); }
.card-meta span { display: flex; align-items: center; gap: .35rem; }
.card-footer { padding: 1rem 1.4rem; border-top: 1px solid #f1f5f9;
  display: flex; justify-content: space-between; align-items: center; }
.progress-bar { height: 6px; background: #e2e8f0; border-radius: 100px; overflow: hidden; flex: 1; margin-right: 1rem; }
.progress-fill { height: 100%; background: var(--green); border-radius: 100px; }

/* ---- NEWS ---- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.news-card { background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid #e2e8f0; transition: transform var(--transition); }
.news-card:hover { transform: translateY(-3px); }
.news-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.news-card-body { padding: 1.2rem; }
.news-card-date { font-size: .8rem; color: var(--gray); margin-bottom: .5rem; }
.news-card-title { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: .5rem; line-height: 1.4; }
.news-card-summary { font-size: .87rem; color: var(--gray); line-height: 1.55; }
.news-card-link { font-size: .87rem; font-weight: 600; color: var(--green); margin-top: .7rem; display: inline-block; }

/* ---- CTA ---- */
.cta-section { background: linear-gradient(135deg, #064e3b, #16a34a); padding: 5rem 0; text-align: center; }
.cta-section h2 { font-size: 2.2rem; font-weight: 800; color: var(--white); margin-bottom: 1rem; }
.cta-section p { color: rgba(255,255,255,.85); font-size: 1.1rem; margin-bottom: 2rem; }
.btn-white { background: var(--white); color: var(--green); font-weight: 700;
  padding: .9rem 2.2rem; border-radius: 8px; display: inline-flex; align-items: center; gap: .5rem;
  transition: all var(--transition); }
.btn-white:hover { background: #f0fdf4; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.15); color: var(--green-dark); }

/* ---- GALLERY ---- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.gallery-item { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; cursor: pointer; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5);
  opacity: 0; display: flex; align-items: center; justify-content: center;
  transition: opacity var(--transition); color: var(--white); }
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ---- FOOTER ---- */
footer { background: var(--dark); color: rgba(255,255,255,.75); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand .logo { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.footer-brand .logo img { width: 36px; height: 36px; }
.footer-brand .logo strong { color: var(--white); font-size: 1.1rem; }
.footer-brand p { font-size: .9rem; line-height: 1.7; max-width: 260px; }
.footer-col h4 { color: var(--white); font-size: .9rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1.2rem; }
.footer-col a { display: block; font-size: .9rem; margin-bottom: .6rem;
  color: rgba(255,255,255,.65); transition: color var(--transition); }
.footer-col a:hover { color: #4ade80; }
.footer-socials { display: flex; gap: .8rem; margin-top: 1.2rem; }
.footer-socials a { width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.7);
  transition: all var(--transition); }
.footer-socials a:hover { background: var(--green); color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 2rem;
  text-align: center; font-size: .85rem; color: rgba(255,255,255,.45); }

/* ---- ALERTS ---- */
.alert { padding: 1rem 1.4rem; border-radius: 8px; margin-bottom: 1.2rem; font-size: .93rem;
  display: flex; align-items: flex-start; gap: .6rem; }
.alert-success { background: #dcfce7; color: #15803d; border-left: 4px solid #16a34a; }
.alert-error   { background: #fee2e2; color: #b91c1c; border-left: 4px solid #ef4444; }
.alert-info    { background: #dbeafe; color: #1d4ed8; border-left: 4px solid #3b82f6; }

/* ---- PAGE HEADER ---- */
.page-header { background: linear-gradient(135deg, #0f172a, #064e3b);
  padding: 7rem 0 3rem; text-align: center; color: var(--white); }
.page-header h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: .5rem; }
.page-header p { color: rgba(255,255,255,.75); }
.breadcrumb { display: flex; gap: .5rem; justify-content: center; margin-top: .8rem;
  font-size: .87rem; color: rgba(255,255,255,.6); }
.breadcrumb a { color: rgba(255,255,255,.8); }
.breadcrumb span { color: rgba(255,255,255,.4); }

/* ---- FORMS ---- */
.form-section { max-width: 700px; margin: 0 auto; }
.form-group { margin-bottom: 1.4rem; }
label { display: block; font-size: .87rem; font-weight: 600; color: var(--dark); margin-bottom: .45rem; }
input, select, textarea {
  width: 100%; padding: .7rem 1rem; border: 1.5px solid #e2e8f0;
  border-radius: 8px; font-size: .95rem; color: var(--dark);
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--white);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}
textarea { min-height: 120px; resize: vertical; }
.form-hint { font-size: .8rem; color: var(--gray); margin-top: .35rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.required-mark { color: #ef4444; }

/* ---- TABLES ---- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid #e2e8f0; }
table { width: 100%; border-collapse: collapse; }
th { background: var(--light); font-size: .82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--gray); padding: .85rem 1rem; text-align: left; }
td { padding: .85rem 1rem; border-top: 1px solid #f1f5f9; font-size: .9rem; }
tr:hover td { background: #fafafa; }

/* ---- BACK TO TOP ---- */
#back-to-top { position: fixed; bottom: 1.8rem; right: 1.8rem; z-index: 999;
  width: 44px; height: 44px; background: var(--green); color: var(--white);
  border: none; border-radius: 50%; cursor: pointer; display: none;
  align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(22,163,74,.4); transition: all var(--transition); }
#back-to-top.show { display: flex; }
#back-to-top:hover { background: var(--green-dark); transform: translateY(-3px); }

/* ---- LIGHTBOX ---- */
.lightbox { display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.92); align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 8px; object-fit: contain; }
.lightbox-close { position: fixed; top: 1.5rem; right: 1.5rem; background: rgba(255,255,255,.15);
  border: none; color: var(--white); cursor: pointer; width: 44px; height: 44px;
  border-radius: 50%; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; }

/* ---- EMPTY STATE ---- */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--gray); }
.empty-state svg { width: 60px; height: 60px; margin: 0 auto 1rem; opacity: .4; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; color: var(--dark); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-visual { display: none; }
  .hero-actions { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; position: fixed; top: 60px; left: 0; right: 0;
    background: #0f172a; flex-direction: column; padding: 1rem; gap: .3rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; margin-left: auto; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .cards-grid, .news-grid { grid-template-columns: 1fr; }
}
