/*
Theme Name: ConectHub S7VEN
Theme URI: https://conecthub.ro
Author: ConectHub Team
Author URI: https://conecthub.ro
Description: Platforma digitală Alba Iulia – S7VEN Design System. Vibrant, uman și modern.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: conecthub-s7ven
Tags: one-column, two-columns, custom-colors, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   S7VEN DESIGN SYSTEM – CUSTOM PROPERTIES
   ========================================================================== */

:root {
  /* Brand Colors */
  --coral:         #FF6B6B;
  --coral-light:   #FF8E8E;
  --coral-dark:    #E85555;
  --coral-subtle:  #FFF0F0;
  --teal:          #4ECDC4;
  --teal-light:    #72D9D2;
  --teal-dark:     #3AB5AD;
  --teal-subtle:   #EDFAF9;
  --yellow:        #FFE66D;
  --yellow-light:  #FFEF9A;
  --yellow-dark:   #F5D720;
  --yellow-subtle: #FFFBE0;

  /* Neutral Palette */
  --white:         #FFFFFF;
  --off-white:     #FAFAFA;
  --bg:            #FAFAFA;
  --card-bg:       #FFFFFF;
  --slate-dark:    #2D3748;
  --slate:         #4A5568;
  --slate-light:   #718096;
  --slate-lighter: #A0AEC0;
  --border:        #E2E8F0;
  --border-light:  #EDF2F7;

  /* Typography */
  --font-heading:  'Nunito', 'Segoe UI', sans-serif;
  --font-body:     'Inter', system-ui, -apple-system, sans-serif;

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

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Border Radius */
  --radius-sm:   0.375rem;
  --radius:      1rem;
  --radius-lg:   1.25rem;
  --radius-xl:   1.5rem;
  --radius-2xl:  2rem;
  --radius-pill: 9999px;

  /* Shadows – Claymorphism (soft, light) */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:      0 4px 16px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md:   0 8px 32px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.05);
  --shadow-lg:   0 16px 48px rgba(0,0,0,0.10), 0 8px 24px rgba(0,0,0,0.06);
  --shadow-coral: 0 8px 24px rgba(255,107,107,0.25);
  --shadow-teal:  0 8px 24px rgba(78,205,196,0.25);

  /* Transitions */
  --transition:        all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index layers */
  --z-base:    1;
  --z-dropdown: 100;
  --z-sticky:  200;
  --z-fixed:   300;
  --z-modal:   400;
  --z-toast:   500;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--slate-dark);
  background-color: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Reserve space for bottom nav on mobile */
  padding-bottom: 80px;
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--slate-dark);
}

a {
  color: var(--coral);
  text-decoration: none;
  transition: var(--transition);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
}

input, textarea, select {
  font-family: var(--font-body);
}

/* ==========================================================================
   CLAY CARD SYSTEM
   ========================================================================== */

.clay-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: var(--space-6);
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.clay-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.clay-card-sm {
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.clay-card-lg {
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
}

/* Persona Card */
.persona-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  padding: var(--space-6);
  cursor: pointer;
  transition: var(--transition-spring);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.persona-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--persona-color, var(--coral));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.persona-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--persona-color, var(--coral));
}

.persona-card.selected {
  border-color: var(--persona-color, var(--coral));
  box-shadow: 0 0 0 3px rgba(255,107,107,0.2), var(--shadow-md);
}

/* ==========================================================================
   BENTO GRID
   ========================================================================== */

.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
  }
}

.bento-span-2 {
  grid-column: span 2;
}

.bento-span-3 {
  grid-column: span 2;
}

@media (min-width: 768px) {
  .bento-span-2 {
    grid-column: span 2;
  }
  .bento-span-3 {
    grid-column: span 3;
  }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-sm);
  line-height: 1;
  cursor: pointer;
  transition: var(--transition-spring);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: var(--text-base);
}

.btn-sm {
  padding: 0.375rem 1rem;
  font-size: var(--text-xs);
}

.btn-coral {
  background: var(--coral);
  color: var(--white);
  border-color: var(--coral);
  box-shadow: var(--shadow-coral);
}

