/*
Theme Name: Across the Ages Child
Theme URI: https://www.acrosstheagesapp.com/
Description: Custom Beaver Builder child theme for the Across the Ages app website.
Author: Across the Ages
Template: bb-theme
Version: 1.1.0
Text Domain: across-the-ages-child
*/

:root {
  --ata-blue: #0f5f9f;
  --ata-blue-deep: #083b63;
  --ata-blue-dark: #062f50;
  --ata-orange: #f7a340;
  --ata-purple: #775ed7;
  --ata-teal: #2ca6a0;
  --ata-ink: #173044;
  --ata-muted: #637788;
  --ata-border: rgba(15, 95, 159, 0.14);
  --ata-shadow: 0 16px 40px rgba(8, 59, 99, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--ata-ink);
  background: #fff;
}

.fl-page {
  width: 100%;
}

.fl-page-content {
  background: #fff;
}

/* Remove default page-title and sidebar artifacts from the parent theme. */
.fl-page-header-primary,
.fl-page-nav-search,
.fl-page-footer-widgets,
.fl-sidebar,
.widget_archive,
.widget_categories {
  display: none !important;
}

body.home .fl-content-full.container,
body.page-template-template-full-width .fl-content-full.container,
body.page .fl-content-full.container {
  width: 100%;
  max-width: none;
  padding: 0;
}

body.home .fl-content,
body.page-template-template-full-width .fl-content,
body.page .fl-content {
  margin: 0;
  padding: 0;
}

body.home .fl-post-header,
body.page-template-template-full-width .fl-post-header,
body.page .fl-post-header {
  display: none;
}

/* Header */
.ata-site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--ata-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: box-shadow .2s ease, background .2s ease;
}

.admin-bar .ata-site-header {
  top: 32px;
}

.ata-site-header.is-scrolled {
  box-shadow: 0 10px 30px rgba(8,59,99,.10);
}

.ata-header-inner {
  max-width: 1180px;
  min-height: 82px;
  padding: 0 24px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.ata-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ata-ink);
  text-decoration: none;
  flex-shrink: 0;
}

.ata-brand:hover,
.ata-brand:focus {
  color: var(--ata-ink);
  text-decoration: none;
}

.ata-brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
}

.ata-brand-name {
  font-size: 21px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.02em;
}

.ata-brand-tagline {
  display: block;
  margin-top: 3px;
  color: var(--ata-muted);
  font-size: 12px;
  font-weight: 600;
}

.ata-nav-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.ata-main-nav ul {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}

.ata-main-nav a {
  color: #334b5d;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: color .2s ease;
}

.ata-main-nav a:hover,
.ata-main-nav a:focus,
.ata-main-nav .current-menu-item > a,
.ata-main-nav .current_page_item > a {
  color: var(--ata-blue);
}

.ata-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ata-blue), #2c84c4);
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(15,95,159,.22);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.ata-header-cta:hover,
.ata-header-cta:focus {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15,95,159,.28);
  color: #fff;
  text-decoration: none;
}

.ata-mobile-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #eef5fa;
  cursor: pointer;
}

.ata-mobile-toggle span,
.ata-mobile-toggle span::before,
.ata-mobile-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--ata-blue-dark);
  content: "";
  transition: transform .2s ease, opacity .2s ease;
}

.ata-mobile-toggle span::before {
  transform: translateY(-7px);
}

.ata-mobile-toggle span::after {
  transform: translateY(5px);
}

.ata-mobile-toggle[aria-expanded="true"] span {
  background: transparent;
}

.ata-mobile-toggle[aria-expanded="true"] span::before {
  transform: translateY(0) rotate(45deg);
}

.ata-mobile-toggle[aria-expanded="true"] span::after {
  transform: translateY(-2px) rotate(-45deg);
}

/* Footer */
.ata-site-footer {
  margin-top: 0;
  color: rgba(255,255,255,.82);
  background:
    radial-gradient(circle at 85% 0%, rgba(119,94,215,.32), transparent 34%),
    linear-gradient(135deg, var(--ata-blue-dark), #082c48 62%, #102e57);
}

.ata-footer-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 68px 24px 42px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 46px;
}

.ata-footer-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 16px;
  margin-bottom: 18px;
}

.ata-footer-brand h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.ata-footer-brand p {
  max-width: 360px;
  margin: 0;
  line-height: 1.7;
}

.ata-footer-column h3 {
  margin: 4px 0 18px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ata-footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ata-footer-column li + li {
  margin-top: 12px;
}

.ata-footer-column a {
  color: rgba(255,255,255,.78);
  text-decoration: none;
}

.ata-footer-column a:hover,
.ata-footer-column a:focus {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.ata-footer-cta {
  padding: 24px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 20px;
  background: rgba(255,255,255,.08);
}

.ata-footer-cta p {
  margin: 0 0 18px;
  line-height: 1.6;
}

.ata-footer-cta .ata-header-cta {
  width: 100%;
  background: #fff;
  color: var(--ata-blue-dark) !important;
  box-shadow: none;
}

.ata-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
}

.ata-footer-bottom-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px 26px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: rgba(255,255,255,.62);
  font-size: 13px;
}

.ata-footer-legal {
  display: flex;
  gap: 18px;
}

.ata-footer-legal a {
  color: inherit;
  text-decoration: none;
}

.ata-footer-legal a:hover {
  color: #fff;
}

/* Focus styles */
.ata-main-nav a:focus-visible,
.ata-brand:focus-visible,
.ata-header-cta:focus-visible,
.ata-mobile-toggle:focus-visible,
.ata-footer-column a:focus-visible {
  outline: 3px solid var(--ata-orange);
  outline-offset: 4px;
}

/* Responsive */
@media (max-width: 980px) {
  .ata-mobile-toggle {
    display: block;
  }

  .ata-nav-wrap {
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    margin: 0;
    padding: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    border: 1px solid var(--ata-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--ata-shadow);
  }

  .ata-nav-wrap.is-open {
    display: flex;
  }

  .ata-main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .ata-main-nav li {
    border-bottom: 1px solid #edf2f6;
  }

  .ata-main-nav li:last-child {
    border-bottom: 0;
  }

  .ata-main-nav a {
    display: block;
    padding: 13px 4px;
    font-size: 16px;
  }

  .ata-footer-main {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 782px) {
  .admin-bar .ata-site-header {
    top: 46px;
  }
}

@media (max-width: 640px) {
  .ata-header-inner {
    min-height: 72px;
    padding: 0 16px;
  }

  .ata-brand-logo {
    width: 42px;
    height: 42px;
  }

  .ata-brand-name {
    font-size: 18px;
  }

  .ata-brand-tagline {
    display: none;
  }

  .ata-footer-main {
    padding-top: 52px;
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .ata-footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .ata-footer-legal {
    flex-wrap: wrap;
  }
}
