:root {
    --primary-gold: #C9A84C;
    --primary-gold-light: #E5D190;
    --primary-gold-dark: #A38428;
    --navy-dark: #0A0F1C;
    --navy: #101829;
    --navy-light: #1A2540;
    --navy-lighter: #243054;
    --burgundy: #6B1D2A;
    --burgundy-light: #8B2E3C;
    --text-light: #E8E2D0;
    --text-muted: #9AA0B4;
    --text-white: #FAFAF5;
    --border-gold: rgba(201, 168, 76, 0.3);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --shadow-gold: 0 0 30px rgba(201, 168, 76, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --gradient-gold: linear-gradient(135deg, #C9A84C, #E5D190, #C9A84C);
    --gradient-dark: linear-gradient(180deg, #0A0F1C, #101829);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Tajawal', sans-serif;
    --font-serif: 'Amiri', serif;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-main);
    background-color: var(--navy-dark);
    color: var(--text-light);
    line-height: 1.8;
    overflow-x: hidden;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.top-bar {
    background: linear-gradient(90deg, #060A14, #0A0F1C, #060A14);
    border-bottom: 1px solid var(--border-gold);
    padding: 8px 0;
    font-size: 12px;
    color: var(--text-muted);
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-ticker {
    background: linear-gradient(90deg, #0D0A00, #1A1200, #0D0A00);
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 38px;
}

.ticker-label {
    background: var(--burgundy);
    color: var(--text-white);
    padding: 0 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    height: 100%;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
    animation: labelPulse 2s ease-in-out infinite;
}

@keyframes labelPulse {
    0%, 100% { background: var(--burgundy); }
    50% { background: #8B2E3C; }
}

.ticker-label::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    bottom: 0;
    width: 0;
    height: 0;
    border-top: 19px solid transparent;
    border-bottom: 19px solid transparent;
    border-right: 8px solid var(--burgundy);
}

.ticker-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.ticker-wrap::before,
.ticker-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 1;
    pointer-events: none;
}

.ticker-wrap::before {
    right: 0;
    background: linear-gradient(to left, #0D0A00, transparent);
}

.ticker-wrap::after {
    left: 0;
    background: linear-gradient(to right, #0D0A00, transparent);
}

.ticker-content {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: tickerScroll 120s linear infinite;
    gap: 0;
}

.ticker-content:hover {
    animation-play-state: paused;
}

.ticker-item {
    color: var(--primary-gold-light);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0 12px;
    flex-shrink: 0;
}

.ticker-separator {
    width: 6px;
    height: 6px;
    background: var(--burgundy-light);
    border-radius: 50%;
    flex-shrink: 0;
}

@keyframes tickerScroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.main-header {
    background: linear-gradient(180deg, var(--navy), var(--navy-dark));
    border-bottom: 2px solid var(--primary-gold);
    padding: 24px 0;
    position: relative;
}

.main-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-gold);
    box-shadow: 0 2px 20px rgba(201, 168, 76, 0.4);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.emblem-section .emblem,
.flag-section .flag-img,
.secondary-emblem-section .secondary-emblem {
    height: 100px;
    width: auto;
    filter: drop-shadow(0 4px 12px rgba(201, 168, 76, 0.3));
    transition: var(--transition);
}

.emblem-section .emblem:hover,
.flag-section .flag-img:hover,
.secondary-emblem-section .secondary-emblem:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 20px rgba(201, 168, 76, 0.5));
}

.header-text {
    text-align: center;
}

.kingdom-name {
    font-family: var(--font-serif);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--primary-gold);
    text-shadow: 0 2px 10px rgba(201, 168, 76, 0.3);
    letter-spacing: 2px;
}

.kingdom-subtitle {
    font-size: 0.95rem;
    color: var(--primary-gold-light);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 4px;
    font-weight: 300;
}

.header-divider {
    width: 80px;
    height: 1px;
    background: var(--gradient-gold);
    margin: 10px auto;
}

.kingdom-motto {
    font-family: var(--font-serif);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.main-nav {
    background: var(--navy);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.main-nav.scrolled {
    background: rgba(10, 15, 28, 0.96);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    border-bottom-color: var(--border-gold);
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0;
}

.nav-link {
    display: block;
    padding: 16px 20px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    letter-spacing: 0.5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gold);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-gold);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary-gold);
    transition: var(--transition);
}

.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, var(--navy-light) 0%, var(--navy-dark) 70%);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(201, 168, 76, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(107, 29, 42, 0.05) 0%, transparent 50%);
}

