/* ============================================================
   ВЕТЕРАНСЬКИЙ КЛУБ "ЛЕГІОН" — Основний стиль
   ============================================================ */

/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&family=Roboto:wght@300;400;500;700&display=swap');

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Roboto', sans-serif;
  background: #0a0a0a url('/фон.jpg') center/cover fixed no-repeat;
  color: #e0e0e0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: -1;
  pointer-events: none;
}

/* ===== COLORS ===== */
:root {
  --primary: #1a5c2a;       /* темно-зелений */
  --primary-light: #2e7d32;
  --gold: #d4a843;
  --gold-light: #f0d080;
  --dark: #0a0a0a;
  --dark2: #111111;
  --dark3: #1a1a1a;
  --dark4: #222222;
  --text: #e0e0e0;
  --text-muted: #888;
  --danger: #c62828;
  --success: #2e7d32;
  --border: #333;
  --radius: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* ===== HEADER ===== */
header {
  background: linear-gradient(135deg, #0d2818, #1a1a1a);
  border-bottom: 2px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 20px;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  z-index: 1001;
}

.logo img {
  height: 45px;
  width: auto;
  transition: transform 0.3s;
}

.logo:hover img { transform: scale(1.05); }

.logo-text {
  display: none !important;
}

/* ===== NAVIGATION ===== */
nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

nav a {
  color: var(--gold);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: all 0.3s;
  white-space: nowrap;
}

nav a:hover, nav a.active {
  background: var(--gold);
  color: #000;
}

/* ===== BURGER MENU ===== */
.burger-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.burger-btn span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  transition: all 0.3s;
}

.burger-btn.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.burger-btn.active span:nth-child(2) { opacity: 0; }
.burger-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.mobile-menu.open {
  display: flex;
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  color: var(--gold);
  font-size: 22px;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 30px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  transition: all 0.3s;
  min-width: 250px;
  text-align: center;
}

.mobile-menu a:hover {
  background: var(--gold);
  color: #000;
}

@media (max-width: 820px) {
  nav.desktop-nav { display: none; }
  .burger-btn { display: flex; }
}

@media (min-width: 821px) {
  .mobile-menu { display: none !important; }
}

/* ===== MAIN ===== */
main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 20px;
}

/* ===== FOOTER ===== */
footer {
  background: var(--dark2);
  border-top: 2px solid var(--primary);
  padding: 40px 20px 20px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.footer-col h3 {
  color: var(--gold);
  font-size: 16px;
  margin-bottom: 15px;
  font-family: 'Montserrat', sans-serif;
}

.footer-col p, .footer-col a {
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
  transition: color 0.3s;
}

.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 92, 42, 0.4);
}

.btn-gold {
  background: var(--gold);
  color: #000;
}

.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}

.btn-outline:hover {
  background: var(--gold);
  color: #000;
}

.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.3s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
}

.form-group textarea { min-height: 100px; resize: vertical; }

/* ===== CARDS ===== */
.card {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.3s;
}

.card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(26, 92, 42, 0.2);
}

/* ===== GRID ===== */
.grid {
  display: grid;
  gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ===== PRODUCT CARD ===== */
.product-card {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(26, 92, 42, 0.3);
}

.product-card .photo {
  width: 100%;
  height: 220px;
  background: var(--dark4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--text-muted);
  overflow: hidden;
}

.product-card .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card .info {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card .info h3 {
  font-size: 16px;
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 8px;
  color: #fff;
}

.product-card .info .price {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
}

.product-card .info .meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.product-card .info .btn {
  margin-top: auto;
}

/* ===== ALERTS ===== */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

.alert.visible { display: block; }
.alert-error { background: rgba(198, 40, 40, 0.2); border: 1px solid var(--danger); color: #ff6b6b; }
.alert-success { background: rgba(46, 125, 50, 0.2); border: 1px solid var(--success); color: #66bb6a; }
.alert-info { background: rgba(26, 92, 42, 0.2); border: 1px solid var(--primary); color: #81c784; }

/* ===== LOADING ===== */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.loading::after {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}

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

/* ===== PAGE HEADER ===== */
.page-header {
  text-align: center;
  padding: 40px 0 30px;
}

.page-header h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 36px;
  color: var(--gold);
  margin-bottom: 10px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px 0;
}

.pagination button {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--dark3);
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s;
}

.pagination button:hover, .pagination button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== FILTERS ===== */
.filters {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  padding: 20px;
  background: var(--dark3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.filters select, .filters input {
  padding: 10px 14px;
  background: var(--dark4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  min-width: 160px;
}

.filters select:focus, .filters input:focus {
  border-color: var(--gold);
  outline: none;
}

/* ===== TABLES ===== */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table th {
  background: var(--primary);
  color: #fff;
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
}

table td {
  padding: 10px 15px;
  border-bottom: 1px solid var(--border);
}

table tr:hover td {
  background: rgba(26, 92, 42, 0.1);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon { font-size: 60px; margin-bottom: 20px; }
.empty-state h3 { font-size: 20px; margin-bottom: 10px; color: var(--text); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .header-inner { height: 60px; }
  .logo img { height: 35px; }
  main { padding: 20px 15px; }
  .page-header h1 { font-size: 26px; }
  .filters { flex-direction: column; }
  .filters select, .filters input { min-width: 100%; }
}


/* ===== USER DROPDOWN ===== */
.user-dropdown { position: relative; display: inline-block; z-index: 1000; }
.user-toggle { cursor: pointer; padding: 8px 12px; color: var(--gold); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.user-toggle:hover { color: #000; background: var(--gold); border-radius: 4px; }
.dropdown-menu { display: none; position: absolute; top: 100%; right: 0; background: #1a1a1a; border: 1px solid #333; border-radius: 6px; min-width: 200px; box-shadow: 0 4px 20px rgba(0,0,0,0.5); z-index: 1001; }
.dropdown-menu.open { display: block; }
.dropdown-menu a { display: block; padding: 10px 16px; color: #ccc; text-decoration: none; font-size: 14px; border-bottom: 1px solid #2a2a2a; }
.dropdown-menu a:last-child { border-bottom: none; }
.dropdown-menu a:hover { background: #2a2a2a; color: var(--gold); }
.nav-mprofile { display: block; padding: 12px 16px; color: var(--text); text-decoration: none; font-size: 15px; border-bottom: 1px solid var(--border); }
.nav-mprofile:hover { background: var(--dark3); color: var(--gold); }
.nav-mlogout { display: block; padding: 12px 16px; color: #e74c3c; text-decoration: none; font-size: 15px; border-bottom: 1px solid var(--border); }
.nav-mlogout:hover { background: var(--dark3); color: #ff6b6b; }
