/* ========================================================================
   Association des copropriétaires "Middle Way" - Base Styles (base.css)
   Modern, elegant, welcoming, premium, stylish, entertainment
   ======================================================================== */

/* ========================================================================
   1. CSS VARIABLES
   ======================================================================== */
:root {
  /* Color Palette - tuned for a modern, premium restaurant & poker lounge */
  --color-background: #070b10; /* deep charcoal navy */
  --color-surface: #10151f; /* dark surface for cards/sections */
  --color-surface-alt: #151b26;
  --color-text: #f7f7f8;
  --color-text-muted: #a0a6b5;

  --color-primary: #d4aa4c; /* warm gold accent */
  --color-primary-soft: rgba(212, 170, 76, 0.1);
  --color-primary-dark: #b98e35;

  --color-success: #2fbf71;
  --color-warning: #ffb84d;
  --color-danger: #f2685c;

  /* Neutral Grays */
  --gray-50: #f8fafc;
  --gray-100: #edf2f7;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1f2933;
  --gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --font-display: "Playfair Display", "Times New Roman", serif;
  --font-mono: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */
  --font-size-5xl: 3rem;     /* 48px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing Scale (0–96px) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-pill: 999px;

  /* Shadows - subtle yet premium */
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-soft-high: 0 18px 45px rgba(0, 0, 0, 0.5);
  --shadow-outline: 0 0 0 2px rgba(212, 170, 76, 0.35);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 180ms ease-out;
  --transition-slow: 260ms ease-out;
}

/* Media-query friendly container width */
:root {
  --layout-max-width: 1200px;
  --layout-gutter: 1.5rem;
}

/* Respect prefers-reduced-motion from the root */
@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
}

/* ========================================================================
   2. RESET & NORMALIZE
   ======================================================================== */

/* Box sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margins */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles */
ul[role='list'],
ol[role='list'],
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Set core body defaults */
html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Media elements */
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

/* Form defaults */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

textarea {
  resize: vertical;
}

/* Remove animations/transitions if user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================================================
   3. BASE TYPOGRAPHY & ELEMENTS
   ======================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background-color: var(--color-background);
  color: var(--color-text);
}

main {
  min-height: 60vh;
}

/* Headings - elegant, with display serif */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

h1 {
  font-size: var(--font-size-4xl);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-4);
}

h2 {
  font-size: var(--font-size-3xl);
  letter-spacing: 0.015em;
  margin-bottom: var(--space-3);
}

h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-3);
}

h4 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-2);
}

h5 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-1);
}

h6 {
  font-size: var(--font-size-base);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

p {
  margin-bottom: var(--space-3);
  color: var(--color-text-muted);
}

strong,
b {
  font-weight: 600;
}

small {
  font-size: var(--font-size-sm);
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base), opacity var(--transition-base);
}

a:hover {
  color: var(--color-primary-dark);
}

a:focus-visible {
  outline: none;
  box-shadow: var(--shadow-outline);
  border-radius: var(--radius-sm);
}

/* Blockquotes for testimonials */
blockquote {
  margin: 0;
  padding-left: var(--space-4);
  border-left: 2px solid var(--color-primary);
  color: var(--color-text-muted);
  font-style: italic;
}

/* Code */
code,
pre {
  font-family: var(--font-mono);
}

/* Tables (for tournament schedules) */
table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background-color: var(--color-surface-alt);
}

th,
td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

