/* ==========================================================
   WEB ENGINE - MAIN STYLESHEET
   ========================================================== */

:root {
  --we-blue: #0d6efd;
  --we-blue-hover: #0b5ed7;
  --we-blue-light: #4f9bff;
}

/* ==========================================================
   THEMES
   ========================================================== */

/* ---------- Light ---------- */
[data-theme="light"] {
  --bg: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-nav: rgba(255, 255, 255, 0.85);
  --bg-footer: rgba(248, 249, 250, 0.88);
  --bg-hero-overlay: rgba(255, 255, 255, 0.7);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);
  --text: #212529;
  --text-strong: #0b1220;
  --text-muted: #6c757d;
  --shadow: rgba(0, 0, 0, 0.06);
  --shadow-hover: rgba(0, 0, 0, 0.12);
  --glow: rgba(13, 110, 253, 0.2);
  --icon-bg: #e7f1ff;
  --social-bg: rgba(0, 0, 0, 0.06);
  --social-fg: #495057;
}

/* ---------- Dark ---------- */
[data-theme="dark"] {
  --bg: #0b1220;
  --bg-card: rgba(20, 27, 46, 0.85);
  --bg-nav: rgba(11, 18, 32, 0.8);
  --bg-footer: rgba(11, 18, 32, 0.88);
  --bg-hero-overlay: rgba(11, 18, 32, 0.75);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #e4e8f0;
  --text-strong: #ffffff;
  --text-muted: #8b95ab;
  --shadow: rgba(0, 0, 0, 0.4);
  --shadow-hover: rgba(13, 110, 253, 0.25);
  --glow: rgba(13, 110, 253, 0.45);
  --icon-bg: rgba(13, 110, 253, 0.15);
  --social-bg: rgba(255, 255, 255, 0.08);
  --social-fg: #8b95ab;
}

/* ==========================================================
   BASE
   ========================================================== */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  transition: background-color .4s ease, color .4s ease;
  overflow-x: hidden;
}

/* ==========================================================
   BACKGROUND (BLUR)
   ========================================================== */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url('../images/bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.1);
  transition: filter .4s ease;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  background: var(--bg-hero-overlay);
  transition: background .4s ease;
}

#root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

main {
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
}

/* ==========================================================
   NAVBAR
========================================================== */

.navbar {
    padding: 0.7rem 0;
    background: var(--bg-nav);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: all .3s ease;
    box-shadow: 0 1px 3px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.75rem;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    color: var(--text-strong) !important;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
    text-decoration: none;
    transition: transform .25s ease;
}

.navbar-brand:hover {
    transform: translateY(-1px);
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    font-size: 34px;
    line-height: 1;
    background: linear-gradient(
        135deg,
        var(--we-blue),
        var(--we-blue-light)
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 6px var(--glow));
    transition: filter .3s ease, transform .3s ease;
}

.navbar-brand:hover .brand-icon {
    filter: drop-shadow(
        0 3px 10px rgba(13, 110, 253, .6)
    );
    transform: rotate(-8deg) scale(1.05);
}

.navbar-brand .engine {
    color: var(--we-blue);
}

/* ==========================================================
   MAIN NAVIGATION
========================================================== */

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    list-style: none;
    margin: 0 auto;
    padding: 0;
    min-width: 0;
}

.nav-links > li {
    position: relative;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem;
    font-size: 0.88rem;
    text-decoration: none;
    position: relative;
    transition: color .2s ease;
    white-space: nowrap;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 0;
    height: 2px;
    background: var(--we-blue);
    transition:
        width .25s ease,
        left .25s ease;
    box-shadow: 0 0 8px var(--glow);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--we-blue);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: calc(100% - 1.5rem);
    left: 0.75rem;
}

/* ==========================================================
   SSL SERTIFICATE DROPDOWN
========================================================== */

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 0.75rem;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: color .2s ease;
}

.nav-dropdown-toggle:hover {
    color: var(--we-blue);
}

.nav-dropdown-toggle i {
    font-size: 0.65rem;
    transition: transform .25s ease;
}

.nav-dropdown.open .nav-dropdown-toggle {
    color: var(--we-blue);
}