.btn-coral:hover {
  background: var(--coral-dark);
  border-color: var(--coral-dark);
  color: var(--white);
  box-shadow: 0 12px 32px rgba(255,107,107,0.35);
}

.btn-teal {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
  box-shadow: var(--shadow-teal);
}

.btn-teal:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--slate-dark);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--coral);
  color: var(--coral);
  background: var(--coral-subtle);
}

.btn-outline-coral {
  background: transparent;
  color: var(--coral);
  border-color: var(--coral);
}

.btn-outline-coral:hover {
  background: var(--coral);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--slate-light);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--border-light);
  color: var(--slate-dark);
}

/* ==========================================================================
   TAGS / BADGES
   ========================================================================== */

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: var(--font-heading);
  line-height: 1;
}

.tag-coral {
  background: var(--coral-subtle);
  color: var(--coral-dark);
  border: 1px solid rgba(255,107,107,0.2);
}

.tag-teal {
  background: var(--teal-subtle);
  color: var(--teal-dark);
  border: 1px solid rgba(78,205,196,0.2);
}

.tag-yellow {
  background: var(--yellow-subtle);
  color: #8B6914;
  border: 1px solid rgba(255,230,109,0.3);
}

.tag-violet {
  background: #F5F3FF;
  color: #7C3AED;
  border: 1px solid rgba(168,85,247,0.2);
}

.tag-orange {
  background: #FFF7ED;
  color: #C2410C;
  border: 1px solid rgba(249,115,22,0.2);
}

.tag-green {
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid rgba(34,197,94,0.2);
}

/* ==========================================================================
   BOTTOM NAVIGATION
   ========================================================================== */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 var(--space-2);
  z-index: var(--z-fixed);
  /* Respect safe area on iOS */
  padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--slate-lighter);
  font-size: var(--text-xs);
  font-weight: 600;
  font-family: var(--font-heading);
  transition: var(--transition);
  position: relative;
  min-width: 60px;
  cursor: pointer;
  background: none;
  border: none;
}

.bottom-nav-item .nav-icon {
  font-size: 1.375rem;
  transition: var(--transition-spring);
  display: block;
}

.bottom-nav-item span:last-child {
  font-size: 0.65rem;
  line-height: 1;
}

.bottom-nav-item:hover {
  color: var(--slate);
  background: var(--border-light);
}

.bottom-nav-item.active {
  color: var(--coral);
}

.bottom-nav-item.active .nav-icon {
  transform: translateY(-2px) scale(1.15);
}

.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--coral);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 8px var(--coral);
}

/* ==========================================================================
   TOP NAVBAR
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.navbar-logo-text {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--coral);
  letter-spacing: -0.02em;
}

.navbar-logo-text span {
  color: var(--teal);
}

.navbar-nav {
  display: none;
  align-items: center;
  gap: var(--space-1);
}

@media (min-width: 768px) {
  .navbar-nav {
    display: flex;
  }
}

.navbar-nav-link {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  color: var(--slate);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: var(--transition);
}

.navbar-nav-link:hover,
.navbar-nav-link.current-menu-item {
  background: var(--coral-subtle);
  color: var(--coral);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.xp-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--yellow-subtle);
  border: 1px solid var(--yellow-dark);
  color: #8B6914;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: var(--transition);
}

.xp-badge:hover {
  background: var(--yellow);
  transform: scale(1.05);
}

/* ==========================================================================
   SECTION WRAPPER
   ========================================================================== */

.section {
  padding: var(--space-12) var(--space-6);
}

.section-sm {
  padding: var(--space-8) var(--space-6);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--slate-dark);
  margin-bottom: var(--space-2);
}

.section-subtitle {
  font-size: var(--text-base);
  color: var(--slate-light);
  margin-bottom: var(--space-8);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

@keyframes float-gentle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-6px) rotate(2deg); }
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.8; transform: scale(0.97); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,107,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(255,107,107,0); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes bounce-in {
  0%   { transform: scale(0.8); opacity: 0; }
  60%  { transform: scale(1.05); opacity: 1; }
  80%  { transform: scale(0.97); }
  100% { transform: scale(1); }
}

