:root {
    --primary-color: #0ea5e9;
    --primary-dark: #0284c7;
    --secondary-color: #0f172a;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #334155;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(at 0% 0%, hsla(200,100%,94%,1) 0, transparent 50%), radial-gradient(at 100% 0%, hsla(210,100%,95%,1) 0, transparent 50%), radial-gradient(at 100% 100%, hsla(220,100%,96%,1) 0, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Header & Navigation */
.main-header {
    background-color: rgba(255, 255, 255, 0.85); /* Premium white frosted glass */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-main);
    position: sticky;
    top: 0;
    z-index: 10000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: linear-gradient(to right, rgba(14, 165, 233, 0.1), rgba(37, 99, 235, 0.3), rgba(14, 165, 233, 0.1));
    transition: background 0.3s ease;
}

.main-header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.main-header.scrolled::after {
    background: linear-gradient(to right, #0ea5e9, #2563eb, #0ea5e9);
}

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

.logo a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.header-logo-wrapper {
    overflow: hidden;
    height: 60px;
    display: flex;
    align-items: center;
    transition: height 0.3s ease;
}

.header-logo-img {
    height: 90px;
    width: auto;
    display: block;
    margin: -15px 0;
    transition: height 0.3s ease, margin 0.3s ease;
}

/* Mobile Backdrop Overlay */
.nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9998;
}

.nav-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.logo-icon {
    display: block;
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 2px 5px rgba(14, 165, 233, 0.25));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover .logo-icon {
    transform: rotate(-8deg) scale(1.1);
}

.logo-text {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--secondary-color) 40%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: var(--transition);
}

.logo-text .highlight {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.logo-text .tld {
    font-size: 0.85rem;
    font-weight: 600;
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    align-self: flex-end;
    margin-bottom: 2px;
    margin-left: 1px;
}

/* Footer Specific High-Contrast Logo Styling */
.logo-text-footer {
    background: linear-gradient(135deg, #f8fafc 40%, #60a5fa 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.logo-text-footer .highlight {
    background: linear-gradient(135deg, #38bdf8 0%, #3b82f6 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.logo-text-footer .tld {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.main-nav a, .dropbtn {
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    border-radius: 30px; /* Modern pill style */
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

/* Hover effect - glowing background */
.main-nav a:hover, .main-nav a.active, .dropbtn:hover, .dropdown:hover .dropbtn {
    background-color: rgba(14, 165, 233, 0.08);
    color: var(--primary-color);
}

.dropdown:hover .chevron-icon {
    transform: rotate(180deg);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    visibility: hidden;
    position: absolute;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    min-width: 380px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08), 0 5px 15px rgba(0,0,0,0.04);
    border-radius: var(--radius-lg);
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.95) translateY(12px); /* Initial scale & offset */
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transform-origin: top center;
}

/* Premium Link Card Item Layout */
.dropdown-link-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    border-bottom: none !important;
    position: relative;
    overflow: hidden;
}

.dropdown-link-item::after {
    display: none !important;
}

/* Vertical Sliding Accent Left Line */
.dropdown-link-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 3.5px;
    height: 0;
    background: linear-gradient(to bottom, #0ea5e9, #2563eb);
    border-radius: 2px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(-50%);
}

.dropdown-link-item:hover::before {
    height: 60%;
}

.dropdown-link-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: rgba(14, 165, 233, 0.06);
    color: var(--primary-color);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.dropdown-link-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: transform 0.25s ease;
}

.dropdown-link-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--secondary-color);
    transition: color 0.2s ease;
}

.dropdown-link-desc {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.3;
    margin-top: 2px;
}

/* Hover States & Accent Details */
.dropdown-link-item:hover {
    background-color: rgba(14, 165, 233, 0.05);
    padding-left: 1.25rem;
}

.dropdown-link-item:hover .dropdown-link-icon {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.08) rotate(-4deg);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.dropdown-link-item:hover .dropdown-link-title {
    color: var(--primary-color);
}

.dropdown:hover .dropdown-content {
    visibility: visible;
    transform: translateX(-50%) scale(1) translateY(0); /* Target scale & offset */
    opacity: 1;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 48px;
    height: 48px;
    position: relative;
}

.hamburger, .hamburger::before, .hamburger::after {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    background-color: var(--secondary-color);
    position: absolute;
    transition: var(--transition);
}

