/* Visually hidden class for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Default Light Theme Styles for template (header, footer, settings menu) */
body {
    font-family: 'Inter', sans-serif;
    background-color: #F1F5F9; /* slate-100 */
    color: #0F172A; /* slate-900 */
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevent horizontal scroll on body */
}

/* Added to prevent scrolling when a panel is open */
body.panel-open {
    overflow: hidden;
}

header.app-header {
    background-color: #E2E8F0; /* slate-200 (Light Mode Default) */
    transition: background-color 0.3s ease;
}
.nav-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem; /* text-sm */
    color: #1E293B; /* slate-800 (Light Mode Default) */
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}
.nav-dropdown-item svg:not([class*="text-"]):not(#animations-menu-icon-svg):not(.page-nav-icon-svg) {
    width: 1.25rem; /* w-5 */
    height: 1.25rem; /* h-5 */
    margin-right: 0.5rem;
    color: #0284C7; /* sky-600 */
}
.nav-dropdown-item .theme-checkmark svg {
     color: #0ea5e9; /* sky-500 */
}
.nav-dropdown-item:hover {
    background-color: #E2E8F0; /* slate-200 (Light Mode Default hover) */
    color: #0369A1; /* sky-700 (Light Mode Default hover) */
}

footer {
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-top-width: 1px;
    background-color: #E2E8F0; /* Changed to solid color */
    border-color: rgba(203, 213, 225, 0.5);
    transition: border-color 0.3s ease, background-color 0.3s ease;
}
.footer-text-secondary { color: #64748B; /* slate-500 */ }

.site-logo { height: 32px; width: auto; margin-right: 0.5rem; }
.settings-divider { border-top: 1px solid #CBD5E1; /* slate-300 */ margin-top: 0.25rem; margin-bottom: 0.25rem; }

.toggle-switch-label { display: flex; align-items: center; cursor: pointer; }
.toggle-switch-checkbox { opacity: 0; width: 0; height: 0; }
.toggle-switch-checkbox:disabled + .toggle-switch-slider { background-color: #9CA3AF; cursor: not-allowed; }
.toggle-switch-checkbox:disabled + .toggle-switch-slider::before { background-color: #E5E7EB; }
#animations-toggle-link.disabled-link { opacity: 0.5; cursor: not-allowed; }


.toggle-switch-slider { width: 2.5rem; height: 1.25rem; background-color: #D1D5DB; /* gray-300 */ border-radius: 9999px; position: relative; transition: background-color 0.2s ease-in-out; }
.toggle-switch-slider::before { content: ''; position: absolute; top: 2px; left: 2px; width: 1rem; height: 1rem; background-color: white; border-radius: 9999px; transition: transform 0.2s ease-in-out; }
.toggle-switch-checkbox:checked + .toggle-switch-slider { background-color: #2563EB; /* blue-600 */ }
.toggle-switch-checkbox:checked + .toggle-switch-slider::before { transform: translateX(1.25rem); }

.header-icon { color: #334155; /* slate-700 */ transition: color 0.2s ease-in-out; }
.header-icon:hover { color: #0EA5E9; /* sky-500 */ }
.header-icon svg { fill: currentColor; }
.header-icon svg.stroked-icon { fill: none; stroke: currentColor; }

#settings-button:hover, #page-nav-button:hover { background-color: #E2E8F0; /* slate-200 for light mode hover */ }

/* Styles from Standards.html - Adapted for Light Mode (default) */
.stat-card {
    background-color: #FFFFFF;
    color: #1E293B;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.pag-title-icon {
    color: #0369A1; /* Matches section-title color */
    transition: color 0.3s ease;
}
.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #0369A1;
    margin-bottom: 1rem;
    text-align: center;
    transition: color 0.3s ease;
}
/* New class for H4 subheaders */
.section-subheader-color {
    font-weight: 600; /* Adjusted from 700 to 600 for H4 */
    color: #0369A1; /* Same as section-title */
    transition: color 0.3s ease;
}
.sub-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #40699f;
    margin-top: 0;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}
.sub-title i.fas {
    margin-right: 0.5rem;
    color: #0369A1;
    font-size: 0.9em;
    line-height: 1;
}
html.dark .sub-title i.fas {
    color: #38BDF8;
}

.standards-text-dimmer { color: #334155; transition: color 0.3s ease;}
.accent-text {
    color: #B45309;
    transition: color 0.3s ease;
}

/* Dark Mode Overrides (triggered by html.dark) */
html.dark body { background-color: #0F172A; color: #F8FAFC; }
html.dark header.app-header { background-color: #1E293B; }
html.dark .nav-dropdown-item { color: #CBD5E1; }
html.dark .nav-dropdown-item svg:not([class*="text-"]):not(#animations-menu-icon-svg):not(.page-nav-icon-svg) { color: #38BDF8; }
html.dark .nav-dropdown-item .theme-checkmark svg { color: #38bdf8; }
html.dark .nav-dropdown-item:hover { background-color: #334155; color: #38BDF8; }
html.dark footer {
    background-color: #1E293B; /* Changed to solid color */
    border-color: rgba(51, 65, 85, 0.5);
}
html.dark .footer-text-secondary { color: #94A3B8; }
html.dark .settings-divider { border-top-color: #334155; }
html.dark .toggle-switch-slider { background-color: #4B5563; }
html.dark .toggle-switch-checkbox:checked + .toggle-switch-slider { background-color: #3B82F6; }
html.dark .toggle-switch-checkbox:disabled + .toggle-switch-slider { background-color: #374151; }
html.dark .toggle-switch-checkbox:disabled + .toggle-switch-slider::before { background-color: #4B5563; }
html.dark .header-icon { color: #CBD5E1; }
html.dark .header-icon:hover { color: #38BDF8; }
html.dark #settings-button:hover, html.dark #page-nav-button:hover { background-color: #334155; }

html.dark .stat-card {
    background-color: #1E293B;
    color: #F8FAFC;
}
html.dark .pag-title-icon {
    color: #38BDF8;
}
html.dark .section-title,
html.dark .section-subheader-color { /* Apply dark mode color to the new class */
    color: #38BDF8;
}
html.dark .sub-title {
    color: #7cbcf6;
}
html.dark .standards-text-dimmer { color: #CBD5E1; }
html.dark .accent-text {
    color: #FACC15;
}

.theme-checkmark svg {
    color: #0ea5e9; /* sky-500 */
}
html.dark .theme-checkmark svg {
    color: #38bdf8; /* sky-400 */
}

.animations-icon-svg {
    transition: transform 0.3s ease, stroke 0.3s ease;
}
.animations-icon-svg.animate-active {
    animation: explosion-effect 2s infinite ease-in-out,
               rainbow-stroke-wave-direct 3s infinite linear;
}
@keyframes explosion-effect {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    25% { transform: scale(1.6) rotate(45deg); opacity: 0.7; }
    50% { transform: scale(0.7) rotate(-45deg); opacity: 1; }
    75% { transform: scale(1.3) rotate(15deg); opacity: 0.8; }
}
@keyframes rainbow-stroke-wave-direct {
    0%   { stroke: #FF0000; } 14%  { stroke: #FFA500; } 28%  { stroke: #FFFF00; } 42%  { stroke: #008000; }
    57%  { stroke: #0000FF; } 71%  { stroke: #4B0082; } 85%  { stroke: #EE82EE; } 100% { stroke: #FF0000; }
}
.animations-icon-svg:not(.animate-active) { stroke: #bd10e0; }
html.dark .animations-icon-svg:not(.animate-active) { stroke: #d946ef; }

/* Recommended Tools Section */
.tool-category-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 768px) {
    .tool-category-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}
 @media (min-width: 1024px) {
    .tool-category-grid {
         grid-template-columns: repeat(2, 1fr);
    }
}

.tool-list {
    list-style: none;
    padding-left: 0;
    margin-top: 0.75rem;
}
.tool-list li {
    margin-bottom: 0.75rem;
    position: relative;
}
.tool-list li:not(.top-choice-item) {
    padding-left: 1.5rem;
}

.tool-list strong {
    color: #0F172A;
}
html.dark .tool-list strong {
    color: #F8FAFC;
}
.tool-link {
    color: #0284C7;
    text-decoration: underline;
    transition: color 0.2s ease;
}
.tool-link:hover {
    color: #0369A1;
}
html.dark .tool-link {
    color: #38BDF8;
}
html.dark .tool-link:hover {
    color: #0EA5E9;
}
.tool-link i.fas {
    font-size: 0.8em;
    margin-left: 0.25rem;
}
.tool-note {
    font-size: 0.875rem;
    color: ##000000;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background-color: #f37c88;
    border-left: 3px solid #f70000;
    border-radius: 0.25rem;
}
html.dark .tool-note {
    color: #ffffff;
    background-color: #f37c88;
    border-left-color: #f70000;
}

/* --- START: Animated Border for Top Choice Items --- */
@property --rainbow-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes rainbow-chase-animation { to { --rainbow-angle: 360deg; } }
@keyframes aura-pulse-effect {
    0%   { box-shadow: 0 0 15px 4px rgba(239, 68, 68, 0.35), 0 0 30px 8px rgba(239, 68, 68, 0.2); }
    17%  { box-shadow: 0 0 15px 4px rgba(249, 115, 22, 0.35), 0 0 30px 8px rgba(249, 115, 22, 0.2); }
    33%  { box-shadow: 0 0 15px 4px rgba(234, 179, 8, 0.35), 0 0 30px 8px rgba(234, 179, 8, 0.2); }
    50%  { box-shadow: 0 0 15px 4px rgba(34, 197, 94, 0.35), 0 0 30px 8px rgba(34, 197, 94, 0.2); }
    67%  { box-shadow: 0 0 15px 4px rgba(59, 130, 246, 0.35), 0 0 30px 8px rgba(59, 130, 246, 0.2); }
    83%  { box-shadow: 0 0 15px 4px rgba(139, 92, 246, 0.35), 0 0 30px 8px rgba(139, 92, 246, 0.2); }
    100% { box-shadow: 0 0 15px 4px rgba(239, 68, 68, 0.35), 0 0 30px 8px rgba(239, 68, 68, 0.2); }
}

.animated-rainbow-border {
    padding: 3px;
    border-radius: 0.375rem;
    background: conic-gradient(from var(--rainbow-angle), #ef4444, #f97316, #eab308, #22c55e, #3b82f6, #6366f1, #8b5cf6, #ef4444);
    animation: rainbow-chase-animation 3s linear infinite, aura-pulse-effect 6s ease-in-out infinite;
}

.top-choice-inner-content {
    background-color: #F0F9FF;
    border-radius: calc(0.375rem - 3px);
    width: 100%;
    height: 100%;
    padding: 1rem 1rem 1rem 2.5rem;
    position: relative;
    transition: background-color 0.3s ease;
}

html.dark .top-choice-inner-content {
    background-color: #0C4A6E;
}

.top-choice-inner-content::before {
    content: "✓";
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: #10B981;
    font-weight: bold;
}
html.dark .top-choice-inner-content::before {
    color: #34D399;
}

body.animations-disabled .animated-rainbow-border {
    animation: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 2px solid #dc2626; /* red-600 */
    padding: 1px;
}
html.dark body.animations-disabled .animated-rainbow-border {
     border-color: #f87171; /* red-400 */
}
body.animations-disabled .top-choice-inner-content {
    border-radius: calc(0.375rem - 2px);
}

.tool-list li.top-choice-item {
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
}

.tool-list li.top-choice-item strong.accent-text {
    color: #0369A1;
}

html.dark .tool-list li.top-choice-item strong.accent-text {
    color: #7DD3FC;
}
/* --- END: Animated Border --- */

.demo-container {
    border: 1px solid #CBD5E1; /* slate-300 */
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
}
html.dark .demo-container {
    border-color: #334155; /* slate-600 */
}
.form-input {
    background-color: #F3F4F6;
    color: #111827;
    border: 1px solid #D1D5DB;
}
html.dark .form-input {
    background-color: #374151;
    color: #F9FAFB;
    border-color: #4B5563;
}
.demo-button {
    background-color: #2563EB;
    color: white;
    transition: background-color 0.2s;
}
.demo-button:hover {
     background-color: #1D4ED8;
}
 html.dark .demo-button {
     background-color: #3B82F6;
}
html.dark .demo-button:hover {
    background-color: #2563EB;
}
.demo-button:disabled {
    background-color: #9CA3AF;
    cursor: not-allowed;
}
html.dark .demo-button:disabled {
    background-color: #4B5563;
}
/* Style for buttons with icons */
.demo-button i {
    margin-right: 0.5rem;
}


/* 2FA Demo Specific Styles */
.phone-simulator {
    width: 280px;
    height: 500px;
    background-color: #1F2937; /* gray-800 */
    border-radius: 2rem;
    padding: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2), 0 10px 10px -5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: auto;
}
#two-fa-code {
    font-family: 'monospace';
    font-size: 3rem;
    letter-spacing: 0.25rem;
    color: #38BDF8; /* sky-400 */
    margin-bottom: 1rem;
}
#two-fa-timer-bar-container {
    width: 100%;
    height: 4px;
    background-color: #4B5563; /* gray-600 */
    border-radius: 2px;
    overflow: hidden;
}
#two-fa-timer-bar {
    height: 100%;
    width: 100%;
    background-color: #3B82F6; /* blue-500 */
    transition: width 1s linear;
}

/* VPN Demo Specific Styles */
#vpn-demo-diagram {
    position: relative;
    height: 300px;
    max-width: 600px;
    margin: 1.5rem auto;
    overflow: hidden;
}
.vpn-icon {
    position: absolute;
    text-align: center;
    transition: all 0.5s ease-in-out;
}
.vpn-icon svg {
    width: 50px;
    height: 50px;
    margin: 0 auto 0.25rem;
}
#vpn-user { top: 125px; left: 20px; }
#vpn-snooper { top: 220px; left: 150px; }
#vpn-server { top: 50px; left: 275px; opacity: 0;}
#vpn-website { top: 125px; right: 20px; }

.vpn-line {
    position: absolute;
    border: 2px dashed;
    transition: all 0.5s ease-in-out;
}

#vpn-line-user-to-web {
    top: 150px; left: 70px; width: 460px;
    border-color: #EF4444; /* red-500 */
}

#vpn-line-user-to-vpn {
    top: 100px; left: 70px; width: 225px;
    transform: rotate(-15deg);
    transform-origin: left center;
    opacity: 0;
    border-color: #22C55E; /* green-500 */
}

#vpn-line-vpn-to-web {
    top: 100px; right: 70px; width: 225px;
    transform: rotate(15deg);
    transform-origin: right center;
    opacity: 0;
    border-color: #22C55E; /* green-500 */
}

.data-packet {
    position: absolute;
    top: 140px;
    left: 70px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    opacity: 0;
    
}
.data-packet.unencrypted {
    background-color: #F87171; /* red-400 */
}
.data-packet.encrypted {
    background-color: #4ADE80; /* green-400 */
}

@keyframes flow-unencrypted {
    0% { left: 70px; opacity: 1; }
    100% { left: 510px; opacity: 1; }
}

@keyframes flow-encrypted-leg1 {
    0% { top: 140px; left: 70px; opacity: 1; }
    100% { top: 70px; left: 290px; opacity: 1; }
}

@keyframes flow-encrypted-leg2 {
     0% { top: 70px; left: 290px; opacity: 1; }
    100% { top: 140px; left: 510px; opacity: 1; }
}

.vpn-on #vpn-server { opacity: 1; }
.vpn-on #vpn-line-user-to-web { opacity: 0; }
.vpn-on #vpn-line-user-to-vpn { opacity: 1; }
.vpn-on #vpn-line-vpn-to-web { opacity: 1; }
.vpn-on #vpn-snooper svg { color: #9CA3AF; } /* gray-400 */
.vpn-on #vpn-snooper span { text-decoration: line-through; }

/* === SIDE PANEL STYLES START === */
.panel-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5); z-index: 70;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
.panel-overlay.active { opacity: 1; visibility: visible; }

.side-panel {
    position: fixed; top: 0; height: 100%; width: 90vw; max-width: 420px;
    background-color: #FFFFFF; z-index: 80;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out;
    display: flex; flex-direction: column; overflow-y: auto;
}
html.dark .side-panel { background-color: #1E293B; }

.side-panel.left { left: 0; transform: translateX(-100%); }
.side-panel.right { right: 0; transform: translateX(100%); }
.side-panel.open { transform: translateX(0); }

.side-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem; border-bottom: 1px solid #E2E8F0;
}
html.dark .side-panel-header { border-bottom-color: #334155; }

.side-panel-title { font-size: 1.375rem; font-weight: 600; color: #1E293B; }
html.dark .side-panel-title { color: #E2E8F0; }

.panel-close-button {
    background: none; border: none; cursor: pointer; padding: 0.5rem;
    color: #64748B; transition: color 0.2s ease, transform 0.2s ease;
}
.panel-close-button:hover { color: #EF4444; transform: rotate(90deg); }
html.dark .panel-close-button { color: #94A3B8; }
html.dark .panel-close-button:hover { color: #F87171; }

.side-panel-content { padding: 0.5rem 0; flex-grow: 1; }
.side-panel .nav-dropdown-item { font-size: 1rem; padding: 0.75rem 1.5rem; }
.side-panel .dropdown-menu-header-text {
    font-size: 0.875rem; font-weight: 600; padding: 0.75rem 1.5rem 0.5rem;
}

#menu-button { margin-right: 0.5rem; }
