/*
Theme Name:   AP Law (Hello Elementor Child)
Theme URI:    https://aplawyyc.ca/
Description:  Child theme for AP Law (Azra Punja Professional Corporation), a Calgary personal injury law firm. Built for Elementor Pro: all page content lives in Elementor and can be edited there. Run Appearance → AP Law Setup after activation.
Author:       Websites Calgary
Author URI:   https://www.websitescalgary.ca/
Template:     hello-elementor
Version:      1.0.0
Requires at least: 6.2
Requires PHP: 7.4
License:      GPL-2.0-or-later
Text Domain:  aplaw-child
*/

/* ------------------------------------------------------------------
   Brand tokens (Elementor global colours hold the same values:
   Site Settings → Global Colors). Change colours there, not here.
------------------------------------------------------------------- */
:root {
	--ap-navy: #031F56;
	--ap-blue: #044EC7;
	--ap-gold: #C9A24D;
	--ap-ink: #0B1736;
	--ap-text: #4A5468;
	--ap-light: #F8F4EC;
	--ap-beige: #EFE5D2;
	--ap-gold-light: #E3C47E;
	--ap-gold-grad: linear-gradient(120deg, #E3C47E 0%, #C9A24D 45%, #B88A36 100%);
	--ap-blue-grad: linear-gradient(125deg, #031F56 0%, #044EC7 100%);
	--ap-line: #E2E7F1;
	--ap-radius: 14px;
	--ap-ease: cubic-bezier(.2, .7, .2, 1);
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }

/* Anchor links land below the sticky header */
[id] { scroll-margin-top: 110px; }

::selection { background: var(--ap-blue); color: #fff; }

/* Accessible focus states */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
.elementor-button:focus-visible, .e-n-accordion-item-title:focus-visible {
	outline: 3px solid var(--ap-gold);
	outline-offset: 3px;
}

/* ---------------- Eyebrow labels ---------------- */
.ap-eyebrow--line .elementor-heading-title { display: inline-flex; align-items: center; gap: 14px; }
.ap-eyebrow--line .elementor-heading-title::before {
	content: ""; width: 44px; height: 1px; background: currentColor; opacity: .9;
}

/* ---------------- Header ---------------- */
.ap-mainbar { transition: box-shadow .3s var(--ap-ease), padding .3s var(--ap-ease); }
.ap-mainbar.elementor-sticky--effects { box-shadow: 0 10px 30px -12px rgba(3, 31, 86, .18); }
.ap-nav .elementor-nav-menu--main .elementor-item { letter-spacing: .1px; }
.ap-logo img { display: block; }

/* ---------------- Hero ---------------- */
.ap-hero .ap-hero-title .elementor-heading-title { letter-spacing: -.5px; text-wrap: balance; }
.ap-glass { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ap-page-hero h1.elementor-heading-title { text-wrap: balance; }

/* ---------------- Cards ---------------- */
.ap-card { transition: transform .35s var(--ap-ease), box-shadow .35s var(--ap-ease), border-color .35s var(--ap-ease); color: inherit; text-decoration: none; }
a.ap-card:hover, .ap-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 22px 44px -18px rgba(3, 31, 86, .22);
	border-color: rgba(4, 78, 199, .35) !important;
}
.ap-card .ap-card-more .elementor-heading-title { transition: letter-spacing .3s var(--ap-ease); }
.ap-card:hover .ap-card-more .elementor-heading-title { letter-spacing: 1px; }
.ap-step { transition: transform .35s var(--ap-ease); }
.ap-step:hover { transform: translateY(-3px); }

/* ---------------- Portrait + floating badge ---------------- */
.ap-portrait-wrap { position: relative; }
.ap-portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
@media (min-width: 1025px) {
	.ap-portrait-wrap .ap-badge { position: absolute; right: -28px; bottom: 36px; width: auto; }
	.ap-sticky-col { position: sticky; top: 120px; }
}
@media (max-width: 1024px) {
	.ap-portrait-wrap .ap-badge { margin-top: -40px; margin-left: 20px; width: fit-content; position: relative; }
	.ap-portrait img { aspect-ratio: 1 / 1; max-height: 520px; }
}

/* ---------------- FAQ (Elementor nested accordion) ---------------- */
.ap-faq .e-n-accordion { display: flex; flex-direction: column; gap: 12px; }
.ap-faq .e-n-accordion-item {
	background: #fff; border: 1px solid var(--ap-line); border-radius: var(--ap-radius);
	overflow: hidden; transition: border-color .3s var(--ap-ease), box-shadow .3s var(--ap-ease);
}
.ap-faq .e-n-accordion-item[open] { border-color: rgba(4, 78, 199, .35); box-shadow: 0 14px 34px -20px rgba(3, 31, 86, .25); }
.ap-faq .e-n-accordion-item-title {
	padding: 22px 28px !important; border: 0 !important; background: transparent !important; gap: 20px;
	justify-content: space-between;
}
.ap-faq .e-n-accordion-item-title-text {
	font-family: "Playfair Display", Georgia, serif; font-size: 20px; font-weight: 500; line-height: 1.4; color: var(--ap-ink);
}
.ap-faq .e-n-accordion-item-title-icon { color: var(--ap-gold); font-size: 14px; }
.ap-faq .e-n-accordion-item-title-icon svg { fill: var(--ap-gold); width: 14px; height: 14px; }
.ap-faq .e-n-accordion-item > .e-con, .ap-faq .e-n-accordion-item > [role="region"] { border: 0 !important; }
@media (max-width: 767px) {
	.ap-faq .e-n-accordion-item-title { padding: 18px 20px !important; }
	.ap-faq .e-n-accordion-item-title-text { font-size: 17px; }
}

/* ---------------- Contact form ---------------- */
.ap-form .elementor-field-textual { transition: border-color .2s, box-shadow .2s; min-height: 50px; }
.ap-form .elementor-field-textual:focus { border-color: var(--ap-blue) !important; box-shadow: 0 0 0 4px rgba(4, 78, 199, .12); outline: none; }
.ap-form .elementor-field-type-acceptance label { font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--ap-text); }
.ap-form .elementor-button { transition: background-color .25s, color .25s; }

/* ---------------- Blog cards + post content ---------------- */
.ap-posts .elementor-post__card { border: 1px solid var(--ap-line); transition: transform .35s var(--ap-ease), box-shadow .35s var(--ap-ease); }
.ap-posts .elementor-post__card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px -18px rgba(3, 31, 86, .22); }
.ap-posts .elementor-post__title { font-family: "Playfair Display", Georgia, serif; }

.ap-post-content h2 { font-size: clamp(26px, 3vw, 34px); margin: 1.6em 0 .5em; color: var(--ap-ink); }
.ap-post-content h3 { font-size: clamp(21px, 2.4vw, 24px); margin: 1.4em 0 .4em; color: var(--ap-ink); }
.ap-post-content p, .ap-post-content li { margin-bottom: 1em; }
.ap-post-content ul, .ap-post-content ol { padding-left: 1.2em; margin-bottom: 1.2em; }
.ap-post-content a { color: var(--ap-blue); text-decoration: underline; text-underline-offset: 3px; }
.ap-post-content blockquote, .ap-post-content .ap-note {
	border-left: 4px solid var(--ap-gold); background: var(--ap-light); padding: 18px 24px; border-radius: 0 12px 12px 0; margin: 1.6em 0;
}

/* ---------------- Text links inside Elementor text ---------------- */
.elementor-widget-text-editor a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ap-footer .elementor-widget-text-editor a:hover { color: var(--ap-gold); }

/* ---------------- Mobile call bar (fixed) ---------------- */
@media (max-width: 767px) {
	.ap-mobile-bar {
		position: fixed !important; left: 0; right: 0; bottom: 0; z-index: 9990;
		box-shadow: 0 -8px 24px rgba(3, 31, 86, .14);
		padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important;
	}
	.ap-mobile-bar .elementor-widget-button { flex: 1 1 0; }
	.ap-mobile-bar .elementor-button { width: 100%; justify-content: center; }
}
/* Keep the bar in place while editing in Elementor */
body.elementor-editor-active .ap-mobile-bar { position: relative !important; }

/* ---------------- Jump links bar ---------------- */
.ap-jump .elementor-icon-list-items { justify-content: center; row-gap: 10px; }

/* ---------------- Motion preferences ---------------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------------- Google Map ---------------- */
.ap-map-wrap { overflow: hidden; }
.ap-map iframe { display: block; width: 100%; filter: saturate(.85); }

/* ---------------- Plain WordPress pages (e.g. Privacy Policy) ---------------- */
body.page:not(.elementor-page) .site-main { max-width: 820px; margin: 0 auto; padding: 80px 20px 100px; }
body.page:not(.elementor-page) .site-main .page-header h1 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 24px; }
body.page:not(.elementor-page) .site-main h2 { font-size: 26px; margin: 1.6em 0 .5em; }

