/* ==========================================================================
   Alarm.now redesign — PDFBEAR-style structure, Alarm.now colours.
   Brand accent stays #007bff (existing scheme). New components are prefixed
   `an-` so they never collide with the legacy inline CSS in base.html.
   ========================================================================== */
:root{
  --an-brand:#007bff;          /* existing primary link/accent  */
  --an-brand-dark:#0056b3;     /* existing hover                */
  --an-brand-wash:#eaf2ff;     /* light blue surface (same hue) */
  --an-ink:#2b2f36;
  --an-muted:#6c757d;
  --an-line:#e6eaf0;
  --an-surface:#ffffff;
  --an-surface-alt:#f7f9fc;
  --an-radius:8px;
  --an-maxw:1100px;   /* matches body{max-width:1100px} so header/footer align with content */
}

/* Offset the fixed header (overrides legacy `body{padding:0 !important}`). */
body{ padding-top:72px !important; background:var(--an-surface); color:var(--an-ink); }
/* Prevent the full-bleed footer's 100vw from creating a tiny horizontal scrollbar.
   Must be on <html>, NOT <body> (body is the 1100px column the footer bleeds out of). */
html{ overflow-x:hidden; }
.an-container{ max-width:var(--an-maxw); margin:0 auto; padding:0 18px; width:100%; }
*:focus-visible{ outline:3px solid var(--an-brand); outline-offset:2px; }

