/* =============================
   moneyProf Test Styles (Revised)
   - Fixed mobile clipping on result title
   - Cleaned up container & result spacing
   - Applied new brand color scheme
   ============================= */

:root {
  --bg: #f1f0ee;
  --card: #ffffff;
  --accent: #b11a21;
  --accent-2: #e0474c;
  --muted: #6b7280;
  --success: #7acfd6;
  --danger: #e53e3e;
  --surface-shadow: 0 8px 30px rgba(28, 43, 64, 0.08);
  --glass: rgba(255, 255, 255, 0.7);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 720px;
  --gap: 1rem;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}
html, body {
  height: 100%;
}
body {
  margin: 0;
  padding: 2rem;
  font-family: Inter, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(180deg, #d8d8d8, #e5e7eb);
  color: #0f1724;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* containers */
.test-container, .result-container {
  width: 100%;
  max-width: var(--max-width);
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--surface-shadow);
  margin: 1rem;
  border: 1px solid rgba(43, 108, 176, 0.06);
  animation: floatUp 320ms ease both;
}

/* extra space for result container */
.result-container {
  padding-top: 2.5rem;
  overflow: visible;
}

/* header */
.header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.6rem;
}
h1 {
  margin: 0;
  color: var(--accent);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}
.subtitle {
  color: var(--muted);
  margin-top: 0.4rem;
  font-size: 0.95rem;
  text-align: center;
}

/* card header accent */
.top-accent {
  width: 100%;
  height: 6px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  margin-bottom: 1rem;
}

/* question */
#question-text {
  font-size: 1.125rem;
  margin: 0 0 0.5rem 0;
  color: #123d6b;
}

/* answers */
#answers-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.25rem;
  list-style: none;
  padding: 0;
}

#answers-container li {
  list-style: none;
  margin: 0;
}
input[type="radio"] {
  display: none;
}
.answer-label {
  display: block;
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fbfdff, #f7fbff);
  border: 1px solid rgba(15, 23, 36, 0.06);
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.03);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 180ms ease, border-color 180ms ease;
  font-size: 1rem;
  color: #0b2340;
}
.answer-label:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 22px rgba(16, 24, 40, 0.06);
}
input[type="radio"]:checked + .answer-label {
  background: linear-gradient(180deg, #fbecec, #f8dede);
  border: 1px solid rgba(177, 26, 33, 0.4);
  box-shadow: 0 10px 30px rgba(177, 26, 33, 0.08);
  transform: translateY(-2px);
  font-weight: 600;
}

/* primary action buttons (unified style) */
#next-button,
.answer-button {
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 180ms ease, opacity 150ms ease;
  box-shadow: 0 8px 20px rgba(177, 26, 33, 0.25);
}
#next-button:hover,
.answer-button:hover {
  transform: translateY(-3px);
}
#next-button:disabled,
.answer-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* likert scale */
.likert-scale {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  margin-top: 0.5rem;
}
.likert-scale label {
  flex: 1;
  text-align: center;
  padding: 0.65rem 0.45rem;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 36, 0.06);
  background: #fbfdff;
  cursor: pointer;
  font-size: 0.95rem;
}
.likert-scale input[type="radio"]:checked + label {
  background: linear-gradient(90deg, #ffd6d8, #fbb7bb);
  border-color: rgba(177, 26, 33, 0.4);
  font-weight: 700;
}

/* result title */
.archetype-title {
  display: inline-block;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff4f4, #ffe9e9);
  color: var(--accent);
  font-weight: 700;
  text-transform: capitalize;
  margin-top: 1.4rem;
  margin-bottom: 0.8rem;
  line-height: 1.4;
  box-shadow: 0 6px 18px rgba(177, 26, 33, 0.06);
}

/* subscribe */
#subscribe-area input[type="email"],
#subscribe-email {
  width: 100%;
  padding: 1.1rem 1rem;
  font-size: 1.05rem;
  border: 2px solid rgba(177, 26, 33, 0.25);
  border-radius: 12px;
  background: #fff;
  transition: box-shadow 160ms ease, border-color 160ms ease;
}
#subscribe-area input[type="email"]:focus,
#subscribe-email:focus {
  outline: none;
  border-color: rgba(177, 26, 33, 0.6);
  box-shadow: 0 0 0 4px rgba(177, 26, 33, 0.12);
}

#subscribe-area button,
#subscribe-btn {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: none;
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .02em;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px rgba(177, 26, 33, 0.25);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 160ms ease, opacity 120ms ease;
}
#subscribe-area button:hover,
#subscribe-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(177, 26, 33, 0.28);
}
#subscribe-area button:active,
#subscribe-btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(177, 26, 33, 0.22);
}
#subscribe-area button:disabled,
#subscribe-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

