/*
Theme Name: FinApt
Theme URI: https://finaptgroup.com
Author: FinApt Group
Description: Custom block theme for FinApt Group. Premium corporate design, child of Twenty Twenty-Five.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.2
Version: 1.1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: finapt
Template: twentytwentyfive
*/

/* ============ FinApt custom styles ============ */

:root {
  --finapt-primary: #00549E;
  --finapt-primary-dark: #003E75;
  --finapt-slate: #3A4764;
  --finapt-slate-dark: #2A3549;
  --finapt-accent: #59B3CF;
  --finapt-body: #282828;
  --finapt-muted: #5A6470;
  --finapt-light: #F2F5F8;
  --finapt-border: #E2E8F0;
}

/* Serif italic accent word inside headlines */
.finapt-accent-word {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--finapt-accent);
  letter-spacing: 0;
}

/* Eyebrow label above headlines */
.finapt-eyebrow {
  font-family: 'Archivo', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--finapt-primary);
}

/* ============ Header / mega menu ============ */
.finapt-topbar {
  background: var(--finapt-slate-dark);
  color: #fff;
  font-size: 0.82rem;
}
.finapt-topbar a { color: #fff; text-decoration: none; }
.finapt-topbar a:hover { color: var(--finapt-accent); }

.finapt-header .wp-block-navigation__container > li > a {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--finapt-slate-dark);
  padding: 0.6rem 0.9rem;
}
.finapt-header .wp-block-navigation__container > li > a:hover { color: var(--finapt-primary); }

/* Mega menu panel */
@media (min-width: 1000px) {
  .finapt-header .has-mega-menu {
    position: static !important;
  }
  .finapt-header .has-mega-menu .wp-block-navigation__submenu-container {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 1360px;
    margin: 0 auto;
    padding: 2rem 2.5rem !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem 2rem;
    background: #fff;
    border: 1px solid var(--finapt-border);
    border-top: 3px solid var(--finapt-primary);
    box-shadow: 0 24px 48px rgba(42, 53, 73, 0.14);
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  }
  .finapt-header .has-mega-menu:hover .wp-block-navigation__submenu-container,
  .finapt-header .has-mega-menu:focus-within .wp-block-navigation__submenu-container {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }
  .finapt-header .has-mega-menu .wp-block-navigation__submenu-container li a {
    display: block;
    padding: 0.65rem 0 !important;
    border-bottom: 1px solid var(--finapt-light);
  }
  .finapt-header .has-mega-menu .wp-block-navigation__submenu-container li:last-child a {
    border-bottom: 0;
  }
}

/* ============ Buttons ============ */
.wp-block-button__link {
  transition: background 0.15s ease, transform 0.15s ease;
}
.wp-block-button__link:hover {
  background: var(--finapt-primary-dark) !important;
}
.finapt-btn-ghost .wp-block-button__link {
  background: transparent !important;
  color: var(--finapt-primary) !important;
  border: 2px solid var(--finapt-primary);
}
.finapt-btn-ghost .wp-block-button__link:hover {
  background: var(--finapt-primary) !important;
  color: #fff !important;
}
.finapt-btn-light .wp-block-button__link {
  background: #fff !important;
  color: var(--finapt-primary) !important;
}
.finapt-btn-light .wp-block-button__link:hover {
  background: var(--finapt-light) !important;
}