.nav-dropdown.open .nav-dropdown-toggle i {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;

    min-width: 190px;
    margin: 0;
    padding: 8px;

    list-style: none;

    background: var(--bg-nav);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    border: 1px solid var(--border);
    border-radius: 10px;

    box-shadow: 0 10px 30px var(--shadow);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);

    transition:
        opacity .2s ease,
        transform .2s ease,
        visibility .2s ease;

    z-index: 1000;
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu li {
    margin: 0;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.65rem 0.8rem;

    color: var(--text-muted);
    font-size: 0.88rem;

    border-radius: 7px;
    text-decoration: none;
    white-space: nowrap;
}

.nav-dropdown-menu a::after {
    display: none;
}

.nav-dropdown-menu a:hover {
    color: var(--we-blue);
    background: var(--icon-bg);
}

/* ==========================================================
   NAV AUTH
========================================================== */

.nav-auth {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ---------- Nav: Login ---------- */

.btn-nav-login {
    font-weight: 500;
    color: var(--text);
    background: transparent;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-strong);
    transition: all .2s ease;
    white-space: nowrap;
}

.btn-nav-login:hover {
    background: var(--icon-bg);
    color: var(--we-blue);
    border-color: var(--we-blue);
    box-shadow: 0 0 12px var(--glow);
}

/* ---------- Nav: Register ---------- */

.btn-nav-register {
    background: var(--we-blue);
    color: #fff;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .25s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-nav-register::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, .25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width .5s ease, height .5s ease;
}

.btn-nav-register:hover::before {
    width: 200px;
    height: 200px;
}

.btn-nav-register:hover {
    background: var(--we-blue-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 0 20px var(--glow);
}

.btn-nav-register span {
    position: relative;
    z-index: 1;
}

/* ---------- Nav: Forgot ---------- */

.btn-nav-forgot {
    font-weight: 500;
    color: #cc8808;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.88rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all .2s ease;
    white-space: nowrap;
}

.btn-nav-forgot:hover {
    background: var(--icon-bg);
    color: #cc8808;
}

.btn-nav-forgot i {
    transition: transform .3s ease;
}

.btn-nav-forgot:hover i {
    transform: rotate(-15deg);
}

/* ---------- Nav: Theme toggle ---------- */

.btn-theme {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all .25s ease;
    flex-shrink: 0;
}

.btn-theme:hover {
    background: var(--icon-bg);
    color: var(--we-blue);
    border-color: var(--we-blue);
    box-shadow: 0 0 12px var(--glow);
    transform: rotate(15deg);
}

.btn-theme .bi-sun-fill {
    display: none;
}

.btn-theme .bi-moon-stars-fill {
    display: inline;
}

[data-theme="dark"] .btn-theme .bi-sun-fill {
    display: inline;
}

[data-theme="dark"] .btn-theme .bi-moon-stars-fill {
    display: none;
}

/* ==========================================================
   NAVBAR RESPONSIVE
========================================================== */

@media (max-width: 1200px) {

    .nav-links a,
    .nav-dropdown-toggle {
        padding: 0.5rem 0.6rem;
        font-size: 0.83rem;
    }

    .btn-nav-login {
        padding: 0.5rem 0.7rem;
        font-size: 0.85rem;
    }

    .btn-nav-register {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .btn-nav-forgot {
        padding: 0.5rem 0.55rem;
        font-size: 0.82rem;
    }
}

@media (max-width: 992px) {

    .nav-links {
        gap: 0;
    }

    .nav-links a,
    .nav-dropdown-toggle {
        padding: 0.5rem 0.45rem;
        font-size: 0.8rem;
    }

    .btn-nav-login span,
    .btn-nav-register span,
    .btn-nav-forgot span {
        display: none;
    }

    .btn-nav-login,
    .btn-nav-register,
    .btn-nav-forgot {
        padding: 0.5rem 0.6rem;
    }

    .navbar-brand {
        font-size: 1.15rem;
    }

    .brand-icon {
        width: 28px;
        height: 28px;
        font-size: 28px;
    }
}

@media (max-width: 640px) {

    .nav-links a,
    .nav-dropdown-toggle {
        padding: 0.5rem 0.35rem;
        font-size: 0.76rem;
    }

    .nav-dropdown-menu {
        left: auto;
        right: 0;
    }
}

@media (max-width: 480px) {

    .navbar-brand span:not(.engine) {
        display: none;
    }

    .nav-links a,
    .nav-dropdown-toggle {
        padding: 0.45rem 0.25rem;
        font-size: 0.7rem;
    }
}

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.hero .container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  color: var(--we-blue);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: 50rem;
  box-shadow: 0 1px 4px var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
  animation: fadeUp .7s ease .1s both;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: #198754;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(25, 135, 84, .7);
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-strong);
  margin-bottom: 1.25rem;
  animation: fadeUp .8s ease .2s both;
}

