/*
Theme Name: New Theme Redesign
Theme URI: https://rcth-stz.eu
Description: Custom theme
Version: 1.0.1
Author: Galin Yan https://galin-yan.com
*/

/* ─── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:        #C0202A;
  --red-dark:   #8B0012;
  --red-light:  #E8374A;
  --red-pale:   #FDF1F2;
  --white:      #FFFFFF;
  --cream:      #FAFAFA;
  --ink:        #1A1018;
  --muted:      #6B6570;
  --border:     #EDE0E2;
  --shadow:     rgba(192,32,42,0.12);

  --font-display: 'Crimson Pro', Georgia, serif;
  --font-body:    'Nunito Sans', system-ui, sans-serif;

  --max-w: 1160px;
  --nav-h: 60px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── TOPBAR ───────────────────────────────────────────────── */
.topbar {
  background: var(--red-dark);
  padding: 6px 0;
}

.topbar__inner {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  align-items: center;
}

.topbar__link {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}
.topbar__link:hover { color: #fff; }
.topbar__link svg { flex-shrink: 0; }

/* ─── SITE HEADER ───────────────────────────────────────────── */
.site-header {
  background: var(--red);
  padding: 20px 0 16px;
  text-align: center;
}

.site-header__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.site-header__logo {
  display: inline-block;
  transition: opacity 0.2s;
}
.site-header__logo:hover { opacity: 0.88; }

.site-header__logo img {
  height: 90px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.25));
}

.site-header__tagline {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}

/* ─── MAIN NAV ──────────────────────────────────────────────── */
nav.main-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 16px var(--shadow);
}

nav.main-nav.nav-hidden {
  visibility: hidden;
}

.main-nav__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--nav-h);
}

.main-nav__list {
  display: flex;
  align-items: center;
  gap: 0;
}

.main-nav__list li { position: relative; }

.main-nav__list > li > a {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.2s;
  position: relative;
  gap: 5px;
}

.main-nav__list > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform 0.22s ease;
}

.main-nav__list > li > a:hover,
.main-nav__list > li.active > a { color: var(--red); }

.main-nav__list > li > a:hover::after,
.main-nav__list > li.active > a::after { transform: scaleX(1); }

/* ─── DROPDOWN ──────────────────────────────────────────────── */
.nav-dropdown {
  position: absolute;
  top: calc(var(--nav-h) + 1px);
  left: 0;
  min-width: 280px;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 2px solid var(--red);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s ease;
  z-index: 1001;
}

.main-nav__list li:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown a:last-child { border-bottom: none; }
.nav-dropdown a:hover { background: var(--red-pale); color: var(--red); padding-left: 26px; }

/* ─── HAMBURGER ─────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: all 0.25s;
}

/* ─── MOBILE NAV ────────────────────────────────────────────── */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 900;
}

.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 82%;
  max-width: 320px;
  height: 100%;
  background: var(--white);
  z-index: 901;
  padding: 24px 0;
  overflow-y: auto;
  transition: right 0.3s ease;
  box-shadow: -4px 0 32px rgba(0,0,0,0.15);
}

.mobile-nav-panel.open { right: 0; }
.mobile-nav-overlay.open { display: block; }

.mobile-nav-close {
  display: flex;
  justify-content: flex-end;
  padding: 0 20px 20px;
}

.mobile-nav-close button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--ink);
  padding: 4px;
  line-height: 1;
}

.mobile-nav-links a {
  display: block;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, padding-left 0.2s;
}
.mobile-nav-links a:hover { color: var(--red); padding-left: 30px; }

.mobile-nav-links .mobile-sub a {
  padding: 10px 36px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--muted);
  background: var(--cream);
}

.mobile-nav-links .mobile-sub-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-nav-links .mobile-sub-toggle svg { transition: transform 0.2s; }
.mobile-nav-links .mobile-sub-toggle.active svg { transform: rotate(180deg); }
.mobile-nav-links .mobile-sub { display: none; }
.mobile-nav-links .mobile-sub.open { display: block; }

/* ─── FOOTER ────────────────────────────────────────────────── */
footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
}

.footer-body {
  padding: 48px 0 36px;
  display: flex;
  align-items: flex-start;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-logo { flex-shrink: 0; }

.footer-logo img {
  height: 64px;
  width: auto;
  opacity: 0.85;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}

.footer-nav a {
  font-size: 13.5px;
  color: rgba(255,255,255,0.65);
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--white); }

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-social__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}

.footer-social a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.65);
  transition: color 0.2s;
}
.footer-social a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.footer-bottom p {
  font-size: 12.5px;
  color: rgba(255,255,255,0.35);
}

.footer-bottom a {
  transition: 0.2s ease-in-out;
}

.footer-bottom a:hover {
    color: var(--red);
    text-decoration: underline;
}

/* ─── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .main-nav__inner { justify-content: space-between; }
  .main-nav__list  { display: none; }
  .nav-hamburger   { display: block; }
  .site-header__logo img { height: 72px; }
  .footer-body { gap: 32px; }
}

@media (max-width: 600px) {
  .topbar { display: none; }
  .footer-body { flex-direction: column; gap: 28px; padding: 36px 0 28px; }
}

/* ─── DECLARATION FLOATING BUTTON ────────────────────────────── */
.decl-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(192,32,42,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.decl-fab:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(192,32,42,0.45);
}

.decl-fab svg {
  width: 26px;
  height: 26px;
  position: relative;
  z-index: 1;
  animation: declFabHeartbeat 2.4s ease-in-out infinite;
}

.decl-fab::before,
.decl-fab::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--red);
  opacity: 0.55;
  animation: declFabPulse 2.4s ease-out infinite;
}

.decl-fab::after {
  animation-delay: 1.2s;
}

@keyframes declFabPulse {
  0%   { transform: scale(1);   opacity: 0.55; }
  70%  { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}

@keyframes declFabHeartbeat {
  0%, 100%  { transform: scale(1); }
  14%       { transform: scale(1.12); }
  28%       { transform: scale(1); }
  42%       { transform: scale(1.08); }
  56%       { transform: scale(1); }
}

.decl-fab-label {
  position: fixed;
  right: 92px;
  bottom: 40px;
  z-index: 1200;
  background: var(--ink);
  color: var(--white);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 8px 14px;
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(6px);
  transition: opacity 0.2s, transform 0.2s;
}

.decl-fab-wrap:hover .decl-fab-label {
  opacity: 1;
  transform: translateX(0);
}

/* ─── DECLARATION MODAL ──────────────────────────────────────── */
.decl-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,16,24,0.55);
  z-index: 1300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.decl-modal-overlay.open {
  display: flex;
}

.decl-modal {
  background: var(--white);
  border-radius: 6px;
  border-top: 4px solid var(--red);
  max-width: 440px;
  width: 100%;
  padding: 40px 36px 32px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  text-align: center;
}

.decl-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--cream);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.decl-modal__close:hover { background: var(--red-pale); color: var(--red); }

.decl-modal__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.decl-modal__icon svg { color: var(--red); width: 26px; height: 26px; }

.decl-modal__title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
  line-height: 1.3;
}

.decl-modal__body {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 26px;
}

.decl-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--red);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 4px 20px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.decl-modal__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(192,32,42,0.3);
}

@media (max-width: 600px) {
  .decl-fab { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .decl-fab svg { width: 22px; height: 22px; }
  .decl-fab-label { display: none; }
  .decl-modal { padding: 32px 24px 26px; }
}