.hamburger { 
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%); 
}
.hamburger::before { top: -8px; left: 0; transform: var(--before-transform, none); }
.hamburger::after { bottom: -8px; left: 0; transform: var(--after-transform, none); }

/* Layout Container */
.app-container {
    display: flex;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    gap: 2rem;
}

/* Mobile Sidebar Toggle Button & Header */
.mobile-sidebar-toggle-btn {
    display: none;
    width: 100%;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.mobile-sidebar-toggle-btn:active {
    transform: scale(0.98);
}

.sidebar-mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.08);
    font-weight: 700;
    color: var(--secondary-color);
}

.sidebar-close-btn {
    background: #f1f5f9;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sidebar Navigation */
.sidebar {
    width: 300px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.75); /* Premium glassmorphism */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    height: calc(100vh - 120px);
    position: sticky;
    top: 100px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

/* Scrollbar styles */
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.sidebar-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-align: center;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.05);
}

.sidebar-nav ul { list-style: none; }

.nav-item { margin-bottom: 0.5rem; }

.nav-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0.6rem 0.8rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid transparent;
}

.nav-btn-content {
    display: flex;
    flex-direction: column;
}

.nav-chevron {
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    color: var(--text-light);
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.nav-item.active .nav-chevron {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.nav-btn .desc {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-light);
    margin-top: 0.2rem;
    transition: color 0.25s ease;
}

.nav-btn:hover, .nav-item.active > .nav-btn {
    background-color: rgba(14, 165, 233, 0.05);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    padding-left: 1.2rem;
}

.nav-btn:hover .desc, .nav-item.active > .nav-btn .desc {
    color: rgba(14, 165, 233, 0.8);
}

.sub-nav {
    display: none;
    padding-left: 0.75rem;
    margin-top: 0.5rem;
    border-left: 1.5px solid rgba(14, 165, 233, 0.15);
    margin-left: 0.8rem;
}

.sub-nav li { margin-bottom: 0.25rem; }

.sub-nav a {
    display: block;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text-light);
    border-radius: var(--radius-md);
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    border-left: 2px solid transparent;
}

.sub-nav a:hover, .sub-nav a.active {
    color: var(--primary-color);
    background-color: rgba(14, 165, 233, 0.04);
    border-left-color: var(--primary-color);
    padding-left: 1rem;
}

.nav-item.active .sub-nav {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    min-width: 0;
}

.content-section {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.title {
    font-size: 2.5rem;
    color: var(--secondary-color);
    font-weight: 800;
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 0.15em solid var(--primary-color);
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.1em;
    animation: typing 2.5s steps(30, end), blink-caret 0.75s step-end infinite;
    display: inline-block;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-color) }
}

