/* ============================================================
   RIFEVAL PORTAL — CSS Principal
   ============================================================ */

/* ---- Reset & Base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #2563eb;
  --primary-dark:  #1d4ed8;
  --orange:        #ea580c;
  --orange-dark:   #c2410c;
  --slate-50:      #f8fafc;
  --slate-100:     #f1f5f9;
  --slate-200:     #e2e8f0;
  --slate-400:     #94a3b8;
  --slate-500:     #64748b;
  --slate-600:     #475569;
  --slate-700:     #334155;
  --slate-800:     #1e293b;
  --slate-900:     #0f172a;
  --white:         #ffffff;
  --radius:        0.75rem;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,.1);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.14);
  --shadow-xl:     0 16px 48px rgba(0,0,0,.18);
  --transition:    all .3s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  background: var(--white);
  color: var(--slate-800);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

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

/* ---- Background decorations ------------------------------- */
.bg-blobs {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .18;
}
.blob-blue    { width: 40%; height: 40%; top: -10%;  left: -10%; background: #bfdbfe; }
.blob-emerald { width: 30%; height: 30%; top: 20%;   right: -8%; background: #a7f3d0; }
.blob-orange  { width: 50%; height: 50%; bottom: -10%; left: 20%; background: #fed7aa; }

/* ---- Header ----------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand */
.brand-link {
  display: flex; align-items: center; gap: .75rem;
  text-decoration: none;
}
.brand-logo {
  width: 2.5rem; height: 2.5rem;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: .6rem;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.logo-img { width: 2rem; height: 2rem; object-fit: contain; }
.logo-fallback {
  width: 2rem; height: 2rem;
  background: var(--primary);
  color: white;
  font-weight: 800; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: .4rem;
}
.brand-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700; font-size: 1.2rem;
  color: var(--slate-900);
}

/* Desktop Nav */
.desktop-nav {
  display: flex; align-items: center; gap: 1.5rem;
}
.nav-link {
  font-size: .875rem; font-weight: 500;
  color: var(--slate-600);
  transition: var(--transition);
  padding: .25rem .5rem;
  border-radius: .4rem;
}
.nav-link:hover, .nav-link.active { color: var(--primary); }

/* Language switcher */
.lang-switcher {
  display: flex; align-items: center;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 9999px;
  padding: .25rem;
  gap: .125rem;
  box-shadow: var(--shadow-sm);
}
.lang-btn {
  display: flex; align-items: center; gap: .375rem;
  padding: .35rem .75rem;
  border-radius: 9999px;
  font-size: .75rem; font-weight: 700;
  color: var(--slate-500);
  transition: var(--transition);
  text-decoration: none;
}
.lang-btn:hover { color: var(--slate-700); }
.lang-btn.lang-active {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(234,88,12,.25);
}
.flag { font-size: .95rem; }

/* Mobile hamburger */
.mobile-menu-btn {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 2.5rem; height: 2.5rem;
  background: none; border: none; padding: .4rem;
}
.mobile-menu-btn span {
  display: block; height: 2px; width: 100%;
  background: var(--slate-700); border-radius: 2px;
  transition: var(--transition);
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  flex-direction: column;
  padding: 1rem 1.25rem 1.25rem;
  gap: .5rem;
  border-top: 1px solid var(--slate-100);
  background: var(--white);
}
.mobile-drawer.open { display: flex; }
.mobile-nav-link {
  font-size: 1rem; font-weight: 500; color: var(--slate-700);
  padding: .6rem .75rem;
  border-radius: .5rem;
  transition: var(--transition);
}
.mobile-nav-link:hover { background: var(--slate-100); color: var(--primary); }
.mobile-lang {
  display: flex; gap: .5rem; margin-top: .5rem;
}

/* ---- Hero -------------------------------------------------- */
.hero-section {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 4rem 1.25rem 3rem;
  max-width: 800px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  background: var(--slate-200);
  color: var(--slate-800);
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  padding: .35rem .9rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
}
.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
.hero-title .accent { color: var(--primary); }
.hero-subtitle {
  font-size: 1.05rem;
  color: var(--slate-600);
  line-height: 1.7;
  max-width: 600px;
}

/* ---- Platform Grid ---------------------------------------- */
.platforms-section {
  position: relative; z-index: 1;
  padding: 0 1.25rem 4rem;
}
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Card */
.platform-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 0 0 1px rgba(226,232,240,.5);
  overflow: hidden;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: transform .4s ease, box-shadow .4s ease;
  text-decoration: none;
  color: inherit;
  outline: none;
}
.platform-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}
.platform-card:focus-visible {
  box-shadow: 0 0 0 3px var(--primary);
}

/* Card background image */
.card-bg {
  position: absolute; inset: 0; z-index: 0;
}
.card-bg-img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: .08; filter: grayscale(1);
  transition: opacity .5s ease, filter .5s ease;
}
.platform-card:hover .card-bg-img {
  opacity: .18; filter: grayscale(0);
}
.card-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,.97) 0%, rgba(255,255,255,.82) 50%, rgba(255,255,255,.97) 100%);
}

