:root {
  --afti-primary: #011b36;
  --afti-primary-deep: #073b66;
  --afti-link: #0a6ea8;
  --afti-cyan: #138fcc;
  --afti-accent: #d4a638;
  --afti-background: #f7f9fc;
  --afti-surface: #fff;
  --afti-text: #182230;
  --afti-muted: #5d6b7a;
  --afti-border: #d0d5dd;
  --afti-font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --afti-container: 1280px;
  --afti-shadow-sm: 0 5px 18px rgba(1,27,54,.08);
  --afti-shadow-md: 0 16px 40px rgba(1,27,54,.13);
}
body.afti-template-page .page-title-bar,
body.afti-template-page #page-footer-wrapper,
body.afti-template-page #page-footer,
body.afti-template-page .page-footer-wrapper,
body.afti-template-page .page-footer { display: none !important; }
body.afti-template-page #page-content,
body.afti-template-page .page-content { padding-top: 0 !important; padding-bottom: 0 !important; }
body.afti-template-page #page-content > .container,
body.afti-template-page .page-content > .container { width: 100% !important; max-width: none !important; padding: 0 !important; }
body.afti-template-page #page-content .row { margin: 0 !important; }
body.afti-template-page #page-main-content,
body.afti-template-page .page-main-content { width: 100% !important; max-width: none !important; flex: 0 0 100% !important; padding: 0 !important; }
body.afti-template-page article.page { margin: 0 !important; }
body.afti-template-page .elementor {
  overflow: clip;
  color: var(--afti-text);
  font-family: var(--afti-font);
}
body.afti-template-page .elementor a { color: var(--afti-link); }
body.afti-template-page .elementor img { max-width: 100%; }
.afti-template-page .e-con.afti-section,
.afti-template-page .afti-section.e-con {
  width: min(calc(100% - 40px), var(--afti-container));
  max-width: var(--afti-container);
  margin-inline: auto;
  padding-block: 72px;
}
.afti-center { text-align: center; }
.afti-eyebrow p,
.afti-eyebrow .elementor-heading-title {
  margin: 0 0 9px;
  color: var(--afti-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.afti-section-title .elementor-heading-title {
  color: var(--afti-primary);
  font-size: clamp(30px, 3vw, 43px);
  line-height: 1.14;
  letter-spacing: -.03em;
}
.afti-section-subtitle { max-width: 720px; margin: 0 auto 30px; color: var(--afti-muted); font-size: 16px; }

/* Hero */
.afti-home-hero {
  width: 100% !important;
  max-width: none !important;
  background: linear-gradient(132deg, #fff 0 48%, #eaf4fb 48% 100%);
}
.afti-hero-inner {
  width: min(100%, 1540px) !important;
  min-height: 610px;
  margin: 0 auto;
  align-items: stretch !important;
}
.afti-hero-copy-column {
  justify-content: center;
  padding: 70px 56px max(70px, 6vw) max(40px, calc((100vw - var(--afti-container))/2));
}
.afti-hero-title .elementor-heading-title {
  max-width: 650px;
  color: var(--afti-primary);
  font-size: clamp(46px, 5.2vw, 76px);
  line-height: 1.01;
  letter-spacing: -.05em;
}
.afti-hero-title .elementor-heading-title span { color: var(--afti-accent); }
.afti-hero-copy { max-width: 610px; margin-top: 18px; color: var(--afti-muted); font-size: 18px; line-height: 1.58; }
.afti-button-row { margin-top: 24px; }
.afti-button-primary .elementor-button,
.afti-button-secondary .elementor-button,
.afti-route-card-button .elementor-button {
  min-height: 48px;
  border-radius: 7px;
  padding: 14px 24px;
  font-weight: 750;
  transition: transform .2s ease, box-shadow .2s ease;
}
.afti-button-primary .elementor-button { background: var(--afti-primary); color: #fff; box-shadow: 0 8px 20px rgba(1,27,54,.16); }
.afti-button-secondary .elementor-button { border: 1px solid var(--afti-accent); background: #fff; color: var(--afti-primary); }
.afti-button-primary .elementor-button:hover,
.afti-button-secondary .elementor-button:hover { transform: translateY(-2px); }
.afti-hero-media-column { position: relative; min-height: 610px; overflow: hidden; }
.afti-hero-image,
.afti-hero-image .elementor-widget-container,
.afti-hero-image img { width: 100%; height: 100%; }
.afti-hero-image img { min-height: 610px; object-fit: cover; object-position: center; border-radius: 0 0 0 150px; }
.afti-hero-badge { position: absolute !important; top: 34px; right: 34px; width: 158px !important; z-index: 5; }
.afti-hero-badge img { border-radius: 50%; box-shadow: var(--afti-shadow-md); }

/* Benefits */
.afti-benefits-shell { width: min(calc(100% - 40px), var(--afti-container)); margin: -18px auto 0; position: relative; z-index: 7; }
.afti-benefits-strip { overflow: hidden; border-radius: 0 20px 20px 0; background: #fff; box-shadow: var(--afti-shadow-sm); }
.afti-benefit-item { min-width: 0; padding: 20px 24px; border-right: 1px solid #e4e9ef; }
.afti-benefit-item:last-child { border-right: 0; }
.afti-benefit-item .elementor-heading-title { color: var(--afti-primary); font-size: 14px; }
.afti-benefit-item .elementor-widget-text-editor { margin-top: 4px; color: var(--afti-muted); font-size: 12px; }

/* Course widgets */
.afti-courses-section { background: #fff; }
.afti-course-grid {
  display: grid;
  grid-template-columns: repeat(var(--afti-grid-columns, 3), minmax(0, 1fr));
  gap: 22px;
}
.afti-course-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(1,27,54,.12);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--afti-shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.afti-course-card:hover { transform: translateY(-4px); box-shadow: var(--afti-shadow-md); }
.afti-course-card-image { position: relative; display: block; aspect-ratio: 16/10; overflow: hidden; background: #e3edf5; }
.afti-course-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.afti-course-card:hover .afti-course-card-image img { transform: scale(1.035); }
.afti-course-card-image > span { position: absolute; top: 12px; left: 12px; border-radius: 999px; background: var(--afti-link); color: #fff; padding: 5px 10px; font-size: 11px; font-weight: 750; }
.afti-course-card-body { padding: 18px; }
.afti-course-card h3 { min-height: 45px; margin: 0 0 14px; color: var(--afti-primary); font-size: 17px; line-height: 1.3; }
.afti-course-card h3 a { color: inherit !important; }
.afti-course-instructor { display: flex; align-items: center; gap: 8px; color: var(--afti-muted); font-size: 12px; }
.afti-course-instructor img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.afti-course-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; min-height: 22px; margin-top: 13px; color: var(--afti-muted); font-size: 11px; }
.afti-stars { color: #e0a023; letter-spacing: .04em; }
.afti-stars small { color: var(--afti-muted); letter-spacing: 0; }
.afti-course-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; color: var(--afti-primary); font-size: 19px; }
.afti-course-card-footer > a { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid #9fb1c5; border-radius: 7px; color: var(--afti-primary) !important; }
.afti-price-free { font-size: 15px; }
.afti-state { border: 1px dashed var(--afti-border); border-radius: 12px; background: #fff; padding: 28px; text-align: center; color: var(--afti-muted); }
.afti-state-warning { border-color: #e6c56e; background: #fffaf0; }

/* Routes, instructors, stats */
.afti-routes-section { background: var(--afti-background); }
.afti-route-grid { margin-top: 32px; }
.afti-route-card {
  min-height: 178px;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(1,27,54,.98), rgba(7,59,102,.94)), url('../images/route.jpg') center/cover;
  padding: 24px;
  box-shadow: var(--afti-shadow-sm);
}
.afti-route-card-title .elementor-heading-title { color: #fff; font-size: 20px; line-height: 1.22; }
.afti-route-card-meta { color: rgba(255,255,255,.75); font-size: 13px; }
.afti-route-card-button .elementor-button { min-height: 38px; background: transparent; color: #fff; padding: 8px 0; }
.afti-instructor-grid { margin-top: 32px; }
.afti-instructor-card { overflow: hidden; border: 1px solid rgba(1,27,54,.1); border-radius: 12px; background: #fff; box-shadow: var(--afti-shadow-sm); text-align: center; }
.afti-instructor-image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.afti-instructor-name .elementor-heading-title { color: var(--afti-primary); font-size: 17px; }
.afti-instructor-name { margin-top: 14px; }
.afti-instructor-role { margin-bottom: 16px; color: var(--afti-muted); font-size: 12px; }
.afti-stats-section { padding-top: 0 !important; }
.afti-stats-panel { overflow: hidden; border-radius: 12px; background: linear-gradient(135deg, var(--afti-primary), var(--afti-primary-deep)); color: #fff; }
.afti-stat-item { padding: 26px 32px; border-right: 1px solid rgba(255,255,255,.18); text-align: center; }
.afti-stat-item:last-child { border-right: 0; }
.afti-stat-value .elementor-heading-title { color: #fff; font-size: 32px; }
.afti-stat-label { color: rgba(255,255,255,.8); font-size: 13px; }

/* Home bottom */
.afti-bottom-section { align-items: stretch !important; }
.afti-bottom-column { min-width: 0; border-right: 1px solid #e5e9ee; padding-right: 32px; }
.afti-bottom-column:last-child { border-right: 0; padding-right: 0; }
.afti-bottom-title .elementor-heading-title { color: var(--afti-primary); font-size: 29px; line-height: 1.2; }
.afti-testimonial-copy blockquote { margin: 22px 0; border: 0; padding: 0; color: var(--afti-muted); font-size: 16px; font-style: normal; }
.afti-faq-toggle .elementor-tab-title,
.afti-contact-faq-toggle .elementor-tab-title { border: 1px solid #e0e5ea; border-radius: 7px; margin-bottom: 8px; background: #fff; color: var(--afti-primary); font-weight: 700; }
.afti-faq-toggle .elementor-tab-content,
.afti-contact-faq-toggle .elementor-tab-content { border: 0; color: var(--afti-muted); }
.afti-bottom-cta { position: relative; overflow: hidden; border-radius: 16px; background: #f5f7fa; padding: 26px !important; }
.afti-cta-image { margin: 20px -26px -26px auto; width: 66%; }
.afti-cta-image img { width: 100%; max-height: 280px; object-fit: contain; object-position: bottom right; }

/* Catalog */
.afti-catalog-hero { width: min(calc(100% - 40px), var(--afti-container)); margin: 0 auto; padding: 54px 0 28px; }
.afti-catalog-title .elementor-heading-title { color: var(--afti-primary); font-size: clamp(40px, 4vw, 60px); letter-spacing: -.04em; }
.afti-catalog-intro { max-width: 740px; color: var(--afti-muted); font-size: 17px; }
.afti-catalog-logo { max-width: 150px; margin-left: auto; }
.afti-catalog-logo img { border-radius: 50%; }
.afti-catalog-content { padding-top: 25px !important; }
.afti-catalog-toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) 220px 190px auto; gap: 14px; margin-bottom: 28px; }
.afti-catalog-toolbar input,
.afti-catalog-toolbar select { width: 100%; min-height: 50px; border: 1px solid var(--afti-border); border-radius: 8px; background: #fff; padding: 0 15px; color: var(--afti-text); }
.afti-catalog-toolbar button { min-height: 50px; border: 0; border-radius: 8px; background: var(--afti-primary); color: #fff; padding: 0 24px; font-weight: 750; }
.afti-catalog-layout { display: grid; gap: 28px; }
.afti-catalog-layout.has-sidebar { grid-template-columns: 230px minmax(0,1fr); }
.afti-catalog-sidebar { align-self: start; position: sticky; top: 100px; border: 1px solid var(--afti-border); border-radius: 12px; background: #fff; padding: 22px; }
.afti-catalog-sidebar h3 { margin: 0 0 22px; color: var(--afti-primary); font-size: 22px; }
.afti-catalog-sidebar h4 { margin: 18px 0 10px; color: var(--afti-primary); font-size: 14px; }
.afti-catalog-sidebar ul { margin: 0; padding: 0; list-style: none; }
.afti-catalog-sidebar li { margin: 0 0 9px; }
.afti-catalog-sidebar a { display: flex; justify-content: space-between; color: var(--afti-muted) !important; font-size: 13px; }
.afti-clear-filters { justify-content: center !important; margin-top: 22px; border: 1px solid var(--afti-primary); border-radius: 7px; padding: 10px; color: var(--afti-primary) !important; font-weight: 700; }
.afti-result-count { margin: 0 0 16px; color: var(--afti-muted); font-size: 13px; }
.afti-pagination { margin-top: 36px; }
.afti-pagination .page-numbers { display: flex; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.afti-pagination a,
.afti-pagination span { display: grid; min-width: 38px; height: 38px; place-items: center; border: 1px solid var(--afti-border); border-radius: 7px; background: #fff; color: var(--afti-primary) !important; }
.afti-pagination .current { background: var(--afti-primary); color: #fff !important; }

/* Contact */
.afti-contact-hero { width: min(calc(100% - 40px), var(--afti-container)); margin: 0 auto; align-items: center !important; gap: 54px; padding: 68px 0; }
.afti-contact-title .elementor-heading-title { color: var(--afti-primary); font-size: clamp(42px, 4.5vw, 66px); letter-spacing: -.04em; }
.afti-contact-intro { max-width: 650px; color: var(--afti-muted); font-size: 18px; }
.afti-contact-hero-image { max-width: 520px; overflow: hidden; border-radius: 22px; box-shadow: var(--afti-shadow-md); }
.afti-contact-hero-image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.afti-contact-card-grid { margin-top: 28px; gap: 14px; }
.afti-contact-card { border: 1px solid var(--afti-border); border-radius: 10px; background: #fff; padding: 18px; }
.afti-contact-card .elementor-heading-title { color: var(--afti-primary); font-size: 16px; }
.afti-contact-card .elementor-widget-text-editor { color: var(--afti-muted); font-size: 13px; }
.afti-contact-content { align-items: flex-start !important; }
.afti-contact-form-panel,
.afti-contact-faq-panel { border: 1px solid var(--afti-border); border-radius: 16px; background: #fff; padding: 32px; box-shadow: var(--afti-shadow-sm); }
.afti-contact-form-title .elementor-heading-title,
.afti-contact-faq-title .elementor-heading-title { color: var(--afti-primary); font-size: 31px; }
.afti-contact-form-intro { color: var(--afti-muted); }
.afti-contact-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 24px; }
.afti-contact-form label { display: grid; gap: 7px; color: var(--afti-primary); font-weight: 700; }
.afti-contact-form label:nth-child(3),
.afti-contact-form label:nth-child(4),
.afti-contact-form button,
.afti-contact-form .afti-form-note { grid-column: 1/-1; }
.afti-contact-form input,
.afti-contact-form textarea { width: 100%; border: 1px solid var(--afti-border); border-radius: 8px; background: #fff; padding: 12px 14px; color: var(--afti-text); font: inherit; }
.afti-contact-form button { min-height: 50px; border: 0; border-radius: 8px; background: var(--afti-primary); color: #fff; font-weight: 750; }
.afti-form-note { margin: 0; color: #a46700; font-size: 12px; }

/* Shared footer */
.afti-footer-slot { width: 100% !important; max-width: none !important; }
.afti-footer-slot > .elementor-element,
.afti-shared-footer-shortcode,
.afti-shared-footer-shortcode > .elementor-widget-container { width: 100%; }
.afti-footer-newsletter-shell { width: 100% !important; max-width: none !important; background: #fff; padding: 26px 20px 10px; }
.afti-shared-newsletter { width: min(100%, var(--afti-container)) !important; margin: 0 auto; border-radius: 12px; background: linear-gradient(135deg, var(--afti-primary), var(--afti-primary-deep)); padding: 22px 30px; color: #fff; }
.afti-newsletter-mark { width: 76px; flex: 0 0 76px; }
.afti-newsletter-mark img { border-radius: 50%; background: #fff; }
.afti-newsletter-title .elementor-heading-title { color: #fff; font-size: 22px; }
.afti-newsletter-copy { color: rgba(255,255,255,.78); font-size: 13px; }
.afti-newsletter-form-wrap { min-width: 380px; }
.afti-newsletter-form { display: flex; overflow: hidden; border-radius: 7px; background: #fff; }
.afti-newsletter-form input { flex: 1; min-width: 0; min-height: 48px; border: 0; padding: 0 15px; }
.afti-newsletter-form button { flex: 0 0 auto; border: 0; background: var(--afti-accent); color: #fff; padding: 0 24px; font-weight: 750; }
.afti-footer-main-shell { width: 100% !important; max-width: none !important; background: linear-gradient(135deg, #011b36, #062f55); padding: 55px 20px 42px; }
.afti-shared-footer-main { width: min(100%, var(--afti-container)) !important; margin: 0 auto; align-items: flex-start !important; }
.afti-footer-logo { max-width: 190px; }
.afti-footer-description { color: rgba(255,255,255,.74); font-size: 13px; line-height: 1.75; }
.afti-footer-description a,
.afti-footer-links a { color: rgba(255,255,255,.84) !important; }
.afti-footer-heading .elementor-heading-title { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; }
.afti-footer-links { color: rgba(255,255,255,.72); font-size: 13px; line-height: 2; }
.afti-footer-copyright-shell { width: 100% !important; max-width: none !important; border-top: 1px solid rgba(255,255,255,.12); background: #011b36; padding: 14px 20px; }
.afti-footer-copyright { width: min(100%, var(--afti-container)); margin: 0 auto; color: rgba(255,255,255,.66); text-align: center; font-size: 12px; }
.afti-footer-error { padding: 20px; background: #fff5f5; color: #9b1c1c; }

/* Focus and editor safety */
.afti-template-page a:focus-visible,
.afti-template-page button:focus-visible,
.afti-template-page input:focus-visible,
.afti-template-page select:focus-visible,
.afti-template-page textarea:focus-visible { outline: 3px solid rgba(19,143,204,.38); outline-offset: 3px; }
.elementor-editor-active .afti-footer-slot { outline: 2px dashed rgba(212,166,56,.55); outline-offset: -2px; }

@media (max-width: 1200px) {
  .afti-course-grid { grid-template-columns: repeat(min(var(--afti-grid-columns,3), 3), minmax(0,1fr)); }
  .afti-hero-copy-column { padding-left: 36px; }
  .afti-contact-hero { gap: 32px; }
}
@media (max-width: 1023px) {
  .afti-hero-inner { flex-direction: column !important; }
  .afti-hero-copy-column { padding: 56px 28px; }
  .afti-hero-media-column { min-height: 430px; }
  .afti-hero-image img { min-height: 430px; border-radius: 0; }
  .afti-benefits-shell { margin-top: 20px; }
  .afti-benefits-strip { flex-wrap: wrap !important; border-radius: 14px; }
  .afti-benefit-item { width: calc(50% - 4px) !important; border-bottom: 1px solid #e4e9ef; }
  .afti-route-grid,
  .afti-instructor-grid,
  .afti-bottom-section,
  .afti-contact-hero,
  .afti-contact-content,
  .afti-shared-footer-main { flex-direction: column !important; }
  .afti-bottom-column { width: 100% !important; border-right: 0; border-bottom: 1px solid #e5e9ee; padding: 0 0 30px; }
  .afti-bottom-column:last-child { border-bottom: 0; }
  .afti-catalog-toolbar { grid-template-columns: 1fr 1fr; }
  .afti-catalog-layout.has-sidebar { grid-template-columns: 1fr; }
  .afti-catalog-sidebar { position: static; }
  .afti-contact-hero-image { max-width: none; }
  .afti-contact-card-grid { flex-direction: column !important; }
  .afti-newsletter-form-wrap { min-width: 0; width: 100%; }
}
@media (max-width: 767px) {
  .afti-template-page .e-con.afti-section,
  .afti-template-page .afti-section.e-con,
  .afti-contact-hero,
  .afti-catalog-hero { width: min(calc(100% - 30px), var(--afti-container)); padding-block: 48px; }
  .afti-hero-copy-column { padding: 44px 20px; }
  .afti-hero-title .elementor-heading-title { font-size: clamp(42px, 12vw, 58px); }
  .afti-hero-copy { font-size: 16px; }
  .afti-button-row { flex-direction: column !important; }
  .afti-button-row .elementor-widget-button { width: 100%; }
  .afti-button-row .elementor-button { width: 100%; }
  .afti-hero-media-column { min-height: 340px; }
  .afti-hero-image img { min-height: 340px; }
  .afti-hero-badge { top: 18px; right: 18px; width: 104px !important; }
  .afti-benefit-item { width: 100% !important; border-right: 0; }
  .afti-course-grid { grid-template-columns: 1fr; }
  .afti-stat-item { width: 100% !important; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
  .afti-catalog-header-inner { align-items: flex-start !important; }
  .afti-catalog-logo { max-width: 104px; margin: 10px 0 0; }
  .afti-catalog-toolbar { grid-template-columns: 1fr; }
  .afti-contact-form { grid-template-columns: 1fr; }
  .afti-contact-form label { grid-column: 1/-1; }
  .afti-contact-form-panel,
  .afti-contact-faq-panel { padding: 22px; }
  .afti-shared-newsletter { padding: 22px; }
  .afti-newsletter-form { flex-direction: column; background: transparent; gap: 10px; }
  .afti-newsletter-form input,
  .afti-newsletter-form button { width: 100%; min-height: 48px; border-radius: 7px; }
  .afti-footer-main-shell { padding-top: 42px; }
}

/* 0.2.1 compatibility hardening: Edumall/Elementor must not override the approved Fénix baseline. */
body.afti-template-page .afti-hero-title .elementor-heading-title {
  color: var(--afti-primary) !important;
}
body.afti-template-page .afti-hero-title .elementor-heading-title span {
  color: var(--afti-accent) !important;
}
body.afti-template-page .afti-button-primary .elementor-button {
  border-color: var(--afti-primary) !important;
  background: var(--afti-primary) !important;
  color: #fff !important;
}
body.afti-template-page .afti-button-secondary .elementor-button {
  border-color: var(--afti-accent) !important;
  background: #fff !important;
  color: var(--afti-primary) !important;
}
body.afti-template-page .afti-benefit-item .elementor-heading-title,
body.afti-template-page .afti-section-title .elementor-heading-title,
body.afti-template-page .afti-bottom-title .elementor-heading-title {
  color: var(--afti-primary) !important;
}
body.afti-template-page .afti-home-hero,
body.afti-template-page .afti-benefits-shell,
body.afti-template-page .afti-section,
body.afti-template-page .afti-footer-slot {
  box-sizing: border-box;
}

/* Elementor editor preview also receives the design even if body classes are delayed. */
.elementor-editor-active .afti-hero-title .elementor-heading-title,
.elementor-edit-area-active .afti-hero-title .elementor-heading-title {
  color: var(--afti-primary) !important;
}
.elementor-editor-active .afti-hero-title .elementor-heading-title span,
.elementor-edit-area-active .afti-hero-title .elementor-heading-title span {
  color: var(--afti-accent) !important;
}
.elementor-editor-active .afti-button-primary .elementor-button,
.elementor-edit-area-active .afti-button-primary .elementor-button {
  background: var(--afti-primary) !important;
  color: #fff !important;
}

/* ========================================================================
 * 0.3.0 — Rebuild based on approved V3 screen 01.
 * Critical geometry is now encoded both in Elementor data and here.
 * ===================================================================== */
html { scroll-behavior: smooth; }
body.afti-template-page { margin: 0; background: #fff; color: var(--afti-text); }
body.afti-template-page.elementor-template-canvas { padding: 0 !important; }
body.afti-template-page .elementor-location-header,
body.afti-template-page .elementor-location-footer { display: none !important; }
.afti-page-content { width: 100%; min-height: 1px; }
.afti-page-content > .elementor { width: 100%; }

/* Global header shared by every managed page. */
.afti-site-header {
  position: relative;
  z-index: 100;
  width: 100%;
  background: linear-gradient(90deg, #031c38 0%, #062746 100%);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 26px rgba(1,27,54,.13);
}
.afti-site-header-inner {
  width: min(calc(100% - 36px), 1240px);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}
.afti-site-logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.afti-site-logo img { display: block; width: 174px; height: auto; }
.afti-primary-navigation { margin-left: auto; }
.afti-primary-menu {
  display: flex;
  align-items: center;
  gap: 27px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.afti-primary-menu li { margin: 0; padding: 0; }
.afti-primary-menu a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: rgba(255,255,255,.94) !important;
  font: 600 12px/1 var(--afti-font);
  text-decoration: none !important;
  white-space: nowrap;
}
.afti-primary-menu a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 2px;
  background: var(--afti-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s ease;
}
.afti-primary-menu a:hover::after,
.afti-primary-menu .current-menu-item > a::after { transform: scaleX(1); }
.afti-header-actions { display: flex; align-items: center; gap: 15px; }
.afti-header-search {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff !important;
  font-size: 25px;
  line-height: 1;
  text-decoration: none !important;
}
.afti-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border-radius: 3px;
  background: linear-gradient(180deg, #d7ae57, #bf8e2f);
  color: #fff !important;
  padding: 0 19px;
  font: 700 12px/1 var(--afti-font);
  text-decoration: none !important;
  box-shadow: 0 7px 18px rgba(0,0,0,.16);
}
.afti-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 5px;
  background: transparent;
  padding: 9px;
}
.afti-menu-toggle span:not(.screen-reader-text) {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  transition: transform .18s ease, opacity .18s ease;
}

/* Home V3 hero. */
body.afti-template-home .afti-home-hero {
  width: 100% !important;
  max-width: none !important;
  overflow: hidden;
  background: #fff;
}
body.afti-template-home .afti-hero-inner {
  width: min(100%, 1440px) !important;
  min-height: 475px;
  margin: 0 auto;
  align-items: stretch !important;
  background: #fff;
}
body.afti-template-home .afti-hero-copy-column {
  width: 39% !important;
  flex: 0 0 39% !important;
  justify-content: center;
  padding: 54px 12px 84px max(30px, calc((100vw - 1240px)/2 + 20px));
  z-index: 3;
}
body.afti-template-home .afti-hero-media-column {
  width: 61% !important;
  flex: 0 0 61% !important;
  min-height: 475px;
  overflow: hidden;
  background: #dbe9f3;
}
body.afti-template-home .afti-hero-image,
body.afti-template-home .afti-hero-image > .elementor-widget-container,
body.afti-template-home .afti-hero-image img {
  width: 100% !important;
  height: 100% !important;
}
body.afti-template-home .afti-hero-image img {
  min-height: 475px !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 0 !important;
}
body.afti-template-home .afti-hero-title .elementor-heading-title {
  max-width: 455px;
  margin: 0;
  color: var(--afti-primary) !important;
  font-size: clamp(47px, 4.45vw, 64px) !important;
  line-height: 1.03 !important;
  letter-spacing: -.045em !important;
  font-weight: 760 !important;
}
body.afti-template-home .afti-hero-title .elementor-heading-title span { color: var(--afti-accent) !important; }
body.afti-template-home .afti-hero-copy {
  max-width: 455px;
  margin-top: 16px;
  color: #4f5f70 !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
}
body.afti-template-home .afti-button-row { margin-top: 22px; gap: 14px !important; }
body.afti-template-home .afti-button-row .elementor-button {
  min-height: 43px !important;
  border-radius: 4px !important;
  padding: 12px 20px !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}
body.afti-template-home .afti-button-primary .elementor-button {
  border: 1px solid var(--afti-primary) !important;
  background: var(--afti-primary) !important;
  color: #fff !important;
}
body.afti-template-home .afti-button-secondary .elementor-button {
  border: 1px solid var(--afti-accent) !important;
  background: #fff !important;
  color: var(--afti-primary) !important;
}

/* Benefits overlap only the left side, as in the V3 design. */
body.afti-template-home .afti-benefits-shell {
  position: relative;
  z-index: 8;
  width: min(700px, 56vw) !important;
  margin: -55px 0 0 max(28px, calc((100vw - 1240px)/2 + 20px)) !important;
}
body.afti-template-home .afti-benefits-strip {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 0 !important;
  overflow: hidden;
  border-radius: 0 22px 22px 0 !important;
  background: #fff !important;
  box-shadow: 0 12px 26px rgba(1,27,54,.10) !important;
}
body.afti-template-home .afti-benefit-item {
  width: auto !important;
  min-width: 0;
  min-height: 86px;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px;
  border-right: 1px solid #e7ebef;
  padding: 15px 13px !important;
}
body.afti-template-home .afti-benefit-item:last-child { border-right: 0; }
body.afti-template-home .afti-benefit-icon { flex: 0 0 auto; }
body.afti-template-home .afti-benefit-icon .elementor-icon { color: #0f548c !important; font-size: 24px !important; }
body.afti-template-home .afti-benefit-copy { min-width: 0; }
body.afti-template-home .afti-benefit-item .elementor-heading-title {
  color: var(--afti-primary) !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
}
body.afti-template-home .afti-benefit-item .elementor-widget-text-editor {
  color: var(--afti-muted) !important;
  font-size: 9px !important;
  line-height: 1.35 !important;
}
body.afti-template-home .afti-benefit-item p { margin: 0 !important; }

/* Shared section scale and hierarchy from V3. */
body.afti-template-home .e-con.afti-section,
body.afti-template-home .afti-section.e-con {
  width: min(calc(100% - 54px), 1240px) !important;
  max-width: 1240px !important;
  padding-block: 42px !important;
}
body.afti-template-home .afti-section-heading-row {
  margin-bottom: 22px;
  align-items: flex-end !important;
}
body.afti-template-home .afti-section-heading-copy { align-items: flex-start; }
body.afti-template-home .afti-section-title .elementor-heading-title {
  margin: 0;
  color: var(--afti-primary) !important;
  font-size: clamp(27px, 2.2vw, 34px) !important;
  line-height: 1.1 !important;
  letter-spacing: -.025em !important;
}
body.afti-template-home .afti-section-subtitle {
  max-width: 680px;
  margin: 4px 0 0 !important;
  color: #6b7785 !important;
  font-size: 12px !important;
}
body.afti-template-home .afti-section-subtitle p,
body.afti-template-home .afti-eyebrow p { margin: 0 !important; }
body.afti-template-home .afti-section-link .elementor-button {
  padding: 8px 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--afti-primary) !important;
  font-size: 11px !important;
  box-shadow: none !important;
}

/* Five-card course row at desktop. */
body.afti-template-home .afti-course-grid {
  grid-template-columns: repeat(5, minmax(0,1fr)) !important;
  gap: 16px !important;
}
body.afti-template-home .afti-course-card { border-radius: 8px !important; box-shadow: 0 5px 16px rgba(1,27,54,.09) !important; }
body.afti-template-home .afti-course-card-body { padding: 13px !important; }
body.afti-template-home .afti-course-card h3 { min-height: 38px; margin-bottom: 9px; font-size: 13px !important; }
body.afti-template-home .afti-course-instructor { font-size: 9px !important; }
body.afti-template-home .afti-course-meta { margin-top: 8px; font-size: 9px !important; }
body.afti-template-home .afti-course-card-footer { margin-top: 9px; font-size: 15px !important; }

/* Routes. */
body.afti-template-home .afti-routes-section { background: #fff !important; }
body.afti-template-home .afti-route-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 16px !important;
  margin-top: 0 !important;
}
body.afti-template-home .afti-route-card {
  min-height: 138px !important;
  display: grid !important;
  grid-template-columns: 46px 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 14px;
  align-content: center;
  border-radius: 7px !important;
  padding: 17px 18px !important;
  background: linear-gradient(100deg, rgba(1,27,54,.98), rgba(3,52,91,.94)), url('../images/route.jpg') center/cover !important;
}
body.afti-template-home .afti-route-icon { grid-row: 1/4; align-self: center; }
body.afti-template-home .afti-route-icon .elementor-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--afti-accent);
  border-radius: 50%;
  color: #fff !important;
  font-size: 18px !important;
}
body.afti-template-home .afti-route-card-title .elementor-heading-title { font-size: 15px !important; }
body.afti-template-home .afti-route-card-meta { font-size: 10px !important; }
body.afti-template-home .afti-route-card-button .elementor-button {
  min-height: auto !important;
  padding: 4px 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #fff !important;
  font-size: 10px !important;
  box-shadow: none !important;
}

/* Six instructor cards. */
body.afti-template-home .afti-instructor-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 16px !important;
  margin-top: 0 !important;
}
body.afti-template-home .afti-instructor-card { border-radius: 7px !important; }
body.afti-template-home .afti-instructor-image img { aspect-ratio: 1.1/1 !important; }
body.afti-template-home .afti-instructor-name { margin-top: 10px !important; }
body.afti-template-home .afti-instructor-name .elementor-heading-title { font-size: 12px !important; }
body.afti-template-home .afti-instructor-role { margin: 0 !important; font-size: 9px !important; }
body.afti-template-home .afti-instructor-rating { margin: 5px 0 10px !important; font-size: 9px !important; }

/* Stats. */
body.afti-template-home .afti-stats-section { padding-top: 6px !important; }
body.afti-template-home .afti-stats-panel { border-radius: 7px !important; }
body.afti-template-home .afti-stat-item {
  width: 25% !important;
  min-width: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: center;
  gap: 14px;
  padding: 18px 22px !important;
}
body.afti-template-home .afti-stat-icon .elementor-icon { color: var(--afti-accent) !important; font-size: 26px !important; }
body.afti-template-home .afti-stat-value .elementor-heading-title { font-size: 25px !important; }
body.afti-template-home .afti-stat-label { font-size: 10px !important; }

/* Bottom three columns. */
body.afti-template-home .afti-bottom-section { gap: 24px !important; align-items: stretch !important; }
body.afti-template-home .afti-bottom-column {
  width: 33.333% !important;
  min-width: 0;
  padding-right: 24px !important;
}
body.afti-template-home .afti-bottom-title .elementor-heading-title { font-size: 21px !important; }
body.afti-template-home .afti-testimonial-copy blockquote { font-size: 12px !important; }
body.afti-template-home .afti-bottom-cta { padding: 20px !important; border-radius: 10px !important; }
body.afti-template-home .afti-cta-image { width: 58% !important; margin: 8px -20px -20px auto !important; }

/* Footer always shared and full width. */
.afti-global-footer { width: 100%; }
.afti-global-footer .elementor { overflow: visible; }

@media (max-width: 1180px) {
  .afti-primary-menu { gap: 16px; }
  .afti-primary-menu a { font-size: 11px; }
  body.afti-template-home .afti-hero-copy-column { padding-left: 28px; }
  body.afti-template-home .afti-benefits-shell { margin-left: 28px !important; }
  body.afti-template-home .afti-course-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  body.afti-template-home .afti-instructor-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 960px) {
  .afti-menu-toggle { display: block; }
  .afti-primary-navigation {
    position: absolute;
    top: 72px;
    right: 18px;
    left: 18px;
    display: none;
    border-radius: 8px;
    background: #062746;
    padding: 16px;
    box-shadow: 0 18px 40px rgba(0,0,0,.22);
  }
  .afti-site-header.is-open .afti-primary-navigation { display: block; }
  .afti-primary-menu { flex-direction: column; align-items: stretch; gap: 2px; }
  .afti-primary-menu a { width: 100%; min-height: 42px; padding: 0 8px; }
  .afti-header-actions { margin-left: 0; }
  .afti-header-search { display: none; }
  body.afti-template-home .afti-hero-inner { flex-direction: column !important; }
  body.afti-template-home .afti-hero-copy-column,
  body.afti-template-home .afti-hero-media-column { width: 100% !important; flex: 0 0 100% !important; }
  body.afti-template-home .afti-hero-copy-column { padding: 48px 28px 34px; }
  body.afti-template-home .afti-hero-media-column,
  body.afti-template-home .afti-hero-image img { min-height: 430px !important; }
  body.afti-template-home .afti-benefits-shell {
    width: min(calc(100% - 40px), 760px) !important;
    margin: -34px auto 0 !important;
  }
  body.afti-template-home .afti-benefits-strip { grid-template-columns: repeat(2,minmax(0,1fr)); border-radius: 14px !important; }
  body.afti-template-home .afti-route-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.afti-template-home .afti-bottom-section { flex-direction: column !important; }
  body.afti-template-home .afti-bottom-column { width: 100% !important; border-right: 0; border-bottom: 1px solid #e6e9ed; padding: 0 0 28px !important; }
}
@media (max-width: 767px) {
  .afti-site-header-inner { width: min(calc(100% - 24px), 1240px); min-height: 64px; }
  .afti-site-logo img { width: 150px; }
  .afti-header-cta { display: none; }
  .afti-primary-navigation { top: 64px; }
  body.afti-template-home .afti-hero-copy-column { padding: 38px 20px 28px; }
  body.afti-template-home .afti-hero-title .elementor-heading-title { font-size: clamp(40px, 12vw, 52px) !important; }
  body.afti-template-home .afti-hero-media-column,
  body.afti-template-home .afti-hero-image img { min-height: 300px !important; }
  body.afti-template-home .afti-button-row { flex-direction: column !important; }
  body.afti-template-home .afti-button-row .elementor-widget-button,
  body.afti-template-home .afti-button-row .elementor-button { width: 100%; }
  body.afti-template-home .afti-benefits-strip { grid-template-columns: 1fr; }
  body.afti-template-home .afti-benefit-item { border-right: 0; border-bottom: 1px solid #e7ebef; }
  body.afti-template-home .afti-benefit-item:last-child { border-bottom: 0; }
  body.afti-template-home .e-con.afti-section,
  body.afti-template-home .afti-section.e-con { width: min(calc(100% - 30px), 1240px) !important; padding-block: 36px !important; }
  body.afti-template-home .afti-section-heading-row { flex-direction: column !important; align-items: flex-start !important; gap: 8px; }
  body.afti-template-home .afti-course-grid,
  body.afti-template-home .afti-route-grid,
  body.afti-template-home .afti-instructor-grid { grid-template-columns: 1fr !important; }
  body.afti-template-home .afti-stat-item { width: 100% !important; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
}