.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 60px 0;
}

.hero-emblem-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 32px;
}

.hero-emblem {
    width: 160px;
    height: 160px;
    object-fit: contain;
    filter: drop-shadow(0 0 40px rgba(201, 168, 76, 0.3));
    animation: floatEmblem 4s ease-in-out infinite;
}

.emblem-glow {
    position: absolute;
    inset: -30px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.1) 0%, transparent 70%);
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes floatEmblem {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--primary-gold);
    margin-bottom: 16px;
    text-shadow: 0 4px 20px rgba(201, 168, 76, 0.2);
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 2;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-gold);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
    display: block;
}

.hero-btn {
    display: inline-block;
    padding: 14px 48px;
    background: transparent;
    border: 2px solid var(--primary-gold);
    color: var(--primary-gold);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.hero-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-gold);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
    z-index: -1;
}

.hero-btn:hover {
    color: var(--navy-dark);
}

.hero-btn:hover::before {
    transform: scaleX(1);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-number {
    display: inline-block;
    background: var(--primary-gold);
    color: var(--navy-dark);
    padding: 4px 24px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: var(--primary-gold);
    margin-bottom: 8px;
}

.section-code {
    font-size: 0.9rem;
    color: var(--primary-gold-light);
    letter-spacing: 3px;
    font-weight: 300;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.title-ornament {
    width: 60px;
    height: 2px;
    background: var(--gradient-gold);
    margin: 16px auto 0;
    position: relative;
}

.title-ornament::before,
.title-ornament::after {
    content: '';
    position: absolute;
    top: -3px;
    width: 8px;
    height: 8px;
    background: var(--primary-gold);
    transform: rotate(45deg);
}

.title-ornament::before { right: -12px; }
.title-ornament::after { left: -12px; }

.section-emblem-small {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin: 0 auto 12px;
    opacity: 0.7;
}

.cabinet-emblem-img {
    width: 130px;
    height: 130px;
    object-fit: contain;
    margin: 0 auto 12px;
    filter: drop-shadow(0 4px 12px rgba(201, 168, 76, 0.3));
}

.law-section {
    padding: 80px 0;
    position: relative;
}

.law-section.alt-bg {
    background: linear-gradient(180deg, var(--navy-light) 0%, var(--navy) 100%);
}

.law-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.royal-speech-section {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
    position: relative;
}

.royal-speech-card {
    background: linear-gradient(145deg, rgba(26, 37, 64, 0.6), rgba(10, 15, 28, 0.9));
    border: 1px solid var(--border-gold);
    padding: 0;
    position: relative;
    overflow: hidden;
}

.royal-speech-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 5px;
    background: var(--gradient-gold);
}

.royal-speech-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 5px;
    background: var(--gradient-gold);
}

.royal-speech-header {
    text-align: center;
    padding: 48px 48px 24px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

.royal-crown-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
}

.royal-crown-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.royal-crown-icon svg {
    width: 100%;
    height: 100%;
}

.royal-speech-label {
    display: inline-block;
    background: rgba(201, 168, 76, 0.12);
    border: 1px solid rgba(201, 168, 76, 0.25);
    color: var(--primary-gold);
    padding: 4px 28px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.royal-speech-title {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--primary-gold-light);
    font-weight: 700;
}

.royal-speech-ornament {
    width: 80px;
    height: 1px;
    background: var(--gradient-gold);
    margin: 20px auto 0;
}