.welcome-card {
    background: linear-gradient(to right bottom, #f0f9ff, #e0f2fe);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
    border-left: 4px solid var(--primary-color);
}

.welcome-card p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.welcome-card p:last-child { margin-bottom: 0; }

/* Quick Access Grid */
.quick-access-section h2, .toc-section h2 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.qa-card {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.qa-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.qa-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.qa-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.qa-links a {
    background: white;
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-weight: 500;
}

.qa-links a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Table of Contents */
.toc-list {
    list-style: none;
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.toc-chapter {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.toc-chapter:first-child { margin-top: 0; }

.toc-list li:not(.toc-chapter) {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.toc-list li:not(.toc-chapter)::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.toc-view-all {
    margin-top: 1.5rem !important;
    text-align: right;
    font-weight: 600;
}

.toc-view-all::before { display: none !important; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.report-error-container {
    margin-top: 3rem;
    text-align: center;
}

/* Footer */
.main-footer {
    background-color: #0f172a; /* Slate 900 */
    color: #cbd5e1;
    padding: 4rem 0 0;
    margin-top: 5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    gap: 3rem;
    padding: 0 2rem 4rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-col h3 {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.footer-brand-desc {
    color: #94a3b8;
    line-height: 1.6;
    margin-top: 1rem;
    font-size: 0.9rem;
    max-width: 360px;
}

.footer-col-brand .social-icons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.footer-col-brand .social-icons a {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.25s ease;
    text-decoration: none;
}

.footer-col-brand .social-icons a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: #0ea5e9;
    padding-left: 4px;
}

/* Footer Bottom Section */
.footer-bottom {
    background-color: #0b0f19;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-bottom-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom-left {
    text-align: left;
}

.footer-bottom-left p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
}

.footer-legal-links {
    display: flex;
    gap: 1.5rem;
}

.footer-legal-links a {
    color: #64748b;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-legal-links a:hover {
    color: white;
}

/* Scroll To Top */
#scrollToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 99;
}

#scrollToTopBtn.show {
    opacity: 1;
    visibility: visible;
}

#scrollToTopBtn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        margin-bottom: 2rem;
    }
}



/* ==========================================================================
   Legal Interpretation & Section Specific Styles
   ========================================================================== */

/* Main Containers */
/* Main Containers */
.legal-text-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-left: 5px solid var(--secondary-color) !important; /* Authority slate border */
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.02), 0 2px 4px -2px rgba(15, 23, 42, 0.02);
    margin-bottom: 2.5rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.legal-text-box::before {
    content: 'OFFICIAL DPDPA STATUTE';
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    background: rgba(148, 163, 184, 0.15);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 0.75px;
}

.legal-text-box:hover {
    transform: translateY(-3px);
    border-color: rgba(15, 23, 42, 0.15);
    box-shadow: 0 12px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 16px -6px rgba(15, 23, 42, 0.04);
}

.legal-text-box h3 {
    color: var(--secondary-color) !important;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(15, 23, 42, 0.04);
    padding-bottom: 0.75rem;
    width: fit-content;
}

.interpretation-box {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-left: 5px solid var(--primary-color); /* Sky blue commentary border */
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.02), 0 2px 4px -2px rgba(14, 165, 233, 0.02);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    color: var(--text-main);
    font-size: 1.05rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.interpretation-box::before {
    content: 'LEGAL EXPLANATION & GUIDANCE';
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(14, 165, 233, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 0.75px;
}

.interpretation-box:hover {
    transform: translateY(-3px);
    border-color: rgba(14, 165, 233, 0.25);
    box-shadow: 0 12px 25px -5px rgba(14, 165, 233, 0.08), 0 8px 16px -6px rgba(14, 165, 233, 0.04);
}

.interpretation-box h1, .interpretation-box h2, .interpretation-box h3, .interpretation-box h4 {
    color: #0f172a;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.interpretation-box p {
    margin-bottom: 1.2rem;
}

.interpretation-box ul, .interpretation-box ol {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}

.interpretation-box li {
    margin-bottom: 0.5rem;
}

/* Info Boxes */
.info-box {
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: var(--radius-md);
    background: #f8fafc;
    border-left: 4px solid #cbd5e1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.info-box-blue {
    background: #f0f9ff;
    border-left-color: #0ea5e9;
}

.info-box-green {
    background: #f0fdf4;
    border-left-color: #22c55e;
}

.info-box-red {
    background: #fef2f2;
    border-left-color: #ef4444;
}

/* Statutory Callouts */
.statutory-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 1.5rem 2rem;
    border-radius: var(--radius-md);
    font-family: Georgia, serif;
    font-style: italic;
    color: #334155;
    margin: 2rem 0;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

/* Quotes */
.quote-block {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: #fafaf9;
    border-left: 4px solid #d6d3d1;
    font-style: italic;
    color: #57534e;
    font-family: Georgia, serif;
    font-size: 1.1rem;
}

/* Responsive Tables */
.responsive-table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.responsive-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.responsive-table th, .responsive-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

.responsive-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #0f172a;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.responsive-table tr:last-child td {
    border-bottom: none;
}

.responsive-table tr:hover td {
    background: #f8fafc;
}

/* Table of Contents Box */
.toc-box {
    background: #f8fafc;
    padding: 1.5rem 2rem;
    border-radius: var(--radius-md);
    margin: 2rem 0;
    border: 1px solid #e2e8f0;
    display: inline-block;
    min-width: 300px;
}

.toc-box h3, .toc-box h4 {
    margin-top: 0;
    color: #0f172a;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.toc-box ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.toc-box li {
    margin-bottom: 0.5rem;
    padding-left: 1.25rem;
    position: relative;
}

.toc-box li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.toc-box a {
    color: #334155;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.toc-box a:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   Premium UI & Micro-Interactions (Refactored from Inline Styles)
   ========================================================================== */

/* Premium Gradient Button */
.btn-gradient {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 50%, #0ea5e9 100%) !important;
    background-size: 200% auto !important;
    color: white !important;
    padding: 0.55rem 1.35rem !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 10px rgba(14,165,233,0.25);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border: none;
    display: inline-block;
    text-align: center;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14,165,233,0.35);
    background-position: right center !important;
    color: white !important;
}

.main-nav a.btn-gradient::after {
    display: none !important;
}

/* Massive CTA Banner */
.premium-cta-banner {
    margin: 2.5rem 0;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
    color: white;
    text-align: center;
    box-shadow: 0 15px 35px rgba(14,165,233,0.25);
    position: relative;
    overflow: hidden;
}

.premium-cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    transform: rotate(30deg);
    pointer-events: none;
}