.hero h1 .accent {
  background: linear-gradient(90deg, var(--we-blue), var(--we-blue-light), var(--we-blue));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmerText 3s linear infinite;
  filter: drop-shadow(0 0 12px var(--glow));
}

.hero .lead {
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  word-spacing: 0.05em;
  max-width: 44rem;
  margin: 0 auto 2rem;
  animation: fadeUp .8s ease .35s both;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .hero .lead {
  color: #d0d8e8;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero .hero-buttons {
  animation: fadeUp .8s ease .5s both;
}

.hero .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all .25s ease;
}

.hero .btn-primary {
  background: var(--we-blue);
  color: #fff;
  border: none;
}

.hero .btn-primary:hover {
  background: var(--we-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--glow);
  color: #fff;
}

.hero .btn-outline-secondary {
  color: var(--text);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
}

.hero .btn-outline-secondary:hover {
  transform: translateY(-2px);
  background: var(--icon-bg);
  color: var(--we-blue);
  border-color: var(--we-blue);
}

/* ==========================================================
   STATS
   ========================================================== */
.stats {
  padding: 3rem 0;
}

.stats .container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  animation: fadeUp .7s ease both;
}

.stat-item:nth-child(1) { animation-delay: .1s; }
.stat-item:nth-child(2) { animation-delay: .2s; }
.stat-item:nth-child(3) { animation-delay: .3s; }
.stat-item:nth-child(4) { animation-delay: .4s; }

.stat-item i {
  font-size: 1.5rem;
  color: var(--we-blue);
  margin-bottom: 0.5rem;
  display: block;
  transition: transform .3s ease, filter .3s ease;
}

.stat-item:hover i {
  transform: translateY(-4px) scale(1.1);
  filter: drop-shadow(0 0 8px var(--glow));
}

.stat-item h3 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-strong);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.stat-item p {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin: 0;
}

/* ==========================================================
   SECTIONS
   ========================================================== */
section {
  padding: 4.5rem 0;
}

.section-head {
  margin-bottom: 3rem;
}

.section-head .label {
  color: var(--we-blue);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  display: block;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 36rem;
  margin: 0 auto;
}

section .container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1),
              transform .7s cubic-bezier(.2, .7, .2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================
   GLASS CARDS
   ========================================================== */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.75rem;
  height: 100%;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--we-blue), var(--we-blue-light), var(--we-blue));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s ease;
}

.glass-card:hover::before {
  transform: scaleX(1);
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px var(--shadow-hover);
  border-color: var(--we-blue);
}

/* ==========================================================
   PRODUCT CARDS
   ========================================================== */
.product-card .icon-box {
  width: 54px;
  height: 54px;
  background: var(--icon-bg);
  color: var(--we-blue);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
  transition: all .35s cubic-bezier(.4, 0, .2, 1);
}

.product-card:hover .icon-box {
  transform: scale(1.1) rotate(-6deg);
  background: var(--we-blue);
  color: #fff;
  box-shadow: 0 0 25px var(--glow);
}

.product-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 0.6rem;
}

.product-card p {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.6;
  margin-bottom: 1.4rem;
}

.progress-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 50rem;
  margin-bottom: 0.55rem;
  overflow: hidden;
}

.progress-bar-custom {
  height: 100%;
  border-radius: 50rem;
  width: 0;
  transition: width 1.5s cubic-bezier(.2, .7, .2, 1);
  box-shadow: 0 0 10px var(--glow);
}