/* responsive */
@media (max-width: 520px) {
  :root {
    font-size: 15px;
  }
  .test-container, .result-container {
    padding: 1rem;
  }
  h1 {
    font-size: 1.25rem;
  }
  #next-button,
  .answer-button {
    font-size: 0.98rem;
    padding: 0.8rem;
  }
  #subscribe-area input[type="email"],
  #subscribe-email {
    font-size: 1.06rem;
    padding: 1.1rem 1rem;
  }
  #subscribe-area button,
  #subscribe-btn {
    font-size: 1.06rem;
    padding: 1.05rem 1.25rem;
  }
}

/* animation */
@keyframes floatUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* secondary button (neutral style) */
.secondary-button {
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  color: #374151;
  background: #e5e7eb;
  cursor: pointer;
  transition: background-color 120ms ease, transform 120ms ease;
  text-decoration: none;
  text-align: center;
}
.secondary-button:hover {
  background: #d1d5db;
  transform: translateY(-2px);
}
.secondary-button:active {
  transform: translateY(0);
}

/* accessibility */
.answer-label:focus, .answer-label:focus-visible {
  outline: 3px solid rgba(177, 26, 33, 0.2);
  outline-offset: 3px;
}
@media (max-width: 520px){
  body{
    align-items: flex-start;
    padding-top: calc(1rem + env(safe-area-inset-top));
  }
  .result-container{
    padding-top: calc(2rem + env(safe-area-inset-top));
  }
  h1, .archetype-title{
    margin-top: 1rem;
    line-height: 1.35;
  }
}

/* === NEW HOMEPAGE STYLES - REFACTORED === */

/* Override body layout for homepage and legal pages */
body.page-home,
body.page-legal {
    display: block;
    align-items: unset;
    justify-content: unset;
    padding: 0;
}

/* Main page content wrapper - matches test-container style */
.page-content-wrapper {
    width: 100%;
    max-width: 1100px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--surface-shadow);
    margin: 2rem auto;
    padding: 0;
    overflow: hidden;
}

/* Header */
.main-header {
    background-color: var(--card);
    border-bottom: 1px solid rgba(43, 108, 176, 0.06);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 1rem 0;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: #0f1724;
    text-decoration: none;
}

.logo span {
    color: var(--accent);
}

/* Buttons - unified with existing system */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform 120ms ease, box-shadow 180ms ease;
    cursor: pointer;
    border: none;
}

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

.button-primary {
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    color: #fff;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    box-shadow: 0 8px 20px rgba(177, 26, 33, 0.25);
}

.button-primary:hover {
    box-shadow: 0 12px 28px rgba(177, 26, 33, 0.3);
}

.button-secondary {
    background: var(--accent);
    color: #fff;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 4rem 2rem;
    text-align: center;
    color: #fff;
    
    /* --- Correct background image path using your filename --- */
    background-image: url('/static/images/hero_background.png'); /* <-- FINAL CORRECT PATH */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Add a dark overlay for text readability */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* 40% black overlay. Adjust if needed. */
    z-index: 1;
}

/* Ensure the actual content is on top of the overlay */
.hero-section > * {
    position: relative;
    z-index: 2;
}

/* .hero-logo {
    position: absolute;
    top: 2rem;
    left: 2rem;
    width: 160px;
    height: auto;
    opacity: 0.95;
} */

.hero-content h1 {
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: 1.75rem;
    padding-top: 6rem;
    font-weight: 800;
    line-height: 1.3;
    color: #fff;
}

.hero-subtext {
    margin-top: 1.5rem;
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Trust Section */
.trust-section {
    padding: 4rem 2rem;
    background-color: var(--card);
    text-align: center;
}

.trust-section .container {
    max-width: 1100px;
    margin: 0 auto;
}

.trust-section h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 3rem;
    color: var(--accent);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: left;
}

.feature-card {
    background-color: var(--bg);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid rgba(43, 108, 176, 0.06);
    transition: transform 120ms ease, box-shadow 180ms ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--surface-shadow);
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
    color: #0f1724;
    font-weight: 700;
}

.feature-card p {
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon img {
    width: 32px;
    height: 32px;
}

.feature-icon-1 { background-color: rgba(122, 207, 214, 0.15); }
.feature-icon-2 { background-color: rgba(122, 207, 214, 0.15); }
.feature-icon-3 { background-color: rgba(122, 207, 214, 0.15); }

/* Footer */
.main-footer {
    padding: 2.5rem 0;
    background-color: #2d3748;
    color: #adb5bd;
    text-align: center;
}

.main-footer .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .page-content-wrapper {
        margin: 1rem;
    }

    .hero-section {
        padding: 3rem 1.5rem;
    }

    .hero-logo {
        width: 200px;
        top: 3rem;
        left: 3rem;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .trust-section {
        padding: 3rem 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* === LEGAL PAGES STYLES === */

.legal-page {
    max-width: 900px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--surface-shadow);
    margin: 2rem auto;
    padding: 2.5rem;
    line-height: 1.7;
}

.legal-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(177, 26, 33, 0.1);
}

.legal-header .logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 1rem;
}

