/*
Theme Name: Giovanna Gallo Law
Theme URI: https://ggallolegal.com/
Author: The Law Office of Giovanna Gallo
Description: Lightweight bilingual (English/Spanish) block theme for The Law Office of Giovanna Gallo. No page builder or premium plugins required.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.3.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ggallo
*/

/* ---------- Base & accessibility ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--wp--preset--color--royal-bright);
  outline-offset: 3px;
  border-radius: 2px;
}
.ggallo-hero :where(a, button):focus-visible, .ggallo-cta :where(a, button):focus-visible, .site-footer :where(a, button):focus-visible { outline-color: #fff; }
.skip-link.screen-reader-text:focus { background: #fff; color: var(--wp--preset--color--navy); font-weight: 700; padding: .75rem 1rem; z-index: 100000; }
.wp-block-post-content a:not(.wp-element-button), .ggallo-prose a:not(.wp-element-button) { text-decoration-thickness: 1px; text-underline-offset: .18em; }
img { height: auto; }

/* ---------- Header ---------- */
.site-topbar { font-size: .9rem; }
.site-topbar a { color: #fff; text-decoration: none; }
.site-topbar a:hover, .site-topbar a:focus { text-decoration: underline; }
.site-header { border-bottom: 1px solid var(--wp--preset--color--silver); position: relative; z-index: 20; }
.site-header .ggallo-logo img { width: 230px; max-width: 58vw; height: auto; display: block; }
@media (min-width: 782px) { .site-header .ggallo-logo img { width: 270px; } }
.site-header .wp-block-navigation { font-weight: 600; }
.site-header .wp-block-navigation__submenu-container { border: 1px solid var(--wp--preset--color--silver) !important; box-shadow: 0 10px 30px rgba(11,31,77,.12); min-width: 17rem !important; }
.site-header .wp-block-navigation .wp-block-navigation-item__content { padding-block: .35rem; }
.ggallo-lang-switch { display: inline-flex; gap: .35rem; align-items: center; font-weight: 600; }
.ggallo-lang-switch a, .ggallo-lang-switch span { padding: .3rem .55rem; border-radius: 4px; border: 1px solid currentColor; text-decoration: none; line-height: 1.2; }
.ggallo-lang-switch [aria-current="true"] { background: #fff; color: var(--wp--preset--color--navy); border-color: #fff; }
.ggallo-lang-switch a { color: #fff; }
.ggallo-lang-switch a:hover { background: rgba(255,255,255,.15); }

/* ---------- Sections ---------- */
.ggallo-hero { background: linear-gradient(135deg, var(--wp--preset--color--navy) 0%, #132e72 60%, var(--wp--preset--color--royal) 100%); color: #fff; }
.ggallo-hero :where(h1, h2, p, a:not(.wp-element-button)) { color: #fff; }
.ggallo-hero .ggallo-lead { font-size: var(--wp--preset--font-size--large); color: #E8ECF5; }
.ggallo-hero .wp-block-button:not(.is-style-outline) .wp-element-button { background: #fff; color: var(--wp--preset--color--navy); }
.ggallo-hero .wp-block-button.is-style-outline .wp-element-button, .ggallo-cta .wp-block-button.is-style-outline .wp-element-button { color: #fff; border-color: #fff; background: transparent; }
.ggallo-hero .wp-block-button .wp-element-button:hover, .ggallo-cta .wp-block-button .wp-element-button:hover { filter: brightness(.95); text-decoration: underline; }
.ggallo-breadcrumb { font-size: .9rem; margin-bottom: .5rem; color: #D5DBE8; }
.ggallo-breadcrumb a { color: #fff; }
.ggallo-hero .ggallo-accent { width: 72px; height: 4px; background: var(--wp--preset--color--silver); border: 0; margin: 0 0 1.25rem; opacity: 1; }
.ggallo-trust { background: var(--wp--preset--color--silver-light); border-bottom: 1px solid var(--wp--preset--color--silver); font-size: .95rem; }
.ggallo-trust p { margin: 0; text-align: center; color: var(--wp--preset--color--ink); }
.ggallo-band { background: var(--wp--preset--color--silver-light); }
.ggallo-cta { background: var(--wp--preset--color--navy); color: #fff; border-top: 4px solid var(--wp--preset--color--silver); }
.ggallo-cta :where(h2, p, a:not(.wp-element-button)) { color: #fff; }
.ggallo-cta .wp-block-button:not(.is-style-outline) .wp-element-button { background: #fff; color: var(--wp--preset--color--navy); }
.ggallo-cta .ggallo-small { color: #D5DBE8; }
.ggallo-small { font-size: .875rem; }

/* ---------- Cards ---------- */
.ggallo-card { background: #fff; border: 1px solid var(--wp--preset--color--silver); border-top: 4px solid var(--wp--preset--color--royal); border-radius: 8px; padding: 1.25rem 1.25rem 1rem; height: 100%; box-sizing: border-box; }
.ggallo-card h3 { margin-top: 0; font-size: 1.25rem; }
.ggallo-card h3 a { text-decoration: none; color: var(--wp--preset--color--navy); }
.ggallo-card h3 a:hover, .ggallo-card h3 a:focus { text-decoration: underline; }
.ggallo-card p { margin-bottom: .5rem; }
.ggallo-person figure { margin: 0 0 .75rem; }
.ggallo-person img { border-radius: 8px; aspect-ratio: 5 / 6; object-fit: cover; object-position: center top; width: 100%; background: var(--wp--preset--color--silver-light); }
.ggallo-person h3 { margin-bottom: .15rem; }
.ggallo-person p { margin-top: 0; color: var(--wp--preset--color--slate); }

/* ---------- Notices & placeholders ---------- */
.ggallo-notice { border-left: 5px solid var(--wp--preset--color--royal); background: var(--wp--preset--color--silver-light); padding: 1rem 1.25rem; border-radius: 0 6px 6px 0; }
.ggallo-notice p { margin: .25rem 0; }
.ggallo-placeholder { border: 2px dashed #9A6B00; background: #FFF8E5; color: #3D2B00; padding: 1rem 1.25rem; border-radius: 6px; }
.ggallo-placeholder p { margin: .25rem 0; }
.ggallo-faq h3 { font-size: 1.15rem; margin-top: 1.5rem; margin-bottom: .35rem; }
.ggallo-faq h3 + p { margin-top: 0; }
.ggallo-mycase-embed iframe { width: 100%; min-height: 900px; border: 1px solid var(--wp--preset--color--silver); border-radius: 8px; background: #fff; }
.ggallo-video-grid .wp-block-embed { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--wp--preset--color--navy); color: #E8ECF5; font-size: .925rem; border-top: 4px solid var(--wp--preset--color--silver); }
.site-footer :where(h2, h3, p, li, a) { color: #E8ECF5; }
.site-footer a:hover, .site-footer a:focus { color: #fff; }
.site-footer h2 { font-size: 1.1rem; color: #fff; letter-spacing: .02em; }
.site-footer .ggallo-legal { border-top: 1px solid rgba(255,255,255,.2); font-size: .85rem; }
.site-footer .wp-block-navigation a { text-decoration: underline; }

@media (max-width: 781px) {
  .ggallo-hero h1 { font-size: clamp(1.9rem, 7vw, 2.4rem); }
  .site-topbar .wp-block-group { justify-content: center; }
}
@media print { .site-header .wp-block-navigation, .ggallo-cta, .site-topbar { display: none; } }

/* ---------- Layout rhythm ---------- */
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-block-post-content > * { margin-block-start: 0; margin-block-end: 0; }
.ggallo-section { padding-block: var(--wp--preset--spacing--60); }
.ggallo-hero.ggallo-section { padding-block: clamp(2.5rem, 7vw, 5rem); }
.ggallo-trust { padding-block: .85rem; }
.site-topbar { background: var(--wp--preset--color--navy); color: #fff; padding-block: .4rem; padding-inline: var(--wp--style--root--padding-left, 1.25rem); gap: .5rem 1.5rem; }
.site-topbar p { margin: 0; color: #fff; }
.site-topbar .wp-block-group { gap: .5rem 1rem; align-items: center; }
.site-header { padding-block: .75rem; padding-inline: var(--wp--style--root--padding-left, 1.25rem); background: #fff; gap: 1rem; align-items: center; }
.ggallo-person.wp-block-columns, .wp-block-columns .ggallo-person { max-width: 22rem; }
.ggallo-related { columns: 2 16rem; }
.site-footer.ggallo-section { padding-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40); }
.site-footer .ggallo-legal { margin-top: var(--wp--preset--spacing--40); padding-top: var(--wp--preset--spacing--30); }
.site-footer ul { list-style: none; padding-left: 0; }
.site-footer li { margin-block: .3rem; }
.ggallo-trust { margin-block: 0 !important; }
.site-footer .wp-block-navigation, .site-footer .wp-block-navigation .wp-block-navigation__container { gap: .45rem !important; }

/* ---------- Mobile quick-contact bar (Call / WhatsApp / Consultation) ---------- */
.ggallo-mobile-bar { display: none; }
@media (max-width: 781px) {
  .ggallo-mobile-bar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--wp--preset--color--navy); border-top: 2px solid var(--wp--preset--color--silver); padding-bottom: env(safe-area-inset-bottom); }
  .ggallo-mobile-bar a { color: #fff; text-align: center; font-weight: 700; padding: .85rem .25rem; text-decoration: none; min-height: 44px; box-sizing: border-box; }
  .ggallo-mobile-bar a + a { border-left: 1px solid rgba(255,255,255,.25); }
  .ggallo-mobile-bar a:hover, .ggallo-mobile-bar a:focus { background: var(--wp--preset--color--royal); text-decoration: underline; }
  .ggallo-mobile-bar a:focus-visible { outline-color: #fff; outline-offset: -3px; }
  body { padding-bottom: 3.5rem; }
}
.ggallo-notary-notice h3 { margin-top: 0; }
.ggallo-notary-notice ul { margin-top: .25rem; }

/* =====================================================================
   v1.2 — color refresh (navy + royal base, gold and teal accents)
   ===================================================================== */
:root { --gg-gold: #F2B33D; --gg-gold-light: #F5C766; --gg-gold-dark: #8A5A00; --gg-teal: #0E7C7B; --gg-ocean: #1F5F8B; --gg-sky: #EAF1FC; --gg-cream: #FBF4E4; --gg-mint: #E3F4F3; --gg-stripe: linear-gradient(90deg, #F2B33D 0%, #F2B33D 33%, #0E7C7B 33%, #0E7C7B 66%, #2C5FCC 66%); }
/* Hero: deeper gradient with a teal glow and a gold/teal/blue stripe */
.ggallo-hero { position: relative; background: radial-gradient(circle at 92% 10%, rgba(242,179,61,.18) 0, rgba(242,179,61,0) 38%), linear-gradient(125deg, #0B1F4D 0%, #1B3F9E 58%, #1F5F8B 100%); }
.ggallo-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--gg-stripe); }
.ggallo-hero h1::after { content: ""; display: block; width: 84px; height: 5px; margin-top: 1rem; border-radius: 3px; background: var(--gg-gold); }
.ggallo-hero .wp-block-button:not(.is-style-outline) .wp-element-button, .ggallo-cta .wp-block-button:not(.is-style-outline) .wp-element-button { background: var(--gg-gold); color: #0B1F4D; }
.ggallo-hero .wp-block-button:not(.is-style-outline) .wp-element-button:hover, .ggallo-cta .wp-block-button:not(.is-style-outline) .wp-element-button:hover { background: #E0A22A; filter: none; }
.ggallo-breadcrumb a { color: var(--gg-gold-light); }
/* Trust band */
.ggallo-trust { background: linear-gradient(90deg, #FBF1DC 0%, #E3F4F3 50%, #EAF1FC 100%); border-bottom: 0; font-weight: 600; }
.ggallo-trust p { color: #0B1F4D; }
/* Alternating soft section tints */
.wp-block-post-content > .ggallo-section:not(.ggallo-hero):not(.ggallo-cta):not(.ggallo-band):nth-child(4n) { background: var(--gg-sky); }
.wp-block-post-content > .ggallo-section:not(.ggallo-hero):not(.ggallo-cta):not(.ggallo-band):nth-child(4n+6) { background: var(--gg-mint); }
.ggallo-band { background: var(--gg-cream); }
.ggallo-reviews { background: var(--gg-cream); }
/* Accent underline on section headings */
.ggallo-section:not(.ggallo-hero):not(.ggallo-cta):not(.site-footer) h2::after { content: ""; display: block; width: 56px; height: 4px; margin-top: .55rem; border-radius: 2px; background: linear-gradient(90deg, #F2B33D 0 50%, #0E7C7B 50%); }
.ggallo-section h2.has-text-align-center::after { margin-inline: auto; }
/* Service cards: colored top edge and icon badge per service family */
.ggallo-card { position: relative; --gg-c: #1B3F9E; --gg-t: #EAF1FC; border-top-color: var(--gg-c); box-shadow: 0 1px 2px rgba(11,31,77,.06); transition: box-shadow .2s ease, transform .2s ease; }
.ggallo-card:hover, .ggallo-card:focus-within { box-shadow: 0 10px 24px rgba(11,31,77,.12); transform: translateY(-2px); }
.ggallo-card:has(h3 a)::before { content: ""; display: block; width: 46px; height: 46px; margin-bottom: .75rem; border-radius: 50%; background-color: var(--gg-t); background-repeat: no-repeat; background-position: center; background-size: 26px 26px; background-image: var(--gg-i); box-shadow: inset 0 0 0 1px rgba(11,31,77,.06); }
.ggallo-card h3 a { color: var(--gg-c); }
.ggallo-card { --gg-i: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B3F9E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3v18M7 21h10M4 7h16M6 7l-3 7a3 3 0 0 0 6 0zM18 7l-3 7a3 3 0 0 0 6 0z'/></svg>"); }
.ggallo-card:has(h3 a[href*="/family-law/"]), .ggallo-card:has(h3 a[href*="/derecho-familiar/"]) { --gg-c: #A23B5E; --gg-t: #F8E8EE; --gg-i: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A23B5E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='9' cy='7' r='3'/><circle cx='17' cy='9' r='2.5'/><path d='M3 20v-1a6 6 0 0 1 12 0v1M14 20v-.5a4.5 4.5 0 0 1 7-3.7'/></svg>"); }
.ggallo-card:has(h3 a[href*="/immigration/"]), .ggallo-card:has(h3 a[href*="/inmigracion/"]) { --gg-c: #0E7C7B; --gg-t: #E3F4F3; --gg-i: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E7C7B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18'/></svg>"); }
.ggallo-card:has(h3 a[href*="/bankruptcy/"]), .ggallo-card:has(h3 a[href*="/bancarrota/"]) { --gg-c: #2E7D4F; --gg-t: #E6F3EA; --gg-i: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E7D4F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M3 12a9 9 0 1 0 3-6.7L3 8'/><path d='M3 3v5h5'/></svg>"); }
.ggallo-card:has(h3 a[href*="/living-trusts/"]), .ggallo-card:has(h3 a[href*="/fideicomisos-en-vida/"]) { --gg-c: #8A5A00; --gg-t: #FBF1DC; --gg-i: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A5A00' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M3 11l9-7 9 7'/><path d='M5 10v10h14V10'/><path d='M10 20v-6h4v6'/></svg>"); }
.ggallo-card:has(h3 a[href*="/vital-record-amendments/"]), .ggallo-card:has(h3 a[href*="/correccion-de-actas/"]) { --gg-c: #5B4BB7; --gg-t: #EEEBFA; --gg-i: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B4BB7' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M14 3H6v18h12V7z'/><path d='M14 3v4h4M9 12h6M9 16h6'/></svg>"); }
.ggallo-card:has(h3 a[href*="/mexican-citizenship-residency/"]), .ggallo-card:has(h3 a[href*="/ciudadania-y-residencia-mexicana/"]) { --gg-c: #B4412A; --gg-t: #FBEAE5; --gg-i: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B4412A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='5' y='3' width='14' height='18' rx='2'/><circle cx='12' cy='10' r='3'/><path d='M9 17h6'/></svg>"); }
.ggallo-card:has(h3 a[href*="/conservatorships-guardianships/"]), .ggallo-card:has(h3 a[href*="/conservadurias-y-tutelas/"]) { --gg-c: #1B3F9E; --gg-t: #EAF1FC; --gg-i: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B3F9E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z'/></svg>"); }
.ggallo-card:has(h3 a[href*="/apostilles-translations/"]), .ggallo-card:has(h3 a[href*="/apostillas-y-traducciones/"]) { --gg-c: #1F6F8B; --gg-t: #E4F0F5; --gg-i: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F6F8B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='9' r='6'/><path d='M9 14l-2 7 5-3 5 3-2-7'/></svg>"); }
/* CTA, footer, notices, mobile bar */
.ggallo-cta { background: linear-gradient(125deg, #0B1F4D 0%, #16367F 100%); border-top: 0; position: relative; }
.ggallo-cta::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--gg-stripe); }
.site-footer { border-top: 0; box-shadow: inset 0 4px 0 #F2B33D; }
.site-footer h2 { color: var(--gg-gold-light); }
.ggallo-notice { border-left-color: var(--gg-teal); background: var(--gg-mint); }
.ggallo-notary-notice { border-left-color: var(--gg-gold-dark); background: var(--gg-cream); }
.site-topbar { box-shadow: inset 0 -2px 0 rgba(242,179,61,.55); }
.site-header .wp-block-navigation .wp-block-navigation-item__content:hover { color: #0E7C7B; }
@media (max-width: 781px) {
  .ggallo-mobile-bar { border-top: 0; box-shadow: 0 -4px 0 0 #F2B33D; }
  .ggallo-mobile-bar a[href*="wa.me"] { background: #0B6E5F; }
  .ggallo-mobile-bar a[href*="wa.me"]:hover, .ggallo-mobile-bar a[href*="wa.me"]:focus { background: #085649; }
}
.wp-element-button[href*="wa.me"]:not(.ggallo-hero *) { background: #0B6E5F; border-color: #0B6E5F; color: #fff; }
.wp-element-button[href*="wa.me"]:not(.ggallo-hero *):hover { background: #085649; }

/* =====================================================================
   v1.3 — photographs (theme assets, WebP + JPG)
   ===================================================================== */
.ggallo-hero--photo .wp-block-columns { align-items: center; gap: 2rem; margin: 0; }
.ggallo-hero--photo .ggallo-hero-media { margin: 0; }
.ggallo-hero--photo .ggallo-hero-media img { width: 100%; height: auto; border-radius: 12px; display: block; object-fit: cover; aspect-ratio: 3 / 2; box-shadow: 0 16px 40px rgba(0,0,0,.28); }
.ggallo-photo-wide { margin: 0 0 1.5rem; }
.ggallo-photo-wide img { width: 100%; height: auto; border-radius: 12px; display: block; }
.ggallo-service-photo { margin-bottom: 1.75rem; }
.ggallo-service-photo .ggallo-person { max-width: 16rem; }
.ggallo-service-photo .ggallo-person img,
.ggallo-service-photo .ggallo-person figure img { aspect-ratio: 4 / 5; }
@media (min-width: 782px) {
  .ggallo-hero--photo .wp-block-column:first-child { flex-basis: 54% !important; }
  .ggallo-hero--photo .wp-block-column:last-child { flex-basis: 46% !important; }
  .ggallo-service-photo .wp-block-column:first-child { flex-basis: 28% !important; flex-grow: 0; }
}
@media (max-width: 781px) {
  .ggallo-hero--photo .ggallo-hero-media { margin-top: 1rem; }
  .ggallo-service-photo .ggallo-person { max-width: 14rem; margin-inline: auto; }
}