th {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

/* Horizontal rule as subtle divider */
hr {
  border: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  margin: var(--space-6) 0;
}

/* ========================================================================
   4. ACCESSIBILITY & FOCUS
   ======================================================================== */

:focus-visible {
  outline: none;
  box-shadow: var(--shadow-outline);
}

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================================================
   5. LAYOUT UTILITIES
   ======================================================================== */

/* Container for central, max-width content (all pages) */
.container {
  width: 100%;
  max-width: var(--layout-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--layout-gutter);
  padding-right: var(--layout-gutter);
}

/* Section spacing helpers for major site blocks (Acasă, Despre, etc.) */
.section {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.section--alt {
  background-color: var(--color-surface);
}

/* Flex utilities */
.d-flex {
  display: flex;
}

.flex-row {
  flex-direction: row;
}

.flex-column {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-around {
  justify-content: space-around;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

/* Grid utilities - used for gallery, menu, event cards */
.d-grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
}

/* Text alignment */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

/* Vertical rhythm utilities */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.pt-4 { padding-top: var(--space-4); }
.pt-6 { padding-top: var(--space-6); }
.pt-8 { padding-top: var(--space-8); }
.pb-4 { padding-bottom: var(--space-4); }
.pb-6 { padding-bottom: var(--space-6); }
.pb-8 { padding-bottom: var(--space-8); }

/* Badge-style utility (for "Nou", "Promoție", etc.) */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: rgba(15, 118, 110, 0.1);
  color: #5eead4;
}

.badge--gold {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.badge--danger {
  background: rgba(242, 104, 92, 0.12);
  color: var(--color-danger);
}

/* ========================================================================
   6. FORMS & INPUTS
   ======================================================================== */

label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background-color: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition: border-color var(--transition-base), box-shadow var(--transition-base), background-color var(--transition-base);
}

input::placeholder,
textarea::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-outline);
  background-color: #0b1220;
}

input[disabled],
select[disabled],
textarea[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Helper text / error text for forms (Rezervări, Contact, FAQ) */
.form-help {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.form-error {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

/* Inline form layout (for newsletter or quick booking widgets) */
.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.form-inline > * {
  flex: 1 1 auto;
}

/* ========================================================================
   7. BUTTONS
   ======================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #e9c46a, #d4aa4c);
  color: #111827;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f2d27c, #dfb45b);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft-high);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-soft);
}

.btn-outline {
  background-color: transparent;
  border-color: rgba(248, 250, 252, 0.18);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  background-color: rgba(15, 23, 42, 0.85);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-text-muted);
}

.btn-ghost:hover {
  color: var(--color-text);
  background-color: rgba(15, 23, 42, 0.7);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: var(--font-size-xs);
}

.btn-lg {
  padding: 0.95rem 1.75rem;
  font-size: var(--font-size-base);
}

.btn[disabled],
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-icon {
  padding: 0.55rem;
  border-radius: var(--radius-pill);
}

/* ========================================================================
   8. CARDS & SURFACES
   ======================================================================== */

/* General card used for menu highlights, events, tournaments, FAQ items */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, rgba(212, 170, 76, 0.06), transparent 50%),
              linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.22);
  padding: var(--space-5);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    background var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft-high);
  border-color: rgba(212, 170, 76, 0.65);
}

.card-header {
  margin-bottom: var(--space-3);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-1);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.card-body {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.card-footer {
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
}

/* Surface strip for premium header/footer bars */
.surface-bar {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

/* Highlight band (for promo sections / weekly poker nights) */
.highlight-band {
  background: linear-gradient(90deg, rgba(212, 170, 76, 0.13), transparent 60%);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  border: 1px solid rgba(212, 170, 76, 0.4);
}

/* ========================================================================
   9. MEDIA & GALLERY HELPERS
   ======================================================================== */

/* For gallery images */
.img-rounded {
  border-radius: var(--radius-lg);
}

.img-shadow {
  box-shadow: var(--shadow-soft);
}

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

/* Simple overlay for hero/featured media */
.media-overlay {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.media-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 11, 16, 0.85), transparent 55%);
}

/* ========================================================================
   10. RESPONSIVE TWEAKS
   ======================================================================== */

@media (max-width: 1024px) {
  .section {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }
}

@media (max-width: 768px) {
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
  h3 { font-size: var(--font-size-xl); }

  .section {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: var(--space-4);
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.95rem;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