/* ============ Service cards ============ */
.finapt-card {
  border: 1px solid var(--finapt-border);
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.finapt-card:hover {
  border-color: var(--finapt-accent);
  box-shadow: 0 12px 28px rgba(42, 53, 73, 0.1);
  transform: translateY(-3px);
}
.finapt-card .finapt-card-arrow {
  color: var(--finapt-primary);
  font-weight: 700;
}

/* ============ Stats band ============ */
.finapt-stat-number {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* ============ FAQ accordion (details/summary) ============ */
.finapt-faq details {
  border-bottom: 1px solid var(--finapt-border);
  padding: 1.1rem 0;
}
.finapt-faq details:first-child { border-top: 1px solid var(--finapt-border); }
.finapt-faq summary {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--finapt-slate-dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.finapt-faq summary::-webkit-details-marker { display: none; }
.finapt-faq summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--finapt-primary);
  flex-shrink: 0;
}
.finapt-faq details[open] summary::after { content: "–"; }
.finapt-faq details p { color: var(--finapt-body); margin-top: 0.75rem; }

/* ============ Sticky sidebar CTA ============ */
.finapt-sticky-cta {
  position: sticky;
  top: 100px;
}
.finapt-cta-card {
  background: var(--finapt-slate);
  color: #fff;
  border-radius: 8px;
  padding: 1.75rem;
}
.finapt-cta-card h3 { color: #fff; margin-top: 0; }
.finapt-cta-card a { color: #fff; }

/* ============ Breadcrumb ============ */
.finapt-breadcrumb {
  font-size: 0.85rem;
  color: var(--finapt-muted);
}
.finapt-breadcrumb a { color: var(--finapt-muted); text-decoration: none; }
.finapt-breadcrumb a:hover { color: var(--finapt-primary); }
.finapt-breadcrumb .sep { margin: 0 0.5rem; }

/* ============ Checklists ("What's included") ============ */
.finapt-checklist { list-style: none; padding: 0; }
.finapt-checklist li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.7rem;
}
.finapt-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--finapt-light);
  color: var(--finapt-primary);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============ Footer ============ */
.finapt-footer { background: var(--finapt-slate-dark); color: #D7DEE8; }
.finapt-footer h3, .finapt-footer h4 { color: #fff; }
.finapt-footer a { color: #D7DEE8; text-decoration: none; }
.finapt-footer a:hover { color: var(--finapt-accent); }
.finapt-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  color: #9AA6B8;
}

/* ============ Forms ============ */
.finapt-form input[type="text"],
.finapt-form input[type="email"],
.finapt-form input[type="tel"],
.finapt-form textarea,
.finapt-form select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--finapt-border);
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  background: #fff;
}
.finapt-form input:focus,
.finapt-form textarea:focus,
.finapt-form select:focus {
  outline: 2px solid var(--finapt-accent);
  border-color: var(--finapt-primary);
}

/* ============ Team grid ============ */
.finapt-team-card img {
  border-radius: 6px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
}
.finapt-team-card h3 { margin-bottom: 0.2rem; }
.finapt-team-card .finapt-role {
  color: var(--finapt-primary);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ============ Responsive ============ */
@media (max-width: 999px) {
  .finapt-sticky-cta { position: static; }
  .finapt-header .wp-block-navigation__responsive-container-open {
    color: var(--finapt-slate-dark);
  }
}
@media (max-width: 600px) {
  .finapt-topbar .finapt-topbar-email { display: none; }
}

/* Heading refinements (theme.json 'heading' element covers the base) */
h1.wp-block-heading,
h1.wp-block-post-title {
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
}
h2.wp-block-heading { font-size: 1.75rem; }
h3.wp-block-heading { font-size: 1.25rem; line-height: 1.3; }

/* ============ v2: Premium homepage ============ */

/* Hero cover */
.finapt-hero .wp-block-cover__inner-container {
	max-width: 1200px;
	width: 100%;
}
.finapt-eyebrow-light {
	color: #59B3CF;
	font-family: 'Archivo', 'Helvetica Neue', sans-serif;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin-bottom: 1rem;
}
.finapt-hero h1 {
	color: #fff;
	font-size: clamp(2.75rem, 5.5vw, 4.5rem);
	max-width: 16ch;
}
.finapt-hero .finapt-accent-word { color: #59B3CF; }
.finapt-hero-sub {
	color: rgba(255,255,255,0.85);
	font-size: 1.2rem;
	max-width: 38rem;
}
.finapt-hero-trust {
	color: rgba(255,255,255,0.65);
	font-size: 0.85rem;
	margin-top: 2.5rem;
}

/* Numbered service cards */
.finapt-service-card {
	position: relative;
	border: 1px solid #E2E8F0;
	border-radius: 8px;
	padding: 1.75rem;
	background: #fff;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
	height: 100%;
}
.finapt-service-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 32px rgba(42,53,73,0.12);
	border-color: #00549E;
}
.finapt-service-num {
	font-family: 'Archivo', sans-serif;
	font-weight: 800;
	font-size: 0.8rem;
	color: #59B3CF;
	letter-spacing: 0.1em;
	margin-bottom: 0.75rem;
}
.finapt-service-card h3 { margin-top: 0; }
.finapt-card-arrow a {
	color: #00549E;
	font-weight: 600;
	text-decoration: none;
}
.finapt-card-arrow a:hover { color: #003E75; }

/* Why FinApt differentiators */
.finapt-diff-num {
	font-family: 'Archivo', sans-serif;
	font-weight: 800;
	font-size: 2rem;
	color: #00549E;
	line-height: 1;
	margin-bottom: 0.5rem;
}

/* Leadership preview */
.finapt-leader-card { text-align: center; }
.finapt-leader-card img {
	border-radius: 50%;
	width: 160px;
	height: 160px;
	object-fit: cover;
	margin: 0 auto 1rem;
	border: 3px solid #E2E8F0;
}
.finapt-leader-card h3 {
	font-size: 1.05rem;
	margin-bottom: 0.25rem;
}
.finapt-leader-card p {
	font-size: 0.85rem;
	color: #5A6470;
	margin: 0;
}

/* Trust badges */
.finapt-trust-badge {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.85rem;
	color: #3A4764;
	font-weight: 500;
}
.finapt-trust-badge::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #59B3CF;
	flex-shrink: 0;
}

/* ============ v1.1.1: mobile overflow fixes ============ */
@media (max-width: 600px) {
	/* Header: hide the CTA button so logo + hamburger fit */
	.finapt-header .wp-block-buttons {
		display: none;
	}
	/* Topbar: allow wrapping instead of overflowing */
	.finapt-topbar .wp-block-group {
		flex-wrap: wrap;
		row-gap: 0.25rem;
	}
	.finapt-topbar {
		font-size: 0.78rem;
	}
	/* Hero: tighten on small screens */
	.finapt-hero {
		min-height: 92vh !important;
	}
}
