/* ============================================================
   lousantilena.com — main.css
   Design system: charcoal-navy base, cyan-teal accent, glow effects
   ============================================================ */

:root {
  --color-bg:            #0d1117;
  --color-bg-raised:     #090d12;
  --color-bg-hover:      #111820;
  --color-accent:        #00c8d4;
  --color-accent-glow:   rgba(0, 200, 212, 0.85);
  --color-accent-dim:    rgba(0, 200, 212, 0.10);
  --color-accent-border: rgba(0, 200, 212, 0.15);
  --color-text:          #cce8ee;
  --color-text-muted:    #4a8090;
  --color-border:        rgba(0, 200, 220, 0.07);
  --color-border-hover:  rgba(0, 200, 212, 0.38);
  --sidebar-width:       200px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.4;
  min-height: 100vh;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }

/* ============================================================
   Background texture + flares
   ============================================================ */

.site-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(0, 200, 220, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}

.site-bg::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 55%; height: 60%;
  background: radial-gradient(ellipse at top right, rgba(0, 200, 212, 0.09) 0%, rgba(0, 180, 200, 0.04) 40%, transparent 70%);
}

.site-bg::after {
  content: '';
  position: absolute;
  bottom: 0; left: 200px;
  width: 50%; height: 45%;
  background: radial-gradient(ellipse at bottom left, rgba(0, 160, 180, 0.06) 0%, transparent 65%);
}

/* ============================================================
   Layout
   ============================================================ */

.site-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ============================================================
   Sidebar
   ============================================================ */

.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: rgba(9,13,18,0.75);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 99;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 20px 18px;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-logo-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sidebar-logo-sub {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 3px;
  letter-spacing: 0.04em;
}

.nav-group-label {
  font-size: 9px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #4a6a7a;
  padding: 6px 18px 3px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--color-text-muted);
  cursor: pointer;
  border-left: 2px solid transparent;
  position: relative;
  transition: color 0.15s, background 0.15s;
}

.nav-item:hover {
  color: #70b8c8;
  background: rgba(0, 200, 212, 0.04);
}

.nav-item.active {
  color: #c8eef4;
  border-left: 2px solid var(--color-accent);
  background: linear-gradient(90deg, rgba(0, 200, 212, 0.11) 0%, transparent 100%);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -2px; top: 0; bottom: 0;
  width: 2px;
  background: var(--color-accent);
  box-shadow: 0 0 14px 4px var(--color-accent-glow);
}

.nav-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.30;
  flex-shrink: 0;
}

.nav-item.active .nav-dot {
  background: var(--color-accent);
  opacity: 1;
  box-shadow: 0 0 8px 2px rgba(0, 200, 212, 0.90);
}

.nav-sub {
  padding: 4px 18px 4px 36px;
  font-size: 13px;
  line-height: 1.2;
  color: #3a7080;
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.nav-sub:hover { color: #50a0b0; }
.nav-sub.active { color: var(--color-accent); }

.nav-item .nav-arrow {
  margin-left: auto;
  font-size: 10px;
  opacity: 0.4;
  transition: transform 0.2s;
}
.nav-item.open .nav-arrow { transform: rotate(90deg); }

.nav-children { display: none; }
.nav-children.open { display: block; }

/* ============================================================
   Content area
   ============================================================ */

.content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   Section header
   ============================================================ */

.section-header {
  padding: 28px 36px 22px 36px;
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: visible;
}

.section-header::before {
  content: '';
  position: absolute;
  top: 0; left: -36px; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-accent) 0%, #80e8f0 25%, transparent 70%);
  opacity: 0.55;
}

.section-header::after {
  content: '';
  position: absolute;
  top: -20px; left: 0;
  width: 340px; height: 120px;
  background: radial-gradient(ellipse at left center, rgba(0, 200, 212, 0.10) 0%, transparent 70%);
  pointer-events: none;
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  background: linear-gradient(90deg, #c8eef4 0%, var(--color-accent) 50%, #80e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 5px;
  position: relative; z-index: 1;
}

.section-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  position: relative; z-index: 1;
}

/* ============================================================
   Content body
   ============================================================ */

.content-body {
  padding: 28px 36px;
  flex: 1;
  font-size: 15px;
}

/* ============================================================
   Link list (Rally, Motorsports, etc.)
   ============================================================ */

.link-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 680px;
}

.link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(9,13,18,0.75);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-decoration: none;
  color: inherit;
}

.link-row:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-hover);
}

.link-row-name {
  font-size: 15px;
  font-weight: 500;
  color: #90b8c8;
}

.link-row-url {
  font-size: 13px;
  color: #3a7080;
}

.link-row-icon {
  font-size: 15px;
  color: var(--color-accent);
  opacity: 0.5;
}

/* ============================================================
   Card grid
   ============================================================ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.card {
  background: rgba(9,13,18,0.75);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--color-border-hover);
  box-shadow: 0 0 24px rgba(0, 200, 212, 0.10), 0 4px 20px rgba(0, 0, 0, 0.5);
}

.card-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--color-bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.card-image::after {
  content: '';
  position: absolute;
  top: -20px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 80px;
  background: radial-gradient(ellipse, rgba(0, 200, 212, 0.13) 0%, transparent 70%);
  border-radius: 50%;
}

.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.card-image-placeholder {
  font-size: 10px;
  color: #1a3a40;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 1;
}

.card-body {
  padding: 12px 14px;
}

.card-name {
  font-size: 15px;
  font-weight: 600;
  color: #70b8c8;
  margin-bottom: 3px;
}

.card-meta {
  font-size: 13px;
  color: var(--color-text-muted);
}

.card-badge {
  display: inline-block;
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--color-accent-dim);
  color: #009ead;
  border: 1px solid var(--color-accent-border);
  margin-top: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ============================================================
   Tab bar
   ============================================================ */

.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  padding: 0 36px;
}

.tab-item {
  font-size: 15px;
  padding: 11px 20px;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s;
}

.tab-item:hover { color: #50a0b0; }

.tab-item.active {
  color: var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  text-shadow: 0 0 14px rgba(0, 200, 212, 0.60);
}

/* ============================================================
   Placeholder / coming soon
   ============================================================ */

.placeholder-message {
  padding: 60px 36px;
  color: var(--color-text-muted);
  font-size: 15px;
}

/* ============================================================
   Mobile
   ============================================================ */

.hamburger {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 200;
  background: rgba(9,13,18,0.75);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--color-text);
  font-size: 18px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 98;
}

@media (max-width: 768px) {
  .hamburger { display: block; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.open { transform: translateX(0); z-index: 150; }

  .sidebar-overlay.open { display: block; }
  .content { margin-left: 0; padding-top: 56px; }
}


/* Header accent line — spans content area, flush to sidebar */
.content::before {
  content: '';
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-accent) 0%, #80e8f0 25%, transparent 65%);
  opacity: 0.7;
  z-index: 50;
  pointer-events: none;
}

/* Mobile — overlay must not cover the sidebar (prevents tap interception) */
@media (max-width: 768px) {
  .sidebar { background: #090d12; }
  .sidebar-overlay.open { left: var(--sidebar-width); }
}
