/* ============================================================
   BestTimeConverter.com — Core Stylesheet
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-primary:   #1a3d6e;
  --color-primary-h: #14305a;
  --color-accent:    #2e7dc0;
  --color-accent-h:  #245f94;
  --color-text:      #1e2735;
  --color-text-muted:#4a5568;
  --color-bg:        #f7f8fa;
  --color-bg-card:   #ffffff;
  --color-border:    #d1d9e0;
  --color-success:   #2e7d60;
  --color-warning:   #b45309;
  --radius-sm:       4px;
  --radius-md:       8px;
  --radius-lg:       14px;
  --shadow-card:     0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.06);
  --shadow-nav:      0 1px 3px rgba(0,0,0,.09);
  --font-sans:       'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-serif:      Georgia, 'Times New Roman', serif;
  --max-w:           1120px;
  --transition:      0.18s ease;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: .5rem 1rem;
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  font-size: .875rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  z-index: 9999;
  transition: top .15s;
}
.skip-link:focus { top: 0; }

/* ---------- Typography ---------- */
h1,h2,h3,h4,h5,h6 {
  font-weight: 700;
  line-height: 1.28;
  color: var(--color-text);
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); }
h4 { font-size: 1.05rem; }
p  { margin-bottom: 1rem; color: var(--color-text); }
p:last-child { margin-bottom: 0; }
a  { color: var(--color-accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover, a:focus { color: var(--color-accent-h); }
a:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}
ul,ol { padding-left: 1.4rem; margin-bottom: 1rem; }
li { margin-bottom: .3rem; }
strong { font-weight: 600; }
blockquote {
  border-left: 4px solid var(--color-accent);
  padding: .75rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--color-text-muted);
  background: #eef4fb;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
hr { border: 0; border-top: 1px solid var(--color-border); margin: 2rem 0; }

/* ---------- Layout ---------- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Navigation ---------- */
.site-header {
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-nav);
  position: sticky;
  top: 0;
  z-index: 200;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1.25rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: -.015em;
  flex-shrink: 0;
}
.logo span { color: var(--color-accent); }
.logo:hover,.logo:focus { color: var(--color-primary-h); }