.royal-speech-body {
    padding: 40px 60px;
}

.royal-speech-body .royal-greeting {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--primary-gold);
    margin-bottom: 20px;
    font-weight: 700;
}

.royal-speech-body p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 2.2;
    margin-bottom: 16px;
    text-align: justify;
}

.royal-speech-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 24px 60px 40px;
    border-top: 1px solid rgba(201, 168, 76, 0.1);
}

.royal-signature {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.signature-line {
    width: 150px;
    height: 1px;
    background: var(--primary-gold);
    margin-bottom: 8px;
}

.signature-text {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    color: var(--primary-gold);
    font-weight: 700;
}

.signature-title {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.royal-stamp .stamp-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    opacity: 0.35;
    filter: sepia(0.4) saturate(1.2) brightness(0.7);
}

.cabinet-section {
    padding: 80px 0;
    background: radial-gradient(ellipse at center, var(--navy-light) 0%, var(--navy-dark) 70%);
}

.cabinet-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.cabinet-card {
    background: linear-gradient(145deg, var(--navy-light), var(--navy));
    border: 1px solid var(--border-subtle);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.cabinet-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-gold);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cabinet-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-gold);
}

.cabinet-card:hover::after {
    opacity: 1;
}

.cabinet-card-icon {
    width: 56px;
    height: 56px;
    color: var(--primary-gold);
    margin: 0 auto 20px;
}

.cabinet-card-icon svg {
    width: 100%;
    height: 100%;
}

.cabinet-card h3 {
    font-size: 1rem;
    color: var(--text-white);
    margin-bottom: 10px;
    font-weight: 600;
}

.cabinet-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.charter-section {
    padding: 80px 0;
    background: var(--navy);
}

.charter-intro-card {
    background: linear-gradient(135deg, var(--navy-light), var(--navy));
    border: 1px solid var(--border-gold);
    padding: 48px;
    display: flex;
    align-items: center;
    gap: 40px;
    position: relative;
    overflow: hidden;
}

.charter-intro-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-gold);
}

.charter-seal {
    flex-shrink: 0;
}

.seal-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    opacity: 0.6;
    filter: sepia(0.3) saturate(1.5) brightness(0.8);
}

.charter-intro-text p {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    line-height: 2.2;
    color: var(--text-light);
}

.laws-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.law-card {
    background: linear-gradient(145deg, rgba(26, 37, 64, 0.8), rgba(16, 24, 41, 0.9));
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.law-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-gold);
    transition: width 0.4s ease;
}

.law-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-gold);
}

.law-card:hover::before {
    width: 100%;
}

.law-card-header {
    padding: 24px 24px 0;
}

.law-number {
    display: inline-block;
    background: rgba(201, 168, 76, 0.15);
    color: var(--primary-gold);
    padding: 2px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    border: 1px solid rgba(201, 168, 76, 0.2);
}

.law-title {
    font-size: 1.15rem;
    color: var(--text-white);
    margin-top: 12px;
    font-weight: 600;
}

.law-card-body {
    padding: 16px 24px;
}

.law-card-body p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.9;
}

.law-card-footer {
    padding: 12px 24px 20px;
}

.severity {
    font-size: 0.75rem;
    padding: 3px 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.severity.medium {
    background: rgba(255, 170, 0, 0.15);
    color: #FFAA00;
    border: 1px solid rgba(255, 170, 0, 0.3);
}

.severity.high {
    background: rgba(255, 85, 0, 0.15);
    color: #FF5500;
    border: 1px solid rgba(255, 85, 0, 0.3);
}

.severity.critical {
    background: rgba(220, 20, 20, 0.15);
    color: #DC1414;
    border: 1px solid rgba(220, 20, 20, 0.3);
}

.sovereignty-showcase {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-bottom: 50px;
}

.flag-display,
.emblem-display {
    text-align: center;
}

.flag-frame,
.emblem-frame {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-gold);
    padding: 20px;
    background: rgba(201, 168, 76, 0.03);
    position: relative;
    transition: var(--transition);
}