.progress-bar-custom.bg-primary { background: var(--we-blue); }
.progress-bar-custom.bg-success { background: #198754; }
.progress-bar-custom.bg-warning { background: #fd7e14; }

.progress-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  justify-content: space-between;
}

.progress-label strong {
  color: var(--text-strong);
}

/* ==========================================================
   SERVICES
   ========================================================== */
.service-card .tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--we-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 0.6rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.service-link {
  color: var(--we-blue);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.service-link:hover {
  color: var(--we-blue-hover);
}

.service-link:hover i {
  transform: translateX(4px);
}

.service-link i {
  transition: transform .2s ease;
}

/* ==========================================================
   CTA
   ========================================================== */
.cta-wrap {
  padding: 0 15px;
  max-width: 1140px;
  margin: 0 auto;
}

.cta-section {
  background: linear-gradient(135deg, #6d6f74, #0c4a96);
  backdrop-filter: blur(20px);
  color: #655d5d;
  padding: 4rem 2rem;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .15), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.cta-section::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 155, 255, .2), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.cta-section > * {
  position: relative;
  z-index: 2;
}

.cta-section h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  color: #ececec;
}

.cta-section p {
  color: rgb(255 255 255 / 90%);
  font-size: 1rem;
  max-width: 34rem;
  margin: 0 auto 1.75rem;
}

.cta-section .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all .25s ease;
}

.cta-section .btn-primary {
  background: linear-gradient(135deg, #6d6f74, #00399238);
  color: #feffff;
  border: none;
}

.cta-section .btn-primary:hover {
  background: linear-gradient(135deg, #6d6f74, #00399238);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .2);
}

.cta-section .btn-outline-light {
  border: 1px solid rgba(255, 255, 255, .5);
  color: #fff;
  background: transparent;
}

.cta-section .btn-outline-light:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .15);
  color: #fff;
}

/* ==========================================================
   FOOTER
   ========================================================== */
footer {
  background: var(--bg-footer);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 3.5rem 0 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

footer .container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

.footer-brand {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-strong);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.footer-brand .brand-icon {
  width: 28px;
  height: 28px;
  font-size: 28px;
  filter: drop-shadow(0 1px 4px var(--glow));
}

.footer-brand .engine {
  color: var(--we-blue);
}

.footer-desc {
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 20rem;
  font-size: 0.88rem;
}

.footer-col h6 {
  font-weight: 700;
  color: var(--text-strong);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  padding: 0.25rem 0;
  font-size: 0.88rem;
  transition: color .2s ease, padding-left .2s ease;
}

.footer-col a:hover {
  color: var(--we-blue);
  padding-left: 4px;
  text-shadow: 0 0 8px var(--glow);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--social-bg);
  color: var(--social-fg);
  border-radius: 50%;
  margin-left: 0.4rem;
  transition: all .25s ease;
  backdrop-filter: blur(8px);
  text-decoration: none;
}

.social-links a:hover {
  background: var(--we-blue);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 0 15px var(--glow);
}

/* ==========================================================
   KEYFRAMES
   ========================================================== */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(1.4); }
}