/* Card watermark logo */
.card-watermark {
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; overflow: hidden;
}
.card-watermark img {
  width: 10rem; height: 10rem; object-fit: contain;
  opacity: .03; transition: opacity .6s ease, transform .6s ease;
}
.platform-card:hover .card-watermark img {
  opacity: .07; transform: scale(1.1);
}

/* Top accent bar */
.card-accent {
  position: absolute; top: 0; left: 0; right: 0;
  height: 5px; z-index: 10;
  opacity: 0; transition: opacity .3s ease;
}
.platform-card:hover .card-accent { opacity: 1; }

/* Card body */
.card-body { position: relative; z-index: 10; display: flex; flex-direction: column; height: 100%; }
.card-header { padding: 1.5rem 1.5rem 0; }
.card-header-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.card-icon {
  width: 3rem; height: 3rem;
  border-radius: .75rem;
  display: flex; align-items: center; justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  transition: transform .3s ease;
  flex-shrink: 0;
}
.platform-card:hover .card-icon { transform: rotate(5deg) scale(1.1); }
.card-icon svg { width: 1.4rem; height: 1.4rem; stroke: white; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card-tag {
  font-size: .65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  padding: .25rem .65rem;
  border-radius: 9999px;
  border: 1px solid;
  flex-shrink: 0;
}
.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem; font-weight: 700;
  color: var(--slate-900);
  transition: color .3s ease;
  margin-bottom: .375rem;
}
.platform-card:hover .card-title { color: var(--primary); }
.card-subtitle {
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--slate-500);
  margin-bottom: .5rem;
}
.card-content { padding: .75rem 1.5rem 1rem; flex: 1; }
.card-description { color: var(--slate-700); line-height: 1.65; font-size: .92rem; }
.card-footer { padding: 1rem 1.5rem 1.5rem; }
.card-cta {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; padding: .65rem 1rem;
  border-radius: .625rem;
  font-weight: 600; font-size: .9rem;
  color: white;
  transition: filter .3s ease, box-shadow .3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.card-cta:hover { filter: brightness(1.1); }
.card-cta svg { width: 1rem; height: 1rem; stroke: white; fill: none; stroke-width: 2; transition: transform .3s ease; }
.platform-card:hover .card-cta svg { transform: translateX(4px); }

/* Loading overlay */
.card-loading {
  position: absolute; inset: 0; z-index: 30;
  background: rgba(255,255,255,.95);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.card-loading.active { opacity: 1; pointer-events: auto; }
.spinner {
  width: 2.5rem; height: 2.5rem;
  border: 3px solid var(--slate-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.loading-text { font-size: .875rem; font-weight: 600; color: var(--slate-800); animation: pulse 1.2s ease-in-out infinite; }
@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ---- Footer ----------------------------------------------- */
.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--slate-200);
  margin-top: 2rem;
  padding: 3rem 0 0;
  color: var(--slate-600); font-size: .875rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}
.footer-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.footer-logo {
  width: 2rem; height: 2rem;
  background: var(--white);
  border: 1px solid var(--slate-100);
  border-radius: .5rem;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.logo-img-sm { width: 1.5rem; height: 1.5rem; object-fit: contain; }
.footer-brand-name { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--slate-900); }
.footer-text { line-height: 1.65; color: var(--slate-600); margin-bottom: .75rem; }
.footer-col-title { display: block; font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--slate-900); margin-bottom: 1rem; }
.footer-info { display: flex; flex-direction: column; gap: .25rem; }
.footer-italic { font-style: italic; color: var(--slate-500); }
.social-links { display: flex; gap: .5rem; margin-top: .75rem; }
.social-btn {
  width: 2.2rem; height: 2.2rem;
  border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  color: var(--slate-500); transition: var(--transition);
}
.social-btn:hover { background: #eff6ff; color: #2563eb; }
.social-btn svg { width: 1.1rem; height: 1.1rem; }
.footer-contacts { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.footer-contact-link { display: flex; align-items: center; gap: .5rem; color: var(--slate-600); transition: var(--transition); }
.footer-contact-link:hover { color: var(--primary); }
.contact-flag { font-size: 1rem; }
.footer-legal-links { display: flex; gap: 1.5rem; }
.footer-legal-link { color: var(--slate-600); transition: var(--transition); }
.footer-legal-link:hover { color: var(--orange); }
.footer-bottom {
  border-top: 1px solid var(--slate-100);
  padding: 1.5rem 0;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 1rem; color: var(--slate-400); font-size: .75rem;
}
.footer-lang-tag { display: flex; align-items: center; gap: .35rem; }
.icon-xs { width: .8rem; height: .8rem; }

/* ---- Scroll Top Button ------------------------------------ */
.scroll-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 50;
  width: 3rem; height: 3rem;
  background: var(--orange);
  color: white; border: none;
  border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(234,88,12,.3);
  transition: var(--transition);
  opacity: 0; transform: scale(.8) translateY(10px);
}
.scroll-top.visible { opacity: 1; transform: scale(1) translateY(0); display: flex; }
.scroll-top:hover { background: var(--orange-dark); }
.scroll-top svg { width: 1.4rem; height: 1.4rem; stroke: white; fill: none; stroke-width: 2.5; }

/* ---- Inner Pages ------------------------------------------ */
.page-hero {
  position: relative; z-index: 1;
  padding: 3.5rem 1.25rem 2.5rem;
  text-align: center;
}
.page-hero-badge {
  display: inline-block;
  background: var(--slate-200); color: var(--slate-800);
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  padding: .3rem .8rem; border-radius: 9999px; margin-bottom: 1rem;
}
.page-hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800; color: var(--slate-900); margin-bottom: .75rem;
}
.page-hero-sub { font-size: 1.05rem; color: var(--slate-600); max-width: 560px; margin: 0 auto; }

.page-content {
  position: relative; z-index: 1;
  max-width: 900px; margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .45rem; }
.form-label { font-size: .8rem; font-weight: 600; color: var(--slate-700); text-transform: uppercase; letter-spacing: .06em; }
.form-input, .form-textarea, .form-select {
  padding: .7rem 1rem;
  border: 1.5px solid var(--slate-200);
  border-radius: .625rem;
  font-size: .9rem; font-family: inherit;
  color: var(--slate-800);
  background: var(--white);
  transition: border-color .2s ease, box-shadow .2s ease;
  outline: none;
  width: 100%;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-textarea { resize: vertical; min-height: 130px; }
.btn-submit {
  align-self: flex-start;
  padding: .75rem 2rem;
  background: var(--orange);
  color: white; font-weight: 700; font-size: .9rem;
  border: none; border-radius: .625rem;
  box-shadow: 0 4px 12px rgba(234,88,12,.25);
  transition: var(--transition);
}
.btn-submit:hover { background: var(--orange-dark); transform: translateY(-1px); }

/* Alert */
.alert {
  padding: .9rem 1.25rem;
  border-radius: .625rem;
  font-size: .9rem; font-weight: 500;
  margin-bottom: 1.25rem;
}
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error   { background: #fff1f2; color: #9f1239; border: 1px solid #fecdd3; }

/* Info cards */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.info-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.info-card-icon {
  width: 2.8rem; height: 2.8rem;
  border-radius: .75rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.info-card-icon svg { width: 1.4rem; height: 1.4rem; stroke: white; fill: none; stroke-width: 2; }
.info-card h3 { font-size: .95rem; font-weight: 700; color: var(--slate-900); margin-bottom: .4rem; }
.info-card p  { font-size: .875rem; color: var(--slate-600); line-height: 1.6; }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--slate-500); margin-bottom: 2rem; }
.breadcrumb a { color: var(--slate-500); transition: var(--transition); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--slate-300); }

/* Prose / legal pages */
.prose { color: var(--slate-700); line-height: 1.75; }
.prose h2 { font-family: 'Outfit', sans-serif; font-size: 1.4rem; font-weight: 700; color: var(--slate-900); margin: 2rem 0 .75rem; }
.prose p  { margin-bottom: 1rem; }
.prose ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li { margin-bottom: .4rem; }

/* ---- Responsive ------------------------------------------- */
@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero-section { padding: 2.5rem 1.25rem 2rem; }
  .platforms-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .scroll-top { bottom: 1.25rem; right: 1.25rem; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .platforms-grid { grid-template-columns: repeat(2, 1fr); }
}