.legal-header h1 {
    font-size: 2rem;
    color: var(--accent);
    margin: 0.5rem 0;
    font-weight: 800;
}

.legal-content {
    color: #0f1724;
}

.legal-content section {
    margin-bottom: 2.5rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    color: var(--accent);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.legal-content h3 {
    font-size: 1.2rem;
    color: #0f1724;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.legal-content p {
    margin-bottom: 1rem;
    color: #374151;
}

.legal-content ul,
.legal-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    color: #374151;
}

.legal-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.legal-content a {
    color: var(--accent);
    text-decoration: underline;
    transition: color 120ms ease;
}

.legal-content a:hover {
    color: var(--accent-2);
}

.legal-content strong {
    color: #0f1724;
    font-weight: 600;
}

.legal-content em {
    color: var(--muted);
    font-style: italic;
}

/* Legal Tables */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.legal-table thead {
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    color: #fff;
}

.legal-table thead th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
}

.legal-table tbody tr {
    border-bottom: 1px solid rgba(43, 108, 176, 0.06);
}

.legal-table tbody tr:nth-child(even) {
    background-color: var(--bg);
}

.legal-table tbody tr:hover {
    background-color: rgba(122, 207, 214, 0.05);
}

.legal-table tbody td {
    padding: 0.9rem 1rem;
    color: #374151;
}

/* Legal Footer Links */
.legal-footer-links {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(43, 108, 176, 0.06);
    text-align: center;
}

.legal-footer-links p {
    margin: 0;
    font-size: 0.95rem;
}

.legal-footer-links a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 120ms ease;
}

.legal-footer-links a:hover {
    color: var(--accent-2);
    text-decoration: underline;
}

/* Legal Acknowledgment */
.legal-acknowledgment {
    background: linear-gradient(180deg, #fff4f4, #ffe9e9);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: center;
}

.legal-acknowledgment p {
    margin: 0.5rem 0;
    color: #0f1724;
}

/* Responsive Legal Pages */
@media (max-width: 768px) {
    .legal-page {
        margin: 1rem;
        padding: 1.5rem;
    }

    .legal-header h1 {
        font-size: 1.5rem;
    }

    .legal-content h2 {
        font-size: 1.3rem;
    }

    .legal-content h3 {
        font-size: 1.1rem;
    }

    .legal-table {
        font-size: 0.85rem;
    }

    .legal-table thead th,
    .legal-table tbody td {
        padding: 0.6rem 0.5rem;
    }
}

/* === SITE HEADER NAVIGATION === */

.site-header {
    background-color: transparent;
    box-shadow: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo img {
    height: 50px;
    width: auto;
    transition: transform 120ms ease;
}

.site-logo:hover img {
    transform: scale(1.05);
}

/* Desktop Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.5rem 0;
    transition: color 120ms ease, text-shadow 120ms ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.nav-link:hover {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.4);
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 180ms ease;
}

/* Dropdown Menu */
.has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
   position: absolute;
    top: 100%;
    right: 0;        /* ← Ezt hagyd! */
    background: var(--card);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-sm);
    min-width: 240px;
    list-style: none;
    margin: 0.5rem 0 0 0;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background-color 120ms ease, color 120ms ease;
}

.dropdown-menu a:hover {
    background-color: rgba(177, 26, 33, 0.05);
    color: var(--accent);
}

/* Hamburger Button (hidden on desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 18px;
    height: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: transform 180ms ease, opacity 180ms ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* === MOBILE NAVIGATION (Responsive) === */