@keyframes shimmerText {
  to { background-position: 200% center; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ==========================================================
   TYPEWRITER CURSOR
   ========================================================== */
.cursor {
  display: inline-block;
  color: var(--we-blue);
  font-weight: 400;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1200px) {
  .nav-links a {
    padding: 0.5rem 0.65rem;
    font-size: 0.85rem;
  }

  .btn-nav-login {
    padding: 0.5rem 0.7rem;
    font-size: 0.85rem;
  }

  .btn-nav-register {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }

  .btn-nav-forgot {
    padding: 0.5rem 0.55rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 992px) {
  .nav-links a {
    padding: 0.5rem 0.5rem;
    font-size: 0.82rem;
  }

  .btn-nav-login span,
  .btn-nav-register span,
  .btn-nav-forgot span {
    display: none;
  }

  .btn-nav-login,
  .btn-nav-register,
  .btn-nav-forgot {
    padding: 0.5rem 0.65rem;
  }

  .navbar-brand {
    font-size: 1.15rem;
  }

  .brand-icon {
    width: 28px;
    height: 28px;
    font-size: 28px;
  }
}

@media (max-width: 767px) {
  .hero {
    padding: 3rem 0 2.5rem;
  }

  section {
    padding: 3rem 0;
  }
}

@media (max-width: 640px) {
  .nav-links a {
    padding: 0.5rem 0.4rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .navbar-brand span:not(.engine) {
    display: none;
  }

  .nav-links a {
    padding: 0.45rem 0.3rem;
    font-size: 0.72rem;
  }
}

/* ==========================================================
   USER MENU (Global — works on all pages)
   ========================================================== */

.user-menu {
    position: relative;
    display: inline-block;
}

.user-menu-toggle {
    display: flex !important;
    align-items: center;
    gap: 9px;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    padding: 4px 7px;
    border-radius: 12px;
    transition: background .2s ease;
    font-family: inherit;
}

.user-menu-toggle:hover {
    background: rgba(127, 127, 127, .10);
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    border: 2px solid var(--border-strong);
    flex-shrink: 0;
}

.user-name {
    font-weight: 600;
    white-space: nowrap;
    color: var(--text);
    font-size: 1rem;
}

.user-arrow {
    font-size: 13px;
    color: var(--text-muted);
    transition: transform .2s ease;
    flex-shrink: 0;
}

.user-menu.open .user-arrow {
    transform: rotate(180deg);
}

/* Badge за непрочетени съобщения (на бутона) */
.user-menu-msg-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 4px;
    background: #dc3545;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 10px;
    line-height: 1;
    animation: pulse-badge 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    50%      { box-shadow: 0 0 0 6px rgba(220, 53, 69, 0); }
}

/* DROPDOWN */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 245px;
    padding: 8px;
    border-radius: 14px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    display: none;
    flex-direction: column;
    z-index: 9999;
}

.user-menu.open .user-dropdown {
    display: flex !important;
    flex-direction: column !important;
    animation: dropdownFade .2s ease;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.user-dropdown > a {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    padding: 10px 12px !important;
    border-radius: 9px !important;
    color: var(--text) !important;
    text-decoration: none !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    transition: background .15s ease !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

.user-dropdown > a > i {
    width: 20px !important;
    text-align: center !important;
    font-size: 1.1rem !important;
    color: var(--text-muted) !important;
    flex-shrink: 0 !important;
    transition: color .15s ease !important;
}

.user-dropdown > a > span {
    flex: 1 1 auto !important;
    color: inherit !important;
}

/* Badge в dropdown (непрочетени) */
.user-dropdown-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    margin-left: auto;
    background: #dc3545;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 11px;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--bg-card);
    flex-shrink: 0;
}

.user-dropdown > a:hover {
    background: var(--icon-bg) !important;
    color: var(--we-blue) !important;
}

.user-dropdown > a:hover > i {
    color: var(--we-blue) !important;
}

.user-dropdown > a:hover .user-dropdown-badge {
    background: #b02a37;
    transform: scale(1.05);
    transition: all .2s ease;
}

/* Danger links */
.user-dropdown > a.danger {
    color: #dc3545 !important;
}

.user-dropdown > a.danger > i {
    color: #dc3545 !important;
}

.user-dropdown > a.danger:hover {
    background: rgba(220, 53, 69, .12) !important;
    color: #dc3545 !important;
}

/* Admin link */
.user-dropdown > a.admin {
    color: #6f42c1 !important;
}

.user-dropdown > a.admin > i {
    color: #6f42c1 !important;
}

.user-dropdown > a.admin:hover {
    background: rgba(111, 66, 193, .12) !important;
    color: #6f42c1 !important;
}

/* Highlight Messages link when unread */
.user-dropdown > a[href="messages.php"]:has(.user-dropdown-badge) {
    color: #dc3545 !important;
    font-weight: 600 !important;
}

.user-dropdown > a[href="messages.php"]:has(.user-dropdown-badge) > i {
    color: #dc3545 !important;
}

/* Divider */
.user-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .user-name {
        display: none;
    }

    .user-avatar {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .user-menu-toggle {
        padding: 3px 6px;
        gap: 6px;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
    }

    .user-dropdown {
        width: 240px;
        right: -10px;
    }
}