/**
 * SpreadsheetUSA Theme Custom Styles
 * Unique su-* design system + US navy/red identity (overrides Tailwind blue).
 */

/* =====================================================
   BRAND TOKENS — US navy + warm red accent
   ===================================================== */
:root {
    --su-navy: #0A2540;        /* deep primary */
    --su-navy-700: #133355;
    --su-navy-600: #1E3A5F;    /* primary */
    --su-navy-500: #2C4E78;
    --su-red: #C8102E;         /* accent */
    --su-red-700: #A60D26;
    --su-ink: #1F2937;         /* slate text */
    --su-slate: #475569;
    --su-mist: #F4F6FA;        /* soft panel */
    --su-line: #E2E8F0;
    --su-green: #137a4d;       /* download / free */
    --su-green-600: #0f6340;
}

/* WordPress Core Alignment */
.alignwide { max-width: 1200px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100%; max-width: 100%; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin-right: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; }

/* WordPress Navigation (pagination) */
.nav-links { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.nav-links a, .nav-links span { padding: 0.5rem 1rem; border: 1px solid var(--su-line); border-radius: 0.5rem; }
.nav-links .current { background: var(--su-navy-600); color: white; border-color: var(--su-navy-600); }
.nav-links a:hover { background: var(--su-mist); }

/* Custom Logo */
.custom-logo-link { display: flex; align-items: center; }
.custom-logo { max-height: 40px; width: auto; }

/* Widget Styles */
.widget { margin-bottom: 2rem; }
.widget-title { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; color: white; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { margin-bottom: 0.5rem; }
.widget ul li a { color: #9ca3af; transition: color 0.15s; }
.widget ul li a:hover { color: white; }

/* FAQ Toggle Animation */
.su-faq-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Download Button Ripple */
.su-download-btn { position: relative; overflow: hidden; }
.su-download-btn::after {
    content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0;
    background: rgba(255, 255, 255, 0.2); border-radius: 50%;
    transform: translate(-50%, -50%); transition: width 0.6s, height 0.6s;
}
.su-download-btn:active::after { width: 220px; height: 220px; }

/* Mobile Menu */
#su-mobile-menu.active { display: block; }

/* =====================================================
   BRAND MARK / WORDMARK
   ===================================================== */
.su-brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.su-brand-mark { flex-shrink: 0; }
.su-wordmark { font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.su-wordmark .su-wm-1 { color: var(--su-navy-600); }
.su-wordmark .su-wm-2 { color: var(--su-red); }
.su-brand--invert .su-wordmark .su-wm-1 { color: #ffffff; }
.su-brand--invert .su-wordmark .su-wm-2 { color: #FCA5A5; }

/* =====================================================
   HERO (home + single + page) gradient + accent rule
   ===================================================== */
.su-hero { position: relative; background: linear-gradient(135deg, var(--su-navy) 0%, var(--su-navy-600) 60%, var(--su-navy-700) 100%); color: #fff; overflow: hidden; }
.su-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px); background-size: 44px 44px; opacity: 0.5; pointer-events: none; }
.su-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--su-red); }
.su-hero > * { position: relative; z-index: 1; }
.su-eyebrow { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #FCA5A5; }
.su-kicker-bar { display: inline-block; width: 2.5rem; height: 3px; background: var(--su-red); border-radius: 2px; vertical-align: middle; margin-right: 0.6rem; }

/* =====================================================
   su-FIND search (header / hero / mobile)
   ===================================================== */
.su-find { position: relative; }
.su-find--header { display: none; }
@media (min-width: 768px) { .su-find--header { display: flex; align-items: center; max-width: 30rem; margin-left: 2.25rem; margin-right: 2.25rem; flex: 1 1 auto; } }
@media (max-width: 1100px) { .su-find--header { margin-left: 1.1rem; margin-right: 1.1rem; } }
.su-find-input {
    width: 100%; padding: 0.6rem 0.9rem 0.6rem 2.5rem; font-size: 0.9rem; color: var(--su-ink);
    background: var(--su-mist); border: 1px solid var(--su-line); border-radius: 0.65rem;
    outline: none; transition: box-shadow .15s, border-color .15s; -webkit-appearance: none;
}
.su-find-input:focus { border-color: var(--su-navy-600); box-shadow: 0 0 0 3px rgba(30,58,95,.16); background: #fff; }
.su-find-icon { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: #94a3b8; pointer-events: none; }
.su-find-submit { position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%); background: transparent; border: 0; cursor: pointer; padding: 0.3rem; color: #94a3b8; display: flex; align-items: center; }
.su-find-submit:hover { color: var(--su-navy-600); }
/* hero variant */
.su-find--hero { max-width: 38rem; margin: 0 auto; }
.su-find--hero .su-find-input { padding: 1.05rem 7.5rem 1.05rem 3rem; font-size: 1rem; background: #fff; border: 0; border-radius: 0.9rem; box-shadow: 0 24px 45px -16px rgba(0,0,0,.5); }
.su-find--hero .su-find-icon { left: 1.15rem; width: 1.25rem; height: 1.25rem; color: #94a3b8; }
.su-find-button { position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); background: var(--su-red); color: #fff; font-weight: 600; border: 0; border-radius: 0.6rem; padding: 0.65rem 1.5rem; cursor: pointer; transition: background .15s; }
.su-find-button:hover { background: var(--su-red-700); }
/* mobile variant */
.su-find--mobile { padding: 0 0.5rem 0.5rem; display: block; }

/* =====================================================
   su-NAV (header)
   ===================================================== */
.su-nav { display: none; }
@media (min-width: 768px) { .su-nav { display: flex; align-items: center; gap: 1.6rem; flex-shrink: 0; } }
.su-nav > ul { display: flex; align-items: center; gap: 1.6rem; margin: 0; padding: 0; list-style: none; }
.su-nav a { white-space: nowrap; }
.su-navlink { color: var(--su-slate); font-weight: 500; transition: color .15s; }
.su-navlink:hover, .current-menu-item .su-navlink { color: var(--su-navy-600); }
.su-nav-cta { display: inline-flex; align-items: center; gap: .4rem; background: var(--su-navy-600); color: #fff; padding: 0.55rem 1.1rem; border-radius: 0.6rem; font-weight: 600; transition: background .15s; }
.su-nav-cta:hover { background: var(--su-navy); }
.su-mobilelink { display: block; padding: 0.6rem 1rem; color: var(--su-slate); border-radius: 0.6rem; }
.su-mobilelink:hover { background: var(--su-mist); }

/* =====================================================
   su-CARD (template cards) — left accent rail variant
   ===================================================== */
.su-card { position: relative; background: #fff; border: 1px solid var(--su-line); border-radius: 0.9rem; overflow: hidden; transition: box-shadow .25s, transform .25s, border-color .25s; }
.su-card::before { content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 4px; background: var(--su-red); transform: scaleY(0); transform-origin: top; transition: transform .25s; }
.su-card:hover { box-shadow: 0 18px 38px -20px rgba(10,37,64,.35); transform: translateY(-3px); border-color: #cbd5e1; }
.su-card:hover::before { transform: scaleY(1); }
.su-card-body { padding: 1.3rem; }
.su-card-title a { color: var(--su-ink); transition: color .15s; }
.su-card:hover .su-card-title a { color: var(--su-navy-600); }
.su-tag { display: inline-block; padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600; letter-spacing: .02em; }
.su-card--mini { background: #fff; border: 1px solid var(--su-line); border-radius: 0.75rem; padding: 1rem 1.1rem; transition: box-shadow .2s, border-color .2s; }
.su-card--mini:hover { box-shadow: 0 12px 26px -16px rgba(10,37,64,.4); border-color: #cbd5e1; }

/* responsive masonry-ish grid distinct from donor's plain 3-col */
.su-card-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 640px) { .su-card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .su-card-grid { grid-template-columns: repeat(3, 1fr); } }
.su-cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 768px) { .su-cat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .su-cat-grid { grid-template-columns: repeat(6, 1fr); } }

/* =====================================================
   su author byline + box (E-E-A-T)
   ===================================================== */
.su-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.su-byline-item { display: flex; align-items: center; gap: 0.6rem; }
.su-byline-item img, .su-byline-item .avatar { border-radius: 999px; border: 2px solid rgba(255,255,255,.55); }
.su-byline-role { font-size: 0.7rem; line-height: 1; color: #FCA5A5; text-transform: uppercase; letter-spacing: .08em; }
.su-byline-name { font-weight: 600; line-height: 1.2; color: #fff; }
.su-authorbox { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .su-authorbox { grid-template-columns: repeat(2, 1fr); } }
.su-author { display: flex; gap: 1rem; padding: 1.25rem; background: var(--su-mist); border: 1px solid var(--su-line); border-radius: 0.9rem; }
.su-author img, .su-author .avatar { border-radius: 999px; flex-shrink: 0; }
.su-author-name { font-weight: 700; color: var(--su-ink); }
.su-author-role { font-size: 0.8rem; color: var(--su-red); font-weight: 600; }
.su-author-bio { font-size: 0.9rem; color: var(--su-slate); margin-top: 0.35rem; line-height: 1.5; }

/* Cookie Banner */
#su-consent.show { display: block; animation: suSlideUp 0.3s ease; }
@keyframes suSlideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Scroll to Top Button */
#scroll-to-top {
    position: fixed; bottom: 2rem; right: 2rem; width: 3rem; height: 3rem;
    background: var(--su-navy-600); color: white; border-radius: 50%;
    display: none; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 10px 24px -8px rgba(10,37,64,.55); transition: all 0.3s; z-index: 40;
}
#scroll-to-top:hover { background: var(--su-red); transform: translateY(-2px); }
#scroll-to-top.show { display: flex; }

/* Print Styles */
@media print {
    header, footer, .su-download-btn, #su-consent, #scroll-to-top { display: none !important; }
    body { font-size: 12pt; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 10pt; }
}

/* Focus Visible */
:focus-visible { outline: 2px solid var(--su-navy-600); outline-offset: 2px; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* =====================================================
   TAILWIND BLUE -> US NAVY/RED OVERRIDE  (safety net)
   The static tailwind build hardcodes blue; force brand colors.
   ===================================================== */
.bg-blue-50 { background-color: #EEF2F7 !important; }
.bg-blue-100 { background-color: #DCE5F0 !important; }
.bg-blue-600 { background-color: var(--su-navy-600) !important; }
.bg-blue-700 { background-color: var(--su-navy) !important; }
.bg-blue-800 { background-color: var(--su-navy-700) !important; }
.bg-blue-900 { background-color: var(--su-navy) !important; }
.text-blue-100 { color: #C7D6E8 !important; }
.text-blue-200 { color: #AFC4DD !important; }
.text-blue-600 { color: var(--su-navy-600) !important; }
.text-blue-700 { color: var(--su-navy) !important; }
.text-blue-800 { color: var(--su-navy) !important; }
.text-blue-900 { color: var(--su-navy) !important; }
.border-blue-200 { border-color: #C7D6E8 !important; }
.border-blue-600 { border-color: var(--su-navy-600) !important; }
.hover\:bg-blue-50:hover { background-color: #EEF2F7 !important; }
.hover\:bg-blue-600:hover { background-color: var(--su-navy-600) !important; }
.hover\:bg-blue-700:hover { background-color: var(--su-navy) !important; }
.hover\:text-blue-600:hover { color: var(--su-navy-600) !important; }
.hover\:text-blue-700:hover { color: var(--su-navy) !important; }
.hover\:border-blue-200:hover { border-color: #C7D6E8 !important; }
.focus\:ring-blue-500:focus { --tw-ring-color: var(--su-navy-600) !important; }
.focus\:border-blue-500:focus { border-color: var(--su-navy-600) !important; }
/* gradients (hero, cta) — map blue stops to navy */
.from-blue-600 { --tw-gradient-from: var(--su-navy-600) !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(30,58,95,0)) !important; }
.from-blue-700 { --tw-gradient-from: var(--su-navy) !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(10,37,64,0)) !important; }
.from-blue-900 { --tw-gradient-from: var(--su-navy) !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(10,37,64,0)) !important; }
.via-blue-800 { --tw-gradient-stops: var(--tw-gradient-from), var(--su-navy-700), var(--tw-gradient-to, rgba(19,51,85,0)) !important; }
.to-blue-700 { --tw-gradient-to: var(--su-navy-600) !important; }
.to-blue-900 { --tw-gradient-to: var(--su-navy) !important; }
/* green download CTA -> brand green */
.bg-green-500 { background-color: var(--su-green) !important; }
.hover\:bg-green-600:hover { background-color: var(--su-green-600) !important; }
.text-green-500 { color: var(--su-green) !important; }
.text-green-600 { color: var(--su-green) !important; }
.bg-green-100 { background-color: #d8efe2 !important; }

/* =====================================================
   UTILITIES NOT IN THE STATIC TAILWIND BUILD
   (hand-purged build lacks these; defined here with exact
    values + 640/768/1024/1280 breakpoints to match Tailwind)
   ===================================================== */
/* translucency */
.bg-white\/10 { background-color: rgba(255,255,255,0.12); }
.bg-white\/20 { background-color: rgba(255,255,255,0.20); }
.hover\:bg-white\/20:hover { background-color: rgba(255,255,255,0.20); }
.bg-gray-50\/60 { background-color: rgba(249,250,251,0.6); }
.border-white\/15 { border-color: rgba(255,255,255,0.15); }
.border-white\/30 { border-color: rgba(255,255,255,0.30); }
.ring-1 { box-shadow: 0 0 0 1px var(--tw-ring-color, rgba(255,255,255,0.2)); }
.ring-white\/20 { --tw-ring-color: rgba(255,255,255,0.2); }

/* 12-col grid + spans */
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.col-span-5 { grid-column: span 5 / span 5; }
.col-span-7 { grid-column: span 7 / span 7; }

/* spacing / gaps */
.gap-x-6 { column-gap: 1.5rem; }
.gap-y-3 { row-gap: 0.75rem; }
.gap-10 { gap: 2.5rem; }
.space-y-12 > :not([hidden]) ~ :not([hidden]) { margin-top: 3rem; }
.border-t-4 { border-top-width: 4px; }
.inset-x-0 { left: 0; right: 0; }
.whitespace-nowrap { white-space: nowrap; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.px-7 { padding-left: 1.75rem; padding-right: 1.75rem; }
.m-3 { margin: 0.75rem; }

/* 640px */
@media (min-width: 640px) {
  .sm\:m-4 { margin: 1rem; }
  .sm\:p-5 { padding: 1.25rem; }
  .sm\:p-8 { padding: 2rem; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 768px */
@media (min-width: 768px) {
  .md\:items-end { align-items: flex-end; }
  .md\:items-center { align-items: center; }
  .md\:justify-between { justify-content: space-between; }
  .md\:flex-row { flex-direction: row; }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* 1024px */
@media (min-width: 1024px) {
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:col-span-1 { grid-column: span 1 / span 1; }
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
  .lg\:py-24 { padding-top: 6rem; padding-bottom: 6rem; }
  .lg\:p-8 { padding: 2rem; }
  .lg\:p-12 { padding: 3rem; }
  .lg\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .lg\:text-6xl { font-size: 3.75rem; line-height: 1; }
}

/* =====================================================
   EXCEL MOCKUP STYLES (unchanged engine markup)
   ===================================================== */
.excel-mockup-container { position: relative; transform: perspective(1000px) rotateY(-5deg) rotateX(2deg); transition: transform 0.3s ease; }
.excel-mockup-container:hover { transform: perspective(1000px) rotateY(-2deg) rotateX(1deg); }
.excel-window { background: #f3f3f3; border-radius: 8px; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4); font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; font-size: 11px; }
.excel-titlebar { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(180deg, #217346 0%, #1a5c38 100%); padding: 6px 12px; color: white; }
.excel-titlebar-left { display: flex; align-items: center; gap: 8px; }
.excel-icon { width: 18px; height: 18px; }
.excel-filename { font-size: 12px; font-weight: 500; opacity: 0.95; }
.excel-titlebar-buttons { display: flex; gap: 8px; }
.excel-btn { width: 12px; height: 12px; border-radius: 50%; }
.excel-btn.minimize { background: #f5c242; }
.excel-btn.maximize { background: #3dc04f; }
.excel-btn.close { background: #ed594a; }
.excel-ribbon { background: #217346; padding: 4px 12px; border-bottom: 1px solid #1a5c38; }
.excel-ribbon-tabs { display: flex; gap: 16px; color: white; font-size: 11px; }
.excel-ribbon-tabs span { padding: 4px 0; opacity: 0.7; cursor: pointer; }
.excel-ribbon-tabs span.active { opacity: 1; border-bottom: 2px solid white; }
.excel-formula-bar { display: flex; align-items: center; background: white; border-bottom: 1px solid #d6d6d6; padding: 4px 8px; gap: 8px; }
.excel-cell-ref { min-width: 50px; padding: 2px 6px; background: #f5f5f5; border: 1px solid #d6d6d6; font-size: 10px; text-align: center; }
.excel-fx { color: #666; font-style: italic; font-size: 10px; }
.excel-formula-input { flex: 1; padding: 2px 6px; background: white; border: 1px solid #d6d6d6; font-size: 10px; color: #333; min-height: 18px; }
.excel-sheet-area { background: white; overflow: hidden; }
.excel-grid { display: grid; grid-template-columns: 30px repeat(5, 1fr); border: 1px solid #d6d6d6; }
.excel-corner { background: #f5f5f5; border-right: 1px solid #c0c0c0; border-bottom: 1px solid #c0c0c0; }
.excel-col-header { background: #f5f5f5; border-right: 1px solid #c0c0c0; border-bottom: 1px solid #c0c0c0; padding: 4px; text-align: center; font-weight: 500; color: #333; }
.excel-row-header { background: #f5f5f5; border-right: 1px solid #c0c0c0; border-bottom: 1px solid #c0c0c0; padding: 4px; text-align: center; font-weight: 500; color: #333; }
.excel-cell { border-right: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0; padding: 4px 6px; min-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #333; }
.excel-cell.header-cell { background: #217346; color: white; font-weight: 600; }
.excel-cell.number-cell { text-align: right; font-variant-numeric: tabular-nums; }
.excel-cell.currency-cell { text-align: right; color: #1a5c38; font-weight: 500; }
.excel-cell.total-label { font-weight: 600; text-align: right; }
.excel-cell.total-cell { font-weight: 700; text-align: right; background: #f0f7f4; }
.excel-cell.total-cell.highlight { background: #d4edda; color: #155724; }
.excel-cell.positive { color: #28a745; }
.excel-cell.warning { color: #ffc107; }
.excel-cell.critical { color: #dc3545; font-weight: 600; }
.excel-sheet-tabs { display: flex; align-items: flex-end; background: #e0e0e0; padding: 4px 8px 0; gap: 2px; }
.excel-sheet-tab { background: #f5f5f5; padding: 4px 12px; border-radius: 4px 4px 0 0; font-size: 10px; color: #666; cursor: pointer; border: 1px solid #c0c0c0; border-bottom: none; }
.excel-sheet-tab.active { background: white; color: #333; font-weight: 500; }
.excel-sheet-tab-add { padding: 4px 8px; color: #888; cursor: pointer; font-size: 12px; }
.excel-status-bar { display: flex; justify-content: space-between; align-items: center; background: #217346; padding: 3px 12px; color: white; font-size: 10px; }
.excel-status-left { opacity: 0.9; }
.excel-zoom { opacity: 0.8; }
.excel-mockup-shadow { position: absolute; bottom: -15px; left: 10%; right: 10%; height: 20px; background: radial-gradient(ellipse at center, rgba(0,0,0,0.2) 0%, transparent 70%); filter: blur(8px); z-index: -1; }
.excel-mockup-reflection { position: absolute; top: 0; left: 0; right: 0; height: 40%; background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%); pointer-events: none; border-radius: 8px 8px 0 0; }
.excel-preview-notice { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 12px 16px; background: rgba(255, 255, 255, 0.1); border-radius: 8px; backdrop-filter: blur(4px); }
.excel-preview-notice .notice-icon { width: 20px; height: 20px; flex-shrink: 0; color: rgba(255, 255, 255, 0.8); margin-top: 2px; }
.excel-preview-notice p { margin: 0; font-size: 13px; color: rgba(255, 255, 255, 0.85); line-height: 1.5; }
.excel-preview-notice strong { color: white; }