.flag-frame:hover,
.emblem-frame:hover {
    border-color: var(--primary-gold);
    box-shadow: var(--shadow-gold);
}

.flag-frame::before,
.emblem-frame::before {
    content: '';
    position: absolute;
    top: -6px;
    right: -6px;
    left: -6px;
    bottom: -6px;
    border: 1px solid rgba(201, 168, 76, 0.1);
    pointer-events: none;
}

.display-flag,
.display-emblem {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.flag-caption,
.emblem-caption {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.military-banner {
    background: linear-gradient(135deg, var(--burgundy), var(--burgundy-light), var(--burgundy));
    padding: 32px;
    text-align: center;
    margin-bottom: 40px;
    border: 1px solid rgba(201, 168, 76, 0.2);
    position: relative;
    overflow: hidden;
}

.military-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 20px,
        rgba(255, 255, 255, 0.02) 20px,
        rgba(255, 255, 255, 0.02) 40px
    );
}

.military-banner-content {
    position: relative;
    z-index: 1;
}

.military-banner h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--primary-gold);
    margin-bottom: 4px;
}

.military-banner p {
    color: var(--primary-gold-light);
    font-size: 0.9rem;
}

.intel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.intel-card {
    position: relative;
}

.intel-card-badge {
    display: inline-block;
    background: var(--primary-gold);
    color: var(--navy-dark);
    padding: 6px 24px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.intel-card .law-card {
    margin-bottom: 16px;
}

.penalties-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.penalties-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    transform: translateX(50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-gold), var(--burgundy));
}

.penalty-item {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
    position: relative;
    padding-right: 60px;
}

.penalty-item::before {
    content: '';
    position: absolute;
    right: calc(50% - 7px);
    top: 20px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--primary-gold);
    background: var(--navy-dark);
    z-index: 1;
}

.penalty-level {
    flex-shrink: 0;
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid var(--border-gold);
    padding: 8px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-gold);
    min-width: 140px;
    text-align: center;
}

.penalty-content {
    background: linear-gradient(145deg, var(--navy-light), var(--navy));
    border: 1px solid var(--border-subtle);
    padding: 24px;
    flex: 1;
    transition: var(--transition);
}

.penalty-content:hover {
    border-color: var(--border-gold);
}

.penalty-content h3 {
    font-size: 1.1rem;
    color: var(--text-white);
    margin-bottom: 8px;
}

.penalty-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.penalty-severity-bar {
    height: 3px;
    margin-top: 16px;
    border-radius: 2px;
}

.level-low { width: 25%; background: #4CAF50; }
.level-medium { width: 50%; background: #FFAA00; }
.level-high { width: 75%; background: #FF5500; }
.level-critical { width: 100%; background: linear-gradient(90deg, #FF5500, #DC1414); }

.institutions-section {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
}

.institutions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.institution-card {
    background: linear-gradient(145deg, var(--navy-light), var(--navy));
    border: 1px solid var(--border-subtle);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.institution-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-gold);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.institution-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-6px);
    box-shadow: var(--shadow-gold);
}

.institution-card:hover::before {
    opacity: 1;
}

.institution-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: var(--primary-gold);
}

.institution-icon svg {
    width: 100%;
    height: 100%;
}

.institution-card h3 {
    font-size: 1rem;
    color: var(--text-white);
    margin-bottom: 10px;
    font-weight: 600;
}

.institution-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 12px;
}

.institution-code {
    font-size: 0.72rem;
    color: var(--primary-gold-light);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 300;
}

.closing-section {
    padding: 100px 0;
    background: radial-gradient(ellipse at center, var(--navy-light) 0%, var(--navy-dark) 70%);
    position: relative;
}

.closing-content {
    text-align: center;
}

.closing-flag img {
    width: 120px;
    margin: 0 auto 16px;
    opacity: 0.7;
    filter: drop-shadow(0 4px 12px rgba(201, 168, 76, 0.2));
}

.closing-secondary-emblem {
    text-align: center;
    margin-bottom: 24px;
}

.closing-strx-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin: 0 auto;
    opacity: 0.5;
    filter: drop-shadow(0 2px 8px rgba(201, 168, 76, 0.15));
    transition: var(--transition);
}