.premium-cta-banner h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: white;
    position: relative;
    z-index: 1;
}

.premium-cta-banner p {
    font-size: 1.15rem;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.premium-cta-banner .btn-white {
    display: inline-block;
    background: white;
    color: #0ea5e9;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.premium-cta-banner .btn-white:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
    color: #0284c7;
}

/* Industry Grid Cards */
.industry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.industry-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.industry-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.industry-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: transparent;
}

.industry-card:hover::after {
    transform: scaleX(1);
}

.industry-card .icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.industry-card h3 {
    color: var(--secondary-color);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.35rem;
    font-weight: 700;
}

.industry-card ul {
    color: var(--text-light);
    padding-left: 1.2rem;
    line-height: 1.7;
    font-size: 0.95rem;
}

.industry-card li {
    margin-bottom: 0.75rem;
}

/* Tool Forms */
.tool-container {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-top: 2rem;
}

.tool-header {
    color: var(--primary-color);
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.tool-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #f8fafc;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14,165,233,0.2);
    background: white;
}

.form-radio-group {
    background: #f8fafc;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.form-radio-group:hover {
    border-color: #cbd5e1;
}

.form-radio-group p {
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
}

.form-radio-label {
    margin-right: 1.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-result {
    display: none;
    margin-top: 2.5rem;
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    animation: fadeIn 0.5s ease;
}

.tool-result h4 {
    margin-top: 0;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.tool-result-pass {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.tool-result-fail {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* ==========================================================================
   Quiz SPA Components
   ========================================================================== */

.quiz-spa-container {
    max-width: 800px;
    margin: 0 auto;
    min-height: 500px;
}

.diff-btn {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.diff-btn:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.diff-btn.active {
    border-color: var(--primary-color);
    background: #f0f9ff;
    color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14,165,233,0.2);
}

.quiz-option-btn {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    padding: 1rem 1.5rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.quiz-option-btn:hover:not([disabled]) {
    border-color: var(--primary-color);
    background: #f8fafc;
}

.quiz-option-btn .opt-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #f1f5f9;
    border-radius: 50%;
    margin-right: 1rem;
    font-weight: 700;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.quiz-option-btn.correct {
    background: #f0fdf4 !important;
    border-color: #22c55e !important;
    color: #166534 !important;
}

.quiz-option-btn.correct .opt-letter {
    background: #22c55e;
    color: white;
}

.quiz-option-btn.incorrect {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #991b1b !important;
}

.quiz-option-btn.incorrect .opt-letter {
    background: #ef4444;
    color: white;
}

/* ==========================================================================
   Remaining Pages UI Components (Accordions, Grids, Resource Cards)
   ========================================================================== */

/* Accordion (FAQs) */
.accordion-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    text-align: left;
    padding: 1.5rem;
    background: transparent;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
    transition: background-color 0.3s;
}

.accordion-header:hover {
    background-color: #f8fafc;
}

.accordion-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: #fafaf9;
}

.accordion-body {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-main);
    line-height: 1.7;
}

/* Blog & Case Law Layouts (List/Grid) */
.list-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.list-item {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.list-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.list-item h3 {
    margin-top: 0;
    color: var(--secondary-color);
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.list-item .meta {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.list-item p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Resource Cards (Templates, Posters) */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.resource-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.resource-thumbnail {
    height: 160px;
    background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
}

.resource-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.resource-content h3 {
    margin-top: 0;
    color: var(--secondary-color);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.resource-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.resource-content .btn-primary {
    width: 100%;
    text-align: center;
}

/* Course Landing Elements */
.course-hero {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f0f9ff 100%);
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.course-hero h2 {
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.course-hero p {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.course-module {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.course-module:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.course-module h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    border-bottom: 1.5px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* ==========================================================================
   Advanced Quiz UI Theme & Animations
   ========================================================================== */

.quiz-spa-container {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.05);
    border-radius: var(--radius-lg);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.quiz-screen {
    animation: fadeInSlideUp 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes fadeInSlideUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.diff-btn {
    background: white;
    border: 2px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.diff-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px -5px rgba(15, 23, 42, 0.08);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.diff-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 20px -5px rgba(14, 165, 233, 0.4);
}

.option-btn {
    background: white;
    border: 2px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    text-align: left;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0; /* for staggered animation */
    animation: fadeInRight 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.option-btn:nth-child(1) { animation-delay: 0.1s; }
.option-btn:nth-child(2) { animation-delay: 0.2s; }
.option-btn:nth-child(3) { animation-delay: 0.3s; }
.option-btn:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInRight {
    0% { opacity: 0; transform: translateX(-20px); }
    100% { opacity: 1; transform: translateX(0); }
}

.option-btn:hover {
    border-color: var(--primary-color);
    background: rgba(14, 165, 233, 0.02);
    transform: translateX(5px);
}

.option-btn.selected {
    border-color: var(--primary-color);
    background: rgba(14, 165, 233, 0.05);
}

.option-btn.correct {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #166534;
}

.option-btn.incorrect {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

.option-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 0.9rem;
    background: white;
}

.option-btn:hover .option-icon {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.option-btn.selected .option-icon {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.option-btn.correct .option-icon {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.option-btn.incorrect .option-icon {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.quiz-progress-bar {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
}

#questionContainer {
    background: white !important;
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.03);
    border-left: 5px solid var(--primary-color) !important;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(14, 165, 233, 0); }
    100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

.btn-pulse {
    animation: pulse-glow 2s infinite;
}

/* ==========================================================================
   Responsive Design & Mobile Layout
   ========================================================================== */

@media (max-width: 992px) {
    /* Relativize header container to properly position absolute mobile menu */
    .header-container {
        position: relative;
        padding: 0.6rem 1.25rem;
    }

    .header-logo-wrapper {
        height: 52px;
    }

    .header-logo-img {
        height: 78px;
        margin: -13px 0;
    }

    /* Make Hamburger Menu Visible */
    .mobile-menu-toggle {
        display: block;
        z-index: 10001;
    }
    
    /* Convert Main Nav to Vertical Mobile Menu */
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.5rem;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid var(--border-color);
        gap: 0;
        
        /* Hidden by default on mobile */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10000;
    }
    
    .main-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .main-nav a, .main-nav .dropdown {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .main-nav a {
        display: block;
        padding: 0.85rem 1rem !important;
        font-size: 1rem;
        border-radius: 0 !important;
    }
    
    .main-nav a.btn-gradient {
        margin-top: 0.75rem;
        margin-bottom: 0.5rem;
        border-bottom: none;
        text-align: center;
        border-radius: 50px !important;
    }
    
    .dropdown .dropbtn {
        width: 100%;
        text-align: left;
        padding: 0.85rem 1rem !important;
        font-size: 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .dropdown .dropbtn::after {
        content: '▼';
        font-size: 0.7rem;
        opacity: 0.7;
        transition: transform 0.3s ease;
    }
    
    .dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        background: rgba(14, 165, 233, 0.03);
        min-width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        padding: 0;
        border-radius: 0;
    }
    
    .dropdown-content a {
        border-bottom: none;
    }
    
    .dropdown-link-item {
        padding: 0.65rem 1rem !important;
        gap: 0.75rem;
        background: transparent !important;
    }
    
    .dropdown-link-icon {
        width: 32px;
        height: 32px;
        border-radius: 6px;
    }
    
    .dropdown-link-title {
        font-size: 0.9rem;
    }
    
    .dropdown-link-desc {
        font-size: 0.7rem;
    }
    
    .dropdown-link-item:hover {
        padding-left: 1.25rem !important;
    }
    
    /* Show dropdown on hover/active on mobile */
    .dropdown:hover .dropdown-content {
        display: block;
    }
    
    .dropdown:hover .dropbtn::after {
        transform: rotate(180deg);
    }
    
    /* Adjust Main Layout & Spacing */
    .app-container {
        flex-direction: column;
        padding: 0 1rem;
        gap: 1.5rem;
    }
    
    /* Order elements so content comes first, sidebar at bottom on mobile */
    .main-content {
        order: 1;
        width: 100%;
    }
    
    .mobile-sidebar-toggle-btn {
        display: flex;
    }

    .sidebar-mobile-header {
        display: flex;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        max-height: 100vh;
        background: #ffffff;
        z-index: 10005;
        border-radius: 0;
        margin: 0;
        padding: 1.25rem 1.5rem 2rem 1.5rem;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.25);
        transform: translateX(-105%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .footer-container {
        grid-template-columns: 1.2fr 1fr;
        gap: 2.5rem;
    }
}

/* Extra small mobile viewports spacing and readability optimization */
@media (max-width: 576px) {
    .header-logo-wrapper {
        height: 44px;
    }

    .header-logo-img {
        height: 66px;
        margin: -11px 0;
    }

    .content-section, .tool-container, .legal-text-box, .interpretation-box {
        padding: 1.5rem !important;
    }
    
    /* Mobile positioning overrides for card badges to prevent text overlap */
    .legal-text-box::before, .interpretation-box::before {
        position: static !important;
        display: inline-block !important;
        margin-bottom: 1.25rem !important;
    }
    
    .page-header {
        margin-bottom: 1.5rem !important;
        padding-bottom: 1rem !important;
    }
    .title {
        font-size: 1.8rem !important;
    }
    .subtitle {
        font-size: 0.95rem !important;
    }
    
    /* Footer mobile overrides */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-bottom: 2.5rem;
    }
    .footer-bottom-container {
        flex-direction: column;
        text-align: center;
    }
    .footer-bottom-left {
        text-align: center;
    }
    .footer-legal-links {
        justify-content: center;
        margin-top: 0.75rem;
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* Keyframes for SVG Spinners */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Phase 3: Responsive Quiz Engine & Certificate Flow
   ========================================================================== */
.quiz-spa-container {
    width: 100%;
}

.diff-btn {
    min-height: 48px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    touch-action: manipulation;
}

.option-btn {
    min-height: 48px;
    padding: 0.85rem 1.1rem;
    font-size: 0.95rem;
    line-height: 1.45;
    text-align: left;
    display: flex;
    align-items: center;
    border-radius: var(--radius-md);
    touch-action: manipulation;
}

/* iOS form zoom prevention & mobile inputs */
.form-input, input[type="text"], input[type="email"], select, textarea {
    font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
}

@media (max-width: 768px) {
    .diff-btn-group {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    .diff-btn-group {
        grid-template-columns: 1fr !important;
    }
    
    #startQuizBtn {
        width: 100% !important;
    }
    
    #questionContainer {
        padding: 1.25rem 1rem !important;
    }
    
    #questionText {
        font-size: 1.1rem !important;
    }
    
    #certificateContainer {
        padding: 1.25rem 1rem !important;
        max-width: 100% !important;
    }
}

/* ==========================================================================
   Phase 4: Tool Generators, Resource Cards & Mobile Tables
   ========================================================================== */
.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.table-responsive-wrapper table {
    min-width: 600px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .resource-grid, .industry-grid, .faq-grid, .card-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
    
    .tool-form-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   Phase 5: Legal Text Reader, Footer & Multi-Device QA Polish
   ========================================================================== */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 2rem !important;
    }
    
    .footer-col {
        text-align: center;
    }
    
    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-links a {
        padding: 6px 12px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

@media (max-width: 576px) {
    .content-section, .tool-container {
        padding: 1.25rem 1rem !important;
        border-radius: var(--radius-md) !important;
    }
    
    .legal-text-box, .interpretation-box, .info-box {
        padding: 1.25rem 1rem !important;
        font-size: 0.95rem !important;
        line-height: 1.65 !important;
    }
    
    .title {
        font-size: 1.65rem !important;
        line-height: 1.25 !important;
    }
    
    .subtitle {
        font-size: 0.85rem !important;
        letter-spacing: 0.5px !important;
    }
}

@media (max-width: 360px) {
    .app-container {
        padding: 0 0.5rem !important;
    }
    
    .content-section, .tool-container {
        padding: 1rem 0.75rem !important;
    }
}