@keyframes confetti-fall {
  0%   { transform: translateY(-100px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.animate-float { animation: float 4s ease-in-out infinite; }
.animate-float-gentle { animation: float-gentle 6s ease-in-out infinite; }
.animate-pulse-soft { animation: pulse-soft 3s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.animate-slide-up { animation: slide-up 0.5s cubic-bezier(0.4,0,0.2,1) both; }
.animate-fade-in { animation: fade-in 0.4s ease both; }
.animate-bounce-in { animation: bounce-in 0.5s cubic-bezier(0.34,1.56,0.64,1) both; }

/* Stagger animation delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ==========================================================================
   XP PROGRESS BAR
   ========================================================================== */

.xp-bar-wrapper {
  background: var(--border-light);
  border-radius: var(--radius-pill);
  height: 10px;
  overflow: hidden;
  position: relative;
}

.xp-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--coral), var(--yellow));
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.xp-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 90px;
  right: var(--space-4);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

@media (min-width: 768px) {
  .toast-container {
    bottom: var(--space-6);
  }
}

.toast {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-4) var(--space-5);
  min-width: 260px;
  max-width: 340px;
  animation: slide-in-right 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
  pointer-events: all;
}

.toast-xp {
  border-left: 4px solid var(--yellow);
  background: var(--yellow-subtle);
}

.toast-success {
  border-left: 4px solid var(--teal);
  background: var(--teal-subtle);
}

.toast-coral {
  border-left: 4px solid var(--coral);
  background: var(--coral-subtle);
}

.toast-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--slate-dark);
  margin-bottom: var(--space-1);
}

.toast-body {
  font-size: var(--text-xs);
  color: var(--slate-light);
}

/* ==========================================================================
   SCROLLBAR
   ========================================================================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--border-light);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-pill);
  border: 2px solid var(--border-light);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--slate-lighter);
}

/* Horizontal scroll container */
.scroll-x {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-4);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.scroll-x::-webkit-scrollbar { display: none; }

.scroll-x > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.text-coral  { color: var(--coral); }
.text-teal   { color: var(--teal); }
.text-yellow { color: var(--yellow-dark); }
.text-slate  { color: var(--slate); }
.text-muted  { color: var(--slate-light); }
.text-sm     { font-size: var(--text-sm); }
.text-xs     { font-size: var(--text-xs); }

.font-heading { font-family: var(--font-heading); }
.font-bold    { font-weight: 700; }
.font-black   { font-weight: 900; }

.bg-coral-subtle  { background: var(--coral-subtle); }
.bg-teal-subtle   { background: var(--teal-subtle); }
.bg-yellow-subtle { background: var(--yellow-subtle); }
.bg-off-white     { background: var(--off-white); }

.rounded      { border-radius: var(--radius); }
.rounded-xl   { border-radius: var(--radius-xl); }
.rounded-2xl  { border-radius: var(--radius-2xl); }
.rounded-pill { border-radius: var(--radius-pill); }

.shadow    { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

.hidden { display: none; }
.w-full { width: 100%; }
.text-center { text-align: center; }

/* Screen reader only */
.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;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--coral), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass effect */
.glass {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.5);
}

/* Focus visible */
:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   WORDPRESS DEFAULT ELEMENT STYLES
   ========================================================================== */

.alignnone  { margin: 5px 20px 20px 0; }
.aligncenter { display: block; margin: 5px auto 5px auto; }
.alignright { float: right; margin: 5px 0 20px 20px; }
.alignleft  { float: left; margin: 5px 20px 20px 0; }

.wp-caption { max-width: 96%; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 5px 3px 10px; text-align: center; }
.wp-caption img { border: 0; max-width: 100%; }
.wp-caption p.wp-caption-text { font-size: 11px; margin: 4px 0; }

.sticky {}
.gallery-caption {}
.bypostauthor {}
.wp-block-image figcaption { font-size: var(--text-sm); color: var(--slate-light); text-align: center; margin-top: var(--space-2); }

/* Screen reader text */
.screen-reader-text {
  clip: rect(1px,1px,1px,1px);
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal;
}