@media (max-width: 768px) {
    .header-container {
        padding: 1rem 1.5rem;
    }

    .site-logo img {
        height: 45px;
    }

    /* Show hamburger button */
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    /* Hide desktop navigation by default */
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--card);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transform: translateX(100%);
        transition: transform 280ms ease;
        padding-top: 100px;
        overflow-y: auto;
        display: flex;                    
        flex-direction: column;          
        justify-content: flex-start;      
        align-items: stretch;             
    }

    .main-nav.active {
        transform: translateX(0);
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        justify-content: flex-start;
    }

    .nav-item {
        border-bottom: 1px solid rgba(43, 108, 176, 0.06);
    }

    .nav-link {
        color: #374151;
        padding: 1rem 1.5rem;
        font-size: 1.05rem;
        text-shadow: none;
    }

    .nav-link:hover,
    .nav-link:focus {
        color: var(--accent) !important;
        background-color: rgba(177, 26, 33, 0.05);
        text-shadow: none !important;
    }

    /* Mobile Dropdown (Accordion style) */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(177, 26, 33, 0.02);
        max-height: 0;
        overflow: hidden;
        transition: max-height 280ms ease, padding 280ms ease;
        padding: 0;
    }

    .has-dropdown.active .dropdown-menu {
        max-height: 300px;
        padding: 0.5rem 0;
    }

    .has-dropdown.active .dropdown-arrow {
        transform: rotate(180deg);
    }

    .dropdown-menu a {
        padding: 0.75rem 1.5rem 0.75rem 2.5rem;
        font-size: 0.95rem;
    }

    /* Mobile overlay when menu is open */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        animation: fadeIn 280ms ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

/* === COMPACT HEADER (for test and result pages) === */

.compact-header {
    background: linear-gradient(135deg, var(--accent), var(--success));
    height: 70px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.compact-header .header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.compact-header .site-logo img {
    height: 40px;
    width: auto;
    transition: transform 120ms ease;
}

.compact-header .site-logo:hover img {
    transform: scale(1.05);
}

/* Compact header navigation */
.compact-header .main-nav {
    display: flex;
    align-items: center;
}

.compact-header .nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    align-items: center;
}

.compact-header .nav-item {
    position: relative;
}

.compact-header .nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    transition: color 120ms ease, text-shadow 120ms ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.compact-header .nav-link:hover {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.4);
}

.compact-header .dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 180ms ease;
}

/* Compact header dropdown */
.compact-header .has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.compact-header .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-sm);
    min-width: 240px;
    list-style: none;
    margin: 0.5rem 0 0 0;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
}

.compact-header .has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.compact-header .dropdown-menu li {
    margin: 0;
}

.compact-header .dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background-color 120ms ease, color 120ms ease;
}

.compact-header .dropdown-menu a:hover {
    background-color: rgba(177, 26, 33, 0.05);
    color: var(--accent);
}

/* Compact header hamburger */
.compact-header .hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.compact-header .hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: transform 180ms ease, opacity 180ms ease;
}

.compact-header .hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.compact-header .hamburger.active span:nth-child(2) {
    opacity: 0;
}

.compact-header .hamburger.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* Body padding adjustment for pages with compact header */
body.page-with-compact-header {
    padding-top: 0;
    display: block;
    align-items: unset;
    justify-content: unset;
}

body.page-with-compact-header .test-container,
body.page-with-compact-header .result-container {
    margin-top: calc(70px + 2rem);
}

/* === COMPACT HEADER MOBILE RESPONSIVE === */
@media (max-width: 768px) {
    .compact-header {
        height: 60px;
    }

    .compact-header .header-container {
        padding: 0 1.5rem;
    }

    .compact-header .site-logo img {
        height: 32px;
    }

    /* Show hamburger button */
    .compact-header .hamburger {
        display: flex;
        z-index: 1001;
    }

    /* Mobile navigation panel */
    .compact-header .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--card);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transform: translateX(100%);
        transition: transform 280ms ease;
        padding-top: 80px;
        overflow-y: auto;
    }

    .compact-header .main-nav.active {
        transform: translateX(0);
    }

    .compact-header .nav-menu {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        justify-content: flex-start;
    }

    .compact-header .nav-item {
        border-bottom: 1px solid rgba(43, 108, 176, 0.06);
    }

    .compact-header .nav-link {
        color: #374151;
        padding: 1rem 1.5rem;
        font-size: 1.05rem;
        text-shadow: none;
    }

    .compact-header .nav-link:hover,
    .compact-header .nav-link:focus {
        color: var(--accent) !important;
        background-color: rgba(177, 26, 33, 0.05);
        text-shadow: none !important;
    }

    /* Mobile Dropdown */
    .compact-header .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(177, 26, 33, 0.02);
        max-height: 0;
        overflow: hidden;
        transition: max-height 280ms ease, padding 280ms ease;
        padding: 0;
    }

    .compact-header .has-dropdown.active .dropdown-menu {
        max-height: 300px;
        padding: 0.5rem 0;
    }

    .compact-header .has-dropdown.active .dropdown-arrow {
        transform: rotate(180deg);
    }

    .compact-header .dropdown-menu a {
        padding: 0.75rem 1.5rem 0.75rem 2.5rem;
        font-size: 0.95rem;
    }

    body.page-with-compact-header {
        padding-top: 0;
        display: block;
        align-items: unset;
    }

    body.page-with-compact-header .test-container,
    body.page-with-compact-header .result-container {
        margin-top: calc(60px + 1rem);
    }
}