.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: .4rem .65rem;
  cursor: pointer;
  color: var(--color-text);
  font-size: 1.25rem;
  line-height: 1;
}
.nav-toggle:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.site-nav { display: flex; align-items: center; gap: .25rem; }
.site-nav a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: .4rem .7rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.site-nav a:hover,
.site-nav a:focus { background: #eef4fb; color: var(--color-primary); }
.site-nav a.active { color: var(--color-primary); font-weight: 600; }

.nav-dropdown { position: relative; }
.nav-dropdown > button {
  font-size: .875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem .7rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: .3rem;
  transition: background var(--transition), color var(--transition);
}
.nav-dropdown > button:hover,
.nav-dropdown > button:focus { background: #eef4fb; color: var(--color-primary); }
.nav-dropdown > button:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.nav-dropdown > button svg { width: 14px; height: 14px; transition: transform .2s; }
.nav-dropdown.open > button svg { transform: rotate(180deg); }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  min-width: 230px;
  padding: .4rem 0;
  z-index: 300;
}
.nav-dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: .55rem 1rem;
  font-size: .85rem;
  color: var(--color-text);
  text-decoration: none;
  border-radius: 0;
  transition: background var(--transition);
}
.dropdown-menu a:hover { background: #eef4fb; color: var(--color-primary); }

/* ---------- Responsive Nav ---------- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; align-items: center; }
  .site-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    background: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
    padding: 1rem 1.25rem;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    z-index: 250;
  }
  .site-nav.open { display: flex; }
  .site-nav a, .nav-dropdown > button {
    width: 100%;
    font-size: .95rem;
    padding: .6rem .5rem;
  }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--color-border);
    border-radius: 0;
    margin-left: .75rem;
    padding: 0;
  }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #24527a 100%);
  color: #fff;
  padding: 4rem 1.25rem 3rem;
  text-align: center;
}
.hero h1 { color: #fff; margin-bottom: .75rem; }
.hero .hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
  max-width: 600px;
  margin: 0 auto 0;
  margin-bottom: 0;
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 2rem;
}
.card-sm { padding: 1.25rem 1.5rem; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
.section-sm { padding: 2rem 0; }
.section-title { margin-bottom: 1.75rem; }
.section-title h2 { margin-bottom: .4rem; }
.section-title p { color: var(--color-text-muted); font-size: 1rem; }

/* ---------- Converter ---------- */
.converter-wrap {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-top: -2.5rem;
}
.converter-header {
  background: var(--color-primary);
  color: #fff;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.converter-header h2 { color: #fff; font-size: 1rem; font-weight: 600; }
.converter-body { padding: 1.5rem; }

.tz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media(max-width:600px){ .tz-grid { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: .03em;
  text-transform: uppercase;
  margin-bottom: .35rem;
}
.form-control {
  display: block;
  width: 100%;
  padding: .6rem .85rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: .9375rem;
  color: var(--color-text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(46,125,192,.18);
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .9375rem;
  font-weight: 600;
  padding: .65rem 1.4rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform .1s, box-shadow var(--transition);
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover { background: var(--color-accent-h); color: #fff; }
.btn-primary:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}
.btn-outline:hover { background: var(--color-accent); color: #fff; }
.btn-sm { font-size: .8125rem; padding: .4rem .9rem; }

.converter-result {
  margin-top: 1.25rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  overflow: hidden;
}
.result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--color-border);
  gap: .75rem;
  flex-wrap: wrap;
}
.result-item:last-child { border-bottom: none; }
.result-item:nth-child(even) { background: #f7f9fc; }
.result-tz { font-size: .8125rem; color: var(--color-text-muted); font-weight: 500; }
.result-time {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -.01em;
}
.result-date { font-size: .75rem; color: var(--color-text-muted); }
.result-badge {
  font-size: .7rem;
  font-weight: 700;
  padding: .15rem .4rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-next { background: #fff8e1; color: #b45309; }
.badge-prev { background: #e8f5e9; color: #2e7d60; }

.add-tz-row {
  margin-top: .75rem;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: flex-end;
}
.add-tz-row .form-group { flex: 1; min-width: 200px; margin-bottom: 0; }

/* ---------- Guide Cards ---------- */
.guide-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.guide-card:hover {
  box-shadow: 0 4px 24px rgba(26,61,110,.12);
  border-color: var(--color-accent);
  transform: translateY(-2px);
  color: inherit;
}
.guide-card:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}
.guide-icon {
  font-size: 1.75rem;
  margin-bottom: .75rem;
  line-height: 1;
}
.guide-card h2,
.guide-card h3 { font-size: 1rem; margin-bottom: .4rem; color: var(--color-primary); }
.guide-card p { font-size: .875rem; color: var(--color-text-muted); margin-bottom: 0; }
.guide-card .read-more {
  margin-top: .85rem;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
}

/* ---------- Trust Bar ---------- */
.trust-bar {
  background: var(--color-primary);
  color: rgba(255,255,255,.85);
  padding: 1rem 0;
  font-size: .85rem;
}
.trust-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.trust-item { display: flex; align-items: center; gap: .4rem; }
.trust-item svg { flex-shrink: 0; }

/* ---------- Stats Bar ---------- */
.stats-row {
  display: flex;
  gap: 1px;
  background: var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.stat-cell {
  background: var(--color-bg-card);
  padding: 1.25rem 1.5rem;
  flex: 1;
  text-align: center;
}
.stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: .25rem;
}
.stat-label { font-size: .8125rem; color: var(--color-text-muted); }
@media(max-width:580px){
  .stats-row { flex-direction: column; }
  .stat-cell { border-bottom: 1px solid var(--color-border); }
  .stat-cell:last-child { border-bottom: none; }
}

/* ---------- FAQ ---------- */
details.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}
details.faq-item:first-of-type { border-top: 1px solid var(--color-border); }
details.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .15rem 0;
  color: var(--color-text);
}
details.faq-item summary:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; border-radius: 3px; }
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--color-accent);
  flex-shrink: 0;
  transition: transform .2s;
  display: inline-block;
}
details.faq-item[open] summary::after { transform: rotate(45deg); }
details.faq-item .faq-body {
  padding: .75rem 0 .25rem;
  color: var(--color-text-muted);
  font-size: .9375rem;
}

/* ---------- Content Pages ---------- */
.content-hero {
  background: var(--color-primary);
  color: #fff;
  padding: 3rem 1.25rem 2.5rem;
}
.content-hero h1 { color: #fff; }
.content-hero .breadcrumb { font-size: .8125rem; color: rgba(255,255,255,.7); margin-bottom: .5rem; }
.content-hero .breadcrumb a { color: rgba(255,255,255,.8); }

.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}
@media(max-width:860px){ .content-layout { grid-template-columns: 1fr; } }

.prose h2 { margin: 2rem 0 .75rem; }
.prose h3 { margin: 1.5rem 0 .5rem; }
.prose p { margin-bottom: 1.1rem; }
.prose ul,
.prose ol { margin-bottom: 1.1rem; }
.prose li { margin-bottom: .45rem; }
.prose blockquote { margin: 1.5rem 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.5rem 0; font-size: .9rem; }
.prose table th,
.prose table td { border: 1px solid var(--color-border); padding: .6rem .9rem; text-align: left; }
.prose table th { background: #eef4fb; font-weight: 600; color: var(--color-primary); }
.prose table tr:nth-child(even) td { background: #f7f9fc; }

.sidebar-sticky { position: sticky; top: 80px; }
.sidebar-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.sidebar-card h4 { margin-bottom: .75rem; font-size: .9rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .05em; }
.sidebar-card a { display: block; font-size: .875rem; color: var(--color-text); text-decoration: none; padding: .3rem 0; border-bottom: 1px solid var(--color-border); }
.sidebar-card a:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-card a:hover { color: var(--color-accent); }

/* ---------- Trust Pages (no ads) ---------- */
.trust-page .prose-full {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}
.trust-page .prose-full h1 { margin-bottom: .5rem; }
.trust-page .prose-full .updated { font-size: .8125rem; color: var(--color-text-muted); margin-bottom: 2rem; }
.trust-page .prose-full h2 { margin: 2rem 0 .75rem; padding-top: 1rem; border-top: 1px solid var(--color-border); }
.trust-page .prose-full h2:first-of-type { border-top: none; }

/* ---------- Contact Form ---------- */
.contact-form .form-group { margin-bottom: 1.1rem; }
.contact-form textarea.form-control { min-height: 130px; resize: vertical; }
.contact-info-item { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .75rem; }
.contact-info-item svg { flex-shrink: 0; margin-top: .25rem; }

/* ---------- Breadcrumb ---------- */
.breadcrumb-bar {
  background: #eef4fb;
  padding: .6rem 0;
  font-size: .8125rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}
.breadcrumb-bar a { color: var(--color-accent); text-decoration: none; }
.breadcrumb-bar a:hover { text-decoration: underline; }
.breadcrumb-bar span { margin: 0 .35rem; }

/* ---------- Alert / Note ---------- */
.note {
  background: #eef4fb;
  border: 1px solid #b6d4f0;
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: .9rem;
  color: var(--color-text);
  margin: 1.25rem 0;
}
.note strong { color: var(--color-primary); }

/* ---------- Ad Slots ---------- */
.ad-slot {
  background: #f7f8fa;
  border: 1px dashed #c8d3dd;
  border-radius: var(--radius-sm);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a0aec0;
  font-size: .75rem;
  text-align: center;
  margin: 1.5rem 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,.75);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
@media(max-width:700px){
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media(max-width:480px){
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand .logo { color: #fff; font-size: 1.1rem; display: inline-block; margin-bottom: .6rem; }
.footer-brand p { font-size: .85rem; line-height: 1.6; }
.footer-col h5 {
  color: #fff;
  font-size: .7875rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .75rem;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: .85rem;
  margin-bottom: .35rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .8125rem;
}
.footer-bottom a { color: rgba(255,255,255,.7); }
.footer-bottom a:hover { color: #fff; }

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }

/* ---------- Planning Tools Additions ---------- */
.tool-panel { margin-bottom: 2rem; }
.tool-results { margin-top: 1.25rem; }
.tool-result-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .75rem; }
.tool-result-card { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: .9rem 1rem; background: #f7f9fc; display: grid; gap: .2rem; }
.tool-result-card strong { color: var(--color-primary); }
.tool-result-card span { font-weight: 700; }
.tool-result-card em { font-style: normal; font-size: .8125rem; }
.good-window { color: #2e7d60; }
.rough-window { color: #b45309; }
.resource-strip { background: linear-gradient(135deg, #f7f9fc 0%, #eef4fb 100%); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