.closing-strx-img:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.closing-quote {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--primary-gold);
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 2;
    position: relative;
    padding: 0 40px;
}

.closing-quote::before,
.closing-quote::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 1px;
    background: var(--primary-gold);
    top: 50%;
}

.closing-quote::before { right: -20px; }
.closing-quote::after { left: -20px; }

.closing-seal-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 12px;
    opacity: 0.4;
}

.closing-seal p {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.main-footer {
    background: #060A14;
    padding: 60px 0 0;
    border-top: 1px solid var(--border-gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-emblems {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.footer-emblem {
    width: 60px;
    height: 60px;
    object-fit: contain;
    opacity: 0.7;
}

.footer-emblem-secondary {
    width: 45px;
    height: 45px;
    opacity: 0.5;
}

.footer-col h4 {
    color: var(--primary-gold);
    font-size: 0.95rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-col p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.footer-col ul li a:hover {
    color: var(--primary-gold);
    padding-right: 6px;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
}

.footer-divider {
    height: 1px;
    background: var(--border-subtle);
    margin-bottom: 20px;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-eng {
    font-size: 0.72rem;
    color: rgba(154, 160, 180, 0.5);
    margin-top: 4px;
    direction: ltr;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 48px;
    height: 48px;
    background: var(--navy-light);
    border: 1px solid var(--border-gold);
    color: var(--primary-gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-gold);
    color: var(--navy-dark);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

.law-card,
.institution-card,
.penalty-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.law-card.animated,
.institution-card.animated,
.penalty-item.animated {
    opacity: 1;
    transform: translateY(0);
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-gold);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 8s infinite;
}

@keyframes particleFloat {
    0% { opacity: 0; transform: translateY(100vh); }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { opacity: 0; transform: translateY(-100px); }
}

@media (max-width: 1024px) {
    .institutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cabinet-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .intel-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
    }

    .emblem-section .emblem,
    .flag-section .flag-img {
        height: 70px;
    }

    .kingdom-name {
        font-size: 1.6rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-list {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--navy);
        position: absolute;
        top: 100%;
        right: 0;
        border-bottom: 1px solid var(--border-gold);
    }

    .nav-list.open {
        display: flex;
    }

    .nav-link {
        padding: 14px 24px;
        border-bottom: 1px solid var(--border-subtle);
    }

    .main-nav .container {
        position: relative;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        padding: 8px 24px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-emblem {
        width: 100px;
        height: 100px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .sovereignty-showcase {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .flag-frame,
    .emblem-frame {
        width: 160px;
        height: 160px;
    }

    .charter-intro-card {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .institutions-grid {
        grid-template-columns: 1fr;
    }

    .cabinet-grid {
        grid-template-columns: 1fr;
    }

    .royal-speech-body {
        padding: 24px;
    }

    .royal-speech-footer {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 24px;
    }

    .royal-signature {
        align-items: center;
        text-align: center;
    }

    .signature-line {
        margin: 0 auto 8px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-emblem {
        margin: 0 auto 12px;
    }

    .footer-emblems {
        justify-content: center;
    }

    .footer-emblem {
        margin: 0;
    }

    .penalties-timeline::before {
        right: 20px;
    }

    .penalty-item {
        flex-direction: column;
        padding-right: 40px;
    }

    .penalty-item::before {
        right: 13px;
    }

    .closing-quote {
        font-size: 1.2rem;
        padding: 0 20px;
    }

    .closing-quote::before,
    .closing-quote::after {
        display: none;
    }

    .laws-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .kingdom-name {
        font-size: 1.3rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}