/* Keep "Learn more" links aligned at the bottom of cards */
.ap-card .ap-card-more { margin-top: auto; padding-top: 6px; }


/* ==================================================================
   v2 — modern blue + gold/beige, gradients, light animations
   ================================================================== */

/* Gold gradient numbers (stats, steps) */
.ap-num-gold .elementor-heading-title {
	background: var(--ap-gold-grad); -webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent; color: transparent;
}
.ap-num-blue .elementor-heading-title {
	background: linear-gradient(120deg, #044EC7, #2F7BF0); -webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent; color: transparent;
}
.ap-step-num { min-width: 56px; }

/* Stats card: thin gold gradient bar on top */
.ap-stats { overflow: hidden; }
.ap-stats::before {
	content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--ap-gold-grad); z-index: 2;
}

/* Soft gold glow on dark hero / CTA sections */
.ap-glow { overflow: hidden; position: relative; }
.ap-glow::after {
	content: ""; position: absolute; pointer-events: none; z-index: 0;
	width: 720px; height: 720px; right: -220px; top: -260px; border-radius: 50%;
	background: radial-gradient(circle, rgba(227, 196, 126, .22) 0%, rgba(227, 196, 126, 0) 65%);
	animation: ap-glow 12s ease-in-out infinite alternate;
}
.ap-glow > .e-con-inner, .ap-glow > .e-con { position: relative; z-index: 1; }
@keyframes ap-glow { from { transform: translate(0, 0) scale(1); } to { transform: translate(-60px, 40px) scale(1.15); } }

