:root {
    --primary: #1a365d;       /* Deep Navy */
    --primary-hover: #2a4365;
    --accent: #2b6cb0;        /* Official Blue */
    --success: #38a169;       /* Green for compliant */
    --danger: #e53e3e;        /* Red for violation */
    --bg-main: #f7fafc;       /* Light gray background */
    --bg-card: #ffffff;
    --text-main: #2d3748;
    --text-muted: #718096;
    --border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, .logo {
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    position: relative;
    background-color: var(--primary);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 100;
}

.nav-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: #e2e8f0;
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: white;
}

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

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

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

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--primary);
        padding: 1.5rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 1000;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        margin: 0.75rem 0;
        font-size: 1rem;
        text-align: center;
        margin-left: 0;
    }
}

/* Layout */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 {
    color: var(--primary);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Calculator Panel */
.calculator-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    padding: 2rem;
    margin-bottom: 2rem;
}

.calc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.calc-header h2 {
    color: var(--primary);
    font-size: 1.3rem;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--success);
    background: #f0fff4;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-weight: 500;
}

/* Inputs */
.date-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-end;
}

.input-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.date-input {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    color: var(--text-main);
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.date-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(43, 108, 176, 0.2);
}

/* Buttons */
button {
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.btn-secondary:hover {
    background: #ebf8ff;
}

.action-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    flex: 1;
}

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

/* Results */
.results-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px dashed var(--border);
}

.results-section h3 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 1rem;
}

.status-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1rem;
}

.status-number {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.status-number.danger { color: var(--danger); }
.status-number.success { color: var(--success); }

.status-label {
    font-size: 1rem;
    color: var(--text-muted);
}

.status-message {
    text-align: center;
    font-weight: 500;
    margin-bottom: 2rem;
}

.audit-trail {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.5rem;
}

.audit-trail h4 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.audit-disclaimer {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

#auditList {
    list-style: none;
    font-size: 0.9rem;
}

#auditList li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
}

#auditList li:last-child {
    border-bottom: none;
}

.info-section {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.info-section h2 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: var(--primary);
    color: #cbd5e0;
    padding: 2rem;
    font-size: 0.85rem;
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}

.footer-col strong {
    color: white;
    font-size: 1rem;
    display: block;
    margin-bottom: 0.25rem;
}

.text-right { text-align: right; }

@media (max-width: 600px) {
    .date-row { flex-direction: column; gap: 0.5rem; }
    .action-row { flex-direction: column; align-items: stretch; }
    .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
    .text-right { text-align: center; }
    .calc-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

/* Styled language selector and Google Translate toolbar overrides */


/* Scroll Reveal animations */
.reveal-scroll {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 1.0s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 1.0s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.reveal-scroll.visible {
  opacity: 1;
}

.reveal-scroll.visible:not(:hover) {
  transform: translateY(0);
}

/* Dashboard Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
}

.tool-card h3 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.btn-card {
    background: var(--bg-main);
    color: var(--primary);
    text-decoration: none;
    text-align: center;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

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

/* Form Sections */
.form-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid var(--border);
}

#calculatorSearch:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15) !important;
}

/* Style checkboxes beautifully */
input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Premium Custom Tooltips for GlobalVisaMath */
[data-tooltip] {
  position: relative;
  cursor: help;
}
span[data-tooltip],
label[data-tooltip],
a[data-tooltip] {
  display: inline-block;
}
[data-tooltip]:hover {
  z-index: 50;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, 6px);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(43, 108, 176, 0.25);
  color: #fff;
  font-size: 0.78rem;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: normal;
  width: max-content;
  max-width: 220px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  font-weight: 400;
  line-height: 1.35;
  z-index: 200;
}
[data-tooltip]::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translate(-50%, 6px);
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.95) transparent transparent;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 200;
}
[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (max-width: 640px) {
  [data-tooltip]::after, [data-tooltip]::before { display: none !important; }
}

/* Circular Dashboard Score Gauge */
.score-circle-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 1rem;
}
.score-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}
.score-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 8;
}
.score-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 282.74;
    stroke-dashoffset: 282.74;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s ease;
}
.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
}