/* ---------- Header ---------------------------------------------------- */
.an-header{
  position:fixed; top:0; left:0; width:100%; height:72px; z-index:3050;
  background:#fff; border-bottom:3px solid var(--an-brand);
  box-shadow:0 2px 6px rgba(0,0,0,.06); display:flex; align-items:center;
}
.an-nav{ display:flex; align-items:center; justify-content:space-between; width:100%; gap:1rem; position:relative; }
.an-logo{ display:flex; align-items:center; flex:0 0 auto; }
.an-logo img{ height:42px; width:auto; display:block; }
.an-main{ position:absolute; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:1.4rem; }
.an-main a, .an-toolsbtn{ color:#333; font-weight:500; text-decoration:none; white-space:nowrap; background:none; border:0; cursor:pointer; font-size:1rem; display:inline-flex; align-items:center; gap:.4rem; }
.an-main a:hover, .an-toolsbtn:hover{ color:var(--an-brand); }
.an-toolsbtn .fa-chevron-down{ font-size:.78em; transition:transform .25s ease; }
.an-toolsbtn[aria-expanded="true"]{ color:var(--an-brand); }
.an-toolsbtn[aria-expanded="true"] .fa-chevron-down{ transform:rotate(180deg); }
.an-actions{ display:flex; align-items:center; gap:1rem; flex:0 0 auto; }
.an-actions .an-login{ color:#333; font-weight:600; text-decoration:none; }
.an-actions .an-login:hover{ color:var(--an-brand); }
.an-cta{ background:var(--an-brand); color:#fff !important; padding:.5rem 1.15rem; border-radius:6px; font-weight:600; text-decoration:none; transition:background .2s ease; display:inline-flex; align-items:center; gap:.45rem; }
.an-cta:hover{ background:var(--an-brand-dark); color:#fff; }
.an-burger{ display:none; background:none; border:0; color:#333; font-size:1.2rem; cursor:pointer; align-items:center; gap:.4rem; padding:8px; }

/* ---------- Mega-menu panel ------------------------------------------- */
.an-mega{
  position:fixed; top:72px; left:0; width:100%; bottom:0; overflow-y:auto;
  background:#fff; border-top:1px solid var(--an-line); box-shadow:0 8px 16px rgba(0,0,0,.06);
  z-index:3040; padding:1.75rem 0;
}
.an-mega-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:1.25rem 1.75rem; }
@media(min-width:992px){ .an-mega-grid{ grid-template-columns:repeat(5,1fr); } }
.an-col-title{ font-weight:700; color:#333; margin:0 0 .75rem; display:flex; align-items:center; gap:.5rem; font-size:.95rem; }
.an-col-title i{ color:var(--an-brand); }
.an-cards{ display:flex; flex-direction:column; gap:.25rem; }
.an-card{ display:flex; align-items:center; gap:.7rem; padding:.5rem .6rem; border-radius:var(--an-radius); color:#333; text-decoration:none; font-weight:400; }
.an-card:hover{ background:var(--an-brand-wash); color:var(--an-brand-dark); }
.an-card .an-ic{ color:var(--an-brand); width:22px; text-align:center; font-size:1.05rem; flex:0 0 auto; }
.an-card .an-card-name{ font-size:.92rem; line-height:1.15; }
.an-mega-foot{ text-align:center; margin-top:1.25rem; padding-top:1rem; border-top:1px solid var(--an-line); }
.an-mega-foot a{ color:var(--an-muted); text-decoration:none; font-size:.9rem; }
.an-mega-foot a:hover{ color:var(--an-brand); }

/* ---------- Mobile menu ----------------------------------------------- */
.an-mobile{ position:fixed; top:72px; left:0; width:100%; bottom:0; overflow-y:auto; background:#fff; z-index:3040; padding:1rem 0; }
.an-mobile .an-card{ font-size:1rem; }
.an-mobile .an-col-title{ margin-top:.5rem; }
.an-mobile-search{ padding:0 18px 1rem; }
.an-mobile-search .input-group .btn{ background:var(--an-brand); border-color:var(--an-brand); color:#fff; }

@media(max-width:991.98px){
  body{ padding-top:60px !important; }
  .an-header{ height:60px; }
  .an-mega,.an-mobile{ top:60px; }
  .an-main,.an-actions{ display:none !important; }
  .an-burger{ display:inline-flex; margin-left:auto; }
  .an-mega-grid{ grid-template-columns:1fr; }
  .an-logo img{ height:34px; }
}

/* ---------- Footer (3 tiers) ------------------------------------------ */
/* Full-bleed grey background (edge to edge), but the inner .container keeps the
   content in the same centered 1100px column as the rest of the site. */
.an-footer{
  max-width:none !important; box-sizing:border-box; text-align:left;
  width:100vw; margin:2.5rem calc(50% - 50vw) 0;
  background:var(--an-surface-alt); border-top:1px solid var(--an-line);
  padding:2.25rem 0 1.25rem; font-size:.95rem;
}
.an-footer h2,.an-footer .an-foot-h{ font-size:1rem; }
.an-foot-catalog{ display:grid; grid-template-columns:repeat(2,1fr); gap:1rem 1.5rem; }
@media(min-width:768px){ .an-foot-catalog{ grid-template-columns:repeat(5,1fr); } }
.an-foot-cols{ display:flex; flex-wrap:wrap; gap:1.5rem 1rem; margin-top:1.5rem; padding-top:1.5rem; border-top:1px solid var(--an-line); }
.an-foot-col{ flex:1 1 150px; min-width:140px; }
.an-foot-col .an-foot-h{ font-weight:700; color:#333; margin:0 0 .6rem; }
.an-foot-col ul{ list-style:none; padding:0; margin:0; }
.an-foot-col li{ margin-bottom:.35rem; }
.an-foot-col a{ color:var(--an-muted); text-decoration:none; }
.an-foot-col a:hover{ color:var(--an-brand); text-decoration:underline; }
.an-foot-brand{ flex:1 1 200px; min-width:180px; }
.an-foot-brand img{ height:38px; width:auto; }
.an-foot-brand p{ color:var(--an-muted); margin:.5rem 0 0; font-size:.88rem; }
.an-foot-bottom{ display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:.5rem; margin-top:1.25rem; padding-top:1rem; border-top:1px solid var(--an-line); color:var(--an-muted); font-size:.88rem; }
.an-foot-bottom .an-clock{ font-weight:700; color:var(--an-brand); }
.an-foot-legal{ display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; }
.an-foot-legal a{ color:var(--an-muted); text-decoration:none; }
.an-foot-legal a:hover{ color:var(--an-brand); text-decoration:underline; }

/* ---------- Home hero / SEO sections ---------------------------------- */
.an-hero{ text-align:center; padding:1.5rem 0 .5rem; }
.an-hero h1{ font-size:2.1rem; font-weight:800; margin:0 0 .5rem; letter-spacing:-.01em; }
.an-hero p.an-sub{ color:var(--an-muted); font-size:1.05rem; max-width:680px; margin:0 auto; }
.an-trust{ list-style:none; display:flex; flex-wrap:wrap; justify-content:center; gap:8px 12px; padding:0; margin:16px 0 0; }
.an-trust li{ display:inline-flex; align-items:center; gap:7px; color:#374151; background:#fff; border:1px solid var(--an-line); border-radius:999px; padding:6px 14px; font-weight:600; font-size:.9rem; }
.an-trust li i{ color:var(--an-brand); font-size:.9em; }
@media(max-width:575.98px){ .an-hero h1{ font-size:1.6rem; } .an-trust{ display:grid; grid-template-columns:1fr 1fr; } }

.an-section{ margin:2.5rem 0; }
.an-section > h2{ font-size:1.5rem; font-weight:700; margin:0 0 1rem; text-align:center; }
.an-feature-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:1rem; }
@media(min-width:768px){ .an-feature-grid{ grid-template-columns:repeat(4,1fr); } }
.an-feature{ display:block; border:1px solid var(--an-line); border-radius:var(--an-radius); padding:1.1rem; text-decoration:none; color:var(--an-ink); background:#fff; transition:border-color .2s ease, box-shadow .2s ease, transform .15s ease; }
.an-feature:hover{ border-color:var(--an-brand); transform:translateY(-2px); }
.an-feature .an-fic{ width:46px; height:46px; border-radius:50%; background:var(--an-brand-wash); color:var(--an-brand); display:inline-flex; align-items:center; justify-content:center; font-size:1.25rem; margin-bottom:.6rem; }
.an-feature h3{ font-size:1.02rem; font-weight:700; margin:0 0 .25rem; }
.an-feature p{ font-size:.88rem; color:var(--an-muted); margin:0; }

.an-steps{ display:grid; grid-template-columns:1fr; gap:1rem; }
@media(min-width:768px){ .an-steps{ grid-template-columns:repeat(3,1fr); } }
.an-step{ background:var(--an-surface-alt); border:1px solid var(--an-line); border-radius:var(--an-radius); padding:1.25rem; text-align:center; }
.an-step .an-step-n{ width:38px; height:38px; border-radius:50%; background:var(--an-brand); color:#fff; font-weight:700; display:inline-flex; align-items:center; justify-content:center; margin-bottom:.6rem; }
.an-step h3{ font-size:1.05rem; margin:0 0 .35rem; }
.an-step p{ color:var(--an-muted); font-size:.9rem; margin:0; }

.an-faq{ max-width:820px; margin:0 auto; }
.an-faq details{ border:1px solid var(--an-line); border-radius:var(--an-radius); padding:.85rem 1rem; margin-bottom:.6rem; background:#fff; }
.an-faq summary{ font-weight:600; cursor:pointer; list-style:none; }
.an-faq summary::-webkit-details-marker{ display:none; }
.an-faq summary::after{ content:"\002B"; float:right; color:var(--an-brand); font-weight:700; }
.an-faq details[open] summary::after{ content:"\2212"; }
.an-faq p{ margin:.6rem 0 0; color:var(--an-muted); }

/* ==========================================================================
   Alarm interface polish (homepage hero + Create New Alarm panel).
   Loaded after main.html's inline <style>, so these override it. Brand blue only.
   ========================================================================== */
/* Re-tune the alarm design tokens to the brand palette */
:root{
  --alarm-btn-set-bg:#007bff; --alarm-btn-set-hover:#0056b3;
  --alarm-border:#dbe3ee; --alarm-secondary-text:#5a6677;
}

/* Hero band: soft blue gradient card instead of flat grey */
.home-clock-section{
  background:linear-gradient(135deg,#eaf2ff 0%,#f6faff 55%,#ffffff 100%) !important;
  border:1px solid #e3ebf7; border-radius:18px !important;
  box-shadow:0 14px 36px rgba(0,80,180,.07) !important; padding:34px 30px !important;
}
#home-greeting{ font-weight:700 !important; color:#1f2733 !important; }
.home-clock-details-new p,.home-clock-details p{ color:#5a6677 !important; }

/* Flip clock: deep navy with a blue-accent colon */
.home-clock-details-column .flip-clock-container{
  background:linear-gradient(180deg,#1c2535 0%,#0f1622 100%) !important;
  border-radius:14px !important; padding:16px 14px !important;
  box-shadow:0 12px 26px rgba(15,22,32,.30), 0 1px 0 rgba(255,255,255,.06) inset !important;
}
.time-part{
  background:linear-gradient(180deg,#2b3647 0%,#1b2433 100%) !important; color:#f2f6fc !important;
  border-radius:10px !important; box-shadow:0 2px 6px rgba(0,0,0,.45) inset, 0 1px 0 rgba(255,255,255,.05) !important;
}
.flip-clock-separator{ color:#4f8be0 !important; }

/* 24/12 toggle + fullscreen link */
.time-format-switch{ border:1px solid #dbe3ee !important; border-radius:9px !important; box-shadow:0 1px 2px rgba(0,0,0,.04); }
.btn-format{ font-weight:600 !important; }
.btn-format.active{ background:var(--an-brand) !important; }
.fullscreen-action a{ font-weight:600 !important; }
.fullscreen-action a .fa-expand{ margin-left:4px; font-size:.85em; }

/* Create-New-Alarm card */
.alarm-panel-wrapper{
  background:#fff !important; border:1px solid #e6edf7 !important; border-radius:18px !important;
  box-shadow:0 14px 38px rgba(0,80,180,.08) !important; padding:1.85rem !important;
}
.alarm-section-title{
  border-bottom:none !important; position:relative; padding-bottom:16px !important;
  font-size:1.35rem !important; font-weight:700 !important; color:#1f2733 !important;
}
.alarm-section-title::after{
  content:""; position:absolute; left:50%; bottom:0; transform:translateX(-50%);
  width:56px; height:3px; border-radius:3px; background:var(--an-brand);
}

/* Inputs & selects: rounded, brand focus ring */
#alarm-set-view select, #alarm-set-view input[type="text"], .alarm-sound-select-wrapper select{
  border:1.5px solid #dbe3ee !important; border-radius:10px !important; background:#fff !important;
  color:#1f2733 !important; transition:border-color .15s ease, box-shadow .15s ease;
}
#alarm-set-view select:focus, #alarm-set-view input[type="text"]:focus, .alarm-sound-select-wrapper select:focus{
  border-color:var(--an-brand) !important; box-shadow:0 0 0 3px rgba(0,123,255,.16) !important; outline:none !important;
}
.alarm-time-selects-group{ gap:10px !important; }
.alarm-time-selects-group select{
  font-size:1.45rem !important; font-weight:700 !important; padding:10px 12px !important;
  min-width:84px !important; background:#f7f9fc !important; cursor:pointer; color:#1f2733 !important;
}
.alarm-time-selects-group select#alarm-ampm{ min-width:76px !important; font-size:1.15rem !important; }
.alarm-inputs-colon{ font-size:1.6rem !important; font-weight:800 !important; color:#9aa7b8 !important; }
#alarm-label-input{ background:#f7f9fc !important; padding:11px 14px !important; font-size:.95rem !important; }
.alarm-sound-select-wrapper label{ font-weight:600 !important; color:#5a6677 !important; }

/* Buttons */
#alarm-set-view .alarm-form-controls button{ padding:11px 20px !important; font-size:.9rem !important; font-weight:600 !important; gap:.45rem; }
#btn-set-alarm{
  background:linear-gradient(135deg,#2b8cff 0%,#007bff 100%) !important; border:none !important; color:#fff !important;
  box-shadow:none !important;
}
#btn-set-alarm:hover{ background:linear-gradient(135deg,#1f7ff0 0%,#0062cc 100%) !important; transform:translateY(-1px); }
#btn-test-sound{ background:#fff !important; color:var(--an-brand) !important; border:2px solid #cfe0f7 !important; }
#btn-test-sound:hover{ background:var(--an-brand-wash) !important; border-color:var(--an-brand) !important; }
.alarm-form-controls .btn-icon{ font-size:.95em; }

/* Saved-alarms list: lighter card look + brand action buttons */
#alarm-list .alarm-item, .alarm-list-item{ border:1px solid #e6edf7 !important; border-radius:12px !important; box-shadow:0 4px 14px rgba(0,80,180,.05); }
.alarm-list-actions button{ border-radius:8px !important; }

/* ==========================================================================
   Site-wide tweaks: no hover shadows + pills -> rounded squares.
   ========================================================================== */
/* (1) No shadow on mouseover anywhere (resting shadows are kept). */
.tag:hover, .tags-list .tag:hover, .city-tag:hover,
.alarm-pills-list li a:hover, .related-alarms-list li a:hover,
.share-option-btn:hover, .alarm-list-actions button:hover,
.an-card:hover, .an-feature:hover, .nav-link:hover, .btn-format:hover{
  box-shadow:none !important;
}

/* (2) Pills -> squares with softly rounded edges (8px) across the whole site. */
.an-trust li,
.tag, .tags-list .tag,
.alarm-pills-list li a, .related-alarms-list li a,
#alarm-set-view .alarm-form-controls button,
#btn-set-alarm, #btn-test-sound, #btn-share-form-alarm, #btn-delete-form-alarm,
.alarm-list-actions button, .share-option-btn, #btn-delete-all-alarms,
.btn-format, .time-format-switch,
.snooze-btn, .stop-alarm-btn, .alarm-modal button{
  border-radius:8px !important;
}

/* ==========================================================================
   Alignment + breadcrumb tweaks.
   ========================================================================== */
/* Unify the content column to 1100px everywhere so the top nav, breadcrumb,
   hero and the timebox/app all line up (Bootstrap .container is otherwise
   only 960px at the ~lg breakpoint, indenting main content vs the header). */
.container{ max-width:1100px !important; }
.an-container{ padding-left:12px; padding-right:12px; }
.page-title-container{ padding-left:12px !important; padding-right:12px !important; }

/* Breadcrumb: white background, home icon, arrow ( -> ) separators */
.breadcrumb-container{ background:#fff !important; padding:8px 12px !important; max-width:1100px !important; }
.breadcrumb-container .breadcrumb{ align-items:center; padding-left:0 !important; margin-bottom:0 !important; background:transparent !important; }
.breadcrumb-item + .breadcrumb-item{ padding-left:.5rem; }
.breadcrumb-item + .breadcrumb-item::before{ content:"\2192" !important; color:#9aa7b8; padding-right:.5rem; font-weight:600; }
.breadcrumb-item .bc-home{ display:inline-flex; align-items:center; font-size:1rem; }
.breadcrumb-item .bc-home i{ color:var(--an-brand); }

/* Mobile: keep the breadcrumb on a single line and truncate the current page
   title with an ellipsis instead of letting it wrap onto extra rows. */
@media (max-width: 575.98px){
  .breadcrumb-container{ padding:6px 12px !important; }
  .breadcrumb-container .breadcrumb{ flex-wrap:nowrap; font-size:.82rem; }
  .breadcrumb-item{ flex:0 0 auto; }
  .breadcrumb-item.active{ flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
}

/* ---- Hero banner width: match the content boxes (timebox etc.) ----------
   The blue banner was the full-width .container; move the blue box onto the
   inner .page-title-layout so it sits inside the same 12px gutter as the
   timebox/content cards and lines up with them. */
.page-title-container{ background:transparent !important; border:none !important; padding-top:0 !important; padding-bottom:0 !important; }
.page-title-layout{ background:#e7f5ff !important; border:1px solid #b3daff !important; border-radius:12px !important; padding:30px 32px !important; margin:0 !important; }