/* Eyebrow line in gold gradient */
.ap-eyebrow--line .elementor-heading-title::before { background: var(--ap-gold-grad); height: 2px; opacity: 1; }

/* Floating glass card in the hero */
.ap-float { animation: ap-float 7s ease-in-out infinite; }
@keyframes ap-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Buttons: subtle lift + shine sweep */
.ap-btn .elementor-button { position: relative; overflow: hidden; transition: transform .3s var(--ap-ease), box-shadow .3s var(--ap-ease), background-color .3s, color .3s; }
.ap-btn .elementor-button:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -12px rgba(3, 31, 86, .45); }
.ap-btn .elementor-button::after {
	content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
	transform: skewX(-20deg); transition: left .7s var(--ap-ease);
}
.ap-btn .elementor-button:hover::after { left: 140%; }

/* Cards: gold accent line grows on hover */
.ap-card { position: relative; overflow: hidden; }
.ap-card::before {
	content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--ap-gold-grad);
	transition: width .5s var(--ap-ease); z-index: 2;
}
.ap-card:hover::before { width: 100%; }
.ap-card .elementor-widget-icon .elementor-icon { transition: transform .4s var(--ap-ease); }
.ap-card:hover .elementor-widget-icon .elementor-icon { transform: rotate(-6deg) scale(1.08); }

/* Steps */
.ap-step { border: 1px solid transparent; transition: transform .35s var(--ap-ease), border-color .35s, background-color .35s; }
.ap-step:hover { border-color: rgba(201, 162, 77, .45); background-color: #fff !important; }

/* Replaceable image areas: rounded, gold offset frame, gentle zoom */
.ap-img-frame { position: relative; padding: 0 18px 18px 0; }
.ap-img-frame::before {
	content: ""; position: absolute; right: 0; bottom: 0; width: 70%; height: 70%;
	border: 2px solid var(--ap-gold-light); border-radius: 22px; z-index: 0;
	transition: transform .6s var(--ap-ease);
}
.ap-img-frame:hover::before { transform: translate(6px, 6px); }
.ap-img-slot { position: relative; z-index: 1; }
.ap-img-slot .elementor-widget-container, .ap-img-slot > img, .ap-img-slot a { display: block; overflow: hidden; border-radius: 20px; }
.ap-img-slot img {
	width: 100%; object-fit: cover; display: block; border-radius: 20px;
	box-shadow: 0 30px 60px -30px rgba(3, 31, 86, .45);
	transition: transform 1.2s var(--ap-ease);
}
.ap-img-slot--landscape img { aspect-ratio: 4 / 3; }
.ap-img-slot--portrait img { aspect-ratio: 4 / 5; }
.ap-img-frame:hover .ap-img-slot img { transform: scale(1.04); }
@media (max-width: 1024px) {
	.ap-img-slot--portrait img { aspect-ratio: 4 / 3; }
	.ap-img-frame { padding: 0 12px 12px 0; }
}

/* Mini CTA card next to FAQs */
.ap-mini-cta { position: relative; overflow: hidden; }
.ap-mini-cta::after {
	content: ""; position: absolute; width: 260px; height: 260px; right: -90px; bottom: -120px; border-radius: 50%;
	background: radial-gradient(circle, rgba(227, 196, 126, .35), rgba(227, 196, 126, 0) 70%); pointer-events: none;
}

/* Portrait image (About) gets the same gold frame feel */
.ap-portrait img { transition: transform 1.2s var(--ap-ease); }
.ap-portrait-wrap:hover .ap-portrait img { transform: scale(1.02); }

/* Beige accents */
.ap-faq .e-n-accordion-item[open] { border-color: rgba(201, 162, 77, .55); }
.ap-jumpbar { background: linear-gradient(90deg, #fff, #FBF8F2, #fff); }

/* Smooth Elementor entrance animations (lighter, shorter travel) */
.elementor-element.animated.fadeInUp { animation-name: ap-fade-up; }
@keyframes ap-fade-up { from { opacity: 0; transform: translate3d(0, 28px, 0); } to { opacity: 1; transform: none; } }
