/*
Theme Name: Flavor
Theme URI: https://themeforest.net/item/flavor
Author: Flavor Studio
Author URI: https://flavor-theme.com
Description: Premium WordPress theme for professional associations, corporate organizations, chambers of commerce, and institutional sites. Built with accessibility and WCAG 2.1 AA requirements in mind. Features configurable homepage sections, partner carousel, member area support, multiple header/footer layouts, block patterns, animated counters, scroll animations, dark mode toggle, and full Customizer integration.
Version: 1.4.15
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: flavor
Tags: accessibility-ready, custom-logo, custom-menu, featured-images, footer-widgets, translation-ready, blog, one-column, two-columns, block-patterns, full-width-template, custom-colors
*/

/* ==========================================================================
   0. CSS Custom Properties (Design Tokens)
   ========================================================================== */
:root {
  /* Colors */
  --color-primary: #064e3b;
  --color-primary-light: #047857;
  --color-accent: #047857;
  --color-accent-light: rgba(4, 120, 87, 0.12);
  --color-accent-hover: #065f46;
  --color-accent-gradient: linear-gradient(135deg, #047857 0%, #065f46 100%);
  --color-text: #1a1a2e;
  --color-text-light: #4a4a68;
  --color-text-muted: #6b7280;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-bg-dark: #0f172a;
  --color-border: #e2e8f0;
  --color-border-dark: #cbd5e1;
  --color-white: #fff;
  --color-error: #dc2626;
  --color-success: #16a34a;
  --color-warning: #f59e0b;
  /* Typography */
  --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', sans-serif;
  --font-size-base: 16px;
  --line-height: 1.6;
  /* Spacing */
  --container-max: 1170px;
  --gap: 20px;
  --radius: 4px;
  /* Focus */
  --focus-outline: 3px solid #005fcc;
  --focus-offset: 2px;
  --focus-shadow: 0 0 0 5px rgba(0, 95, 204, 0.3);
  /* Touch target */
  --touch-min: 44px;
}

/* ==========================================================================
   1. Reset & Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-align: left;
}

article, aside, details, figcaption, figure,
footer, header, main, nav, section { display: block; }

img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }

/* ==========================================================================
   2. Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.3;
  margin: 0 0 0.5em;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p, li, dd, dt { color: var(--color-text-light); margin-bottom: 1em; line-height: var(--line-height); }

a { color: var(--color-accent); text-decoration: underline; }
a:hover, a:active { color: var(--color-accent-hover); text-decoration-thickness: 2px; }

b, strong { font-weight: 700; }
em, i, cite, dfn { font-style: italic; }

blockquote {
  margin: 1.5em 0 1.5em 1em;
  padding: 1em 1.5em;
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-accent);
  font-style: italic;
}

pre, code {
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  background: var(--color-bg-alt);
}
pre { padding: 1.5em; overflow: auto; margin-bottom: 1.5em; }

/* ==========================================================================
   3. Accessibility — Focus, SR-Only, Skip Link
   ========================================================================== */

/* Focus visible — WCAG 2.4.7 */
*:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
  box-shadow: var(--focus-shadow);
}
*:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

/* Screen reader only */
.sr-only,
.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Skip link — WCAG 2.4.1 */
.skip-link {
  position: absolute;
  left: -9999px;
  top: -9999px;
  z-index: 999999;
}
.skip-link:focus {
  display: block;
  position: fixed;
  top: 10px;
  left: 10px;
  padding: 15px 25px;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  clip: auto;
  width: auto;
  height: auto;
}

/* ==========================================================================
   4. Layout — Container & Grid
   ========================================================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(var(--gap) * -0.5);
}
.row > [class*="col"] {
  padding: 0 calc(var(--gap) * 0.5);
}

.col-1 { flex: 0 0 100%; max-width: 100%; }
.col-1-2 { flex: 0 0 50%; max-width: 50%; }
.col-1-3 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-2-3 { flex: 0 0 66.666%; max-width: 66.666%; }
.col-1-4 { flex: 0 0 25%; max-width: 25%; }
.col-3-4 { flex: 0 0 75%; max-width: 75%; }

/* Main content layout */
.site-content {
  display: flex;
  flex-wrap: wrap;
  padding: 2em 0;
}
body.home .site-content {
  padding: 0;
}
.content-area { flex: 1; min-width: 0; }
.content-column { flex: 1; min-width: 0; }
.widget-area { flex: 0 0 300px; max-width: 300px; padding-left: 2em; }

.no-sidebar .content-area { flex: 0 0 100%; max-width: 100%; }
.no-sidebar .widget-area { display: none; }

/* ==========================================================================
   5. Header
   ========================================================================== */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

/* Contact bar */
.header-contact {
  background: var(--color-bg);
  padding: 12px 0;
}
.header-contact .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1.5em;
}
.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 1;
}
.site-branding img { max-height: 60px; width: auto; flex-shrink: 0; }
.site-title {
  font-size: 1.15rem;
  margin: 0;
  line-height: 1.2;
  white-space: normal;
}
.site-title a { color: var(--color-primary); text-decoration: none; }
.site-title a:hover { color: var(--color-accent); }
.site-description { margin: 0; font-size: 0.85rem; color: var(--color-text-muted); white-space: normal; }

.contact-info {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  font-size: 0.85rem;
  justify-content: flex-end;
  flex-shrink: 0;
}
.contact-info a { 
  color: var(--color-primary); 
  text-decoration: none; 
  display: inline-flex; 
  align-items: center; 
  gap: 6px; 
}
.contact-info a:hover { text-decoration: underline; }
.contact-info .dashicons,
.contact-info .fa { margin-right: 4px; }

.contact-info .btn {
  margin-left: 5px;
  padding: 6px 12px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-primary);
  color: white;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  min-height: auto;
  transition: background 0.2s;
}
.contact-info .btn:hover {
  background: var(--color-accent);
}

@media (max-width: 1200px) {
  .contact-address {
    display: none !important;
  }
}

/* ==========================================================================
   6. Navigation
   ========================================================================== */
.nav-wrapper {
  background: var(--color-primary);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Desktop menu */
.main-nav .menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav .menu li {
  position: relative;
  margin: 0;
}
.main-nav .menu > li > a {
  display: flex;
  align-items: center;
  min-height: var(--touch-min);
  padding: 0 14px;
  color: var(--color-white);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: background 0.2s;
  white-space: nowrap;
}
.main-nav .menu > li > a:hover,
.main-nav .menu > li > a:focus,
.main-nav .menu > li.current-menu-item > a {
  background: rgba(255,255,255,0.15);
}

/* Submenus */
.main-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 9999;
}
.main-nav .sub-menu .sub-menu {
  top: 0;
  left: 100%;
}
.main-nav .sub-menu li { margin: 0; }
.main-nav .sub-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--color-border);
  min-height: var(--touch-min);
  display: flex;
  align-items: center;
}
.main-nav .sub-menu a:hover,
.main-nav .sub-menu a:focus {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

/* Show submenu on hover/focus */
.main-nav .menu li:hover > .sub-menu,
.main-nav .menu li:focus-within > .sub-menu {
  display: block;
}

/* Menu toggle (mobile) */
.menu-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--color-white);
  color: var(--color-white);
  padding: 8px 12px;
  font-size: 1.2rem;
  cursor: pointer;
  min-height: var(--touch-min);
  min-width: var(--touch-min);
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.menu-toggle:hover,
.menu-toggle:focus {
  background: rgba(255,255,255,0.15);
}
.menu-toggle[aria-expanded="true"] .menu-icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-icon-close { display: inline; }
.menu-toggle[aria-expanded="false"] .menu-icon-close { display: none; }

/* Search in nav */
.nav-search {
  position: relative;
  margin-left: auto;
}
.nav-search .search-field {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--color-white);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  width: 200px;
}
.nav-search .search-field::placeholder { color: rgba(255,255,255,0.7); }
.nav-search .search-submit { display: none; }

/* ==========================================================================
   7. Content
   ========================================================================== */
.entry-header { margin-bottom: 1em; }
.entry-title { font-size: 1.8rem; text-align: left; }
.entry-title a { color: var(--color-primary); text-decoration: none; }
.entry-title a:hover { color: var(--color-accent); }

.entry-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1em;
}
.entry-meta a { color: var(--color-text-muted); }
.entry-meta a:hover { color: var(--color-accent); }
.entry-meta span + span::before {
  content: '·';
  margin: 0 0.5em;
}

.entry-content { margin-bottom: 2em; }
.entry-content ul { list-style: disc; margin-left: 1.5em; }
.entry-content ol { list-style: decimal; margin-left: 1.5em; }

.entry-footer {
  border-top: 1px solid var(--color-border);
  padding-top: 1em;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.post-thumbnail { margin-bottom: 1.5em; }
.post-thumbnail img { border-radius: var(--radius); width: 100%; }

.more-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--color-accent);
  color: var(--color-white);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  min-height: var(--touch-min);
  transition: background 0.2s;
}
.more-link:hover, .more-link:focus {
  background: var(--color-accent-hover);
  color: var(--color-white);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5em;
  padding: 2em 0;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.9rem;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

/* ==========================================================================
   8. Sidebar & Widgets
   ========================================================================== */
.widget {
  margin-bottom: 2em;
  padding: 1.5em;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
}
.widget-title {
  font-size: 1.1rem;
  margin-bottom: 1em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--color-accent);
}
.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.widget ul li {
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { text-decoration: none; color: var(--color-text); }
.widget ul li a:hover { color: var(--color-accent); text-decoration: underline; }

/* ==========================================================================
   9. Forms — WCAG 3.3.2
   ========================================================================== */
label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--color-text);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  margin-bottom: 1em;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-accent);
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
}

button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  padding: 10px 24px;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
button:hover, input[type="submit"]:hover, .btn:hover {
  background: var(--color-accent);
}

/* ==========================================================================
   10. Partner Logos Carousel
   ========================================================================== */
.partners-carousel {
  background: var(--color-bg-alt);
  padding: 2em 0;
  border-top: 1px solid var(--color-border);
}
.partners-carousel h2 {
  text-align: center;
  font-size: 1.3rem;
  margin-bottom: 1.5em;
}
.carousel-track-wrapper {
  overflow: hidden;
  position: relative;
}
.carousel-track {
  display: flex;
  gap: 2em;
  animation: scroll-logos 30s linear infinite;
}
.carousel-track.is-paused {
  animation-play-state: paused !important;
}
.carousel-track:hover,
.carousel-track:focus-within {
  animation-play-state: paused;
}
.carousel-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-item a {
  display: flex;
  align-items: center;
  min-height: var(--touch-min);
  padding: 8px;
  border-radius: var(--radius);
}
.carousel-item img {
  max-height: 60px;
  width: auto;
  filter: grayscale(50%);
  opacity: 0.7;
  transition: all 0.3s;
}
.carousel-item a:hover img,
.carousel-item a:focus img {
  filter: grayscale(0);
  opacity: 1;
}

@keyframes scroll-logos {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   11. Footer
   ========================================================================== */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.85);
}
.footer-widgets {
  padding: 1.5em 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.footer-widgets .row {
  align-items: flex-start;
}
.footer-widgets .widget {
  background: transparent;
  padding: 0;
  margin-bottom: 0.75em;
  border: none;
}
.footer-widgets .widget-title {
  color: var(--color-white);
  border-bottom-color: rgba(255,255,255,0.3);
  font-size: 0.95rem;
  margin-bottom: 0.5em;
  padding-bottom: 0.3em;
}
.footer-widgets a {
  color: rgba(255,255,255,0.85);
  text-decoration: underline;
}
.footer-widgets a:hover { color: var(--color-white); }
.footer-widgets ul { margin: 0; padding: 0; }
.footer-widgets ul li {
  border-bottom-color: rgba(255,255,255,0.1);
  padding: 3px 0;
  font-size: 0.82rem;
  line-height: 1.4;
  margin-bottom: 0;
}
.footer-widgets ul li a { color: rgba(255,255,255,0.85); }

/* Footer images (logos, badges) — let them be the tallest element */
.footer-widgets .widget_media_image img,
.footer-widgets .widget img {
  max-height: 180px;
  width: auto;
  height: auto;
}

.site-info {
  padding: 1.5em 0;
  text-align: center;
  font-size: 0.85rem;
}
.site-info p {
  color: rgba(255,255,255,0.85);
  margin: 0 0 0.5em 0;
}
.site-info a {
  color: rgba(255,255,255,0.85);
}
.site-info a:hover {
  color: #fff;
}
.site-info a { color: rgba(255,255,255,0.85); }
.site-info a:hover { color: var(--color-white); }
.a11y-footer-link {
  display: block;
  margin-top: 0.5em;
}

.go-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
}
.go-to-top a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-min);
  height: var(--touch-min);
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: background 0.2s;
}
.go-to-top a:hover { background: var(--color-accent-hover); }

/* ==========================================================================
   12. WP-Members Styles
   ========================================================================== */
#wpmem_login, #wpmem_reg, .wpmem_msg {
  max-width: 500px;
  margin: 2em auto;
  padding: 2em;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}
#wpmem_login legend, #wpmem_reg legend {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-primary);
  font-weight: 700;
}
#wpmem_login label, #wpmem_reg label { font-weight: 600; }

/* ==========================================================================
   13. Contact Form 7
   ========================================================================== */
.wpcf7-response-output {
  padding: 1em;
  border-radius: var(--radius);
  margin: 1em 0;
}
.wpcf7-mail-sent-ok { background: #e8f5e9; color: var(--color-success); border: 1px solid var(--color-success); }
.wpcf7-validation-errors { background: #ffebee; color: var(--color-error); border: 1px solid var(--color-error); }

/* ==========================================================================
   14. 404 & Search
   ========================================================================== */
.error-404 .page-content,
.no-results .page-content {
  text-align: center;
  padding: 3em 1em;
}
.error-404 .page-title { font-size: 4rem; color: var(--color-accent); }

/* ==========================================================================
   15. Comments
   ========================================================================== */
.comments-area { margin-top: 3em; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment {
  padding: 1.5em 0;
  border-bottom: 1px solid var(--color-border);
}
.comment-author { font-weight: 700; }
.comment-metadata { font-size: 0.8rem; color: var(--color-text-muted); }
.reply a { font-size: 0.85rem; }

/* ==========================================================================
   16. Tables
   ========================================================================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}
th, td {
  padding: 10px 14px;
  border: 1px solid var(--color-border-dark);
  text-align: left;
}
th {
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
}
tr:nth-child(even) { background: var(--color-bg-alt); }

/* ==========================================================================
   17. Responsive
   ========================================================================== */
@media (max-width: 992px) {
  .col-1-2, .col-1-3, .col-2-3, .col-1-4, .col-3-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .widget-area {
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 0;
    margin-top: 2em;
  }
  .contact-info { display: none; }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .main-nav .menu {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-primary);
    z-index: 9999;
    border-top: 1px solid rgba(255,255,255,0.15);
  }
  .main-nav .menu.is-active { display: flex; }
  .main-nav .menu > li > a { padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .main-nav .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: rgba(0,0,0,0.15);
  }
  .main-nav .sub-menu a { color: rgba(255,255,255,0.9); padding-left: 40px; border-bottom-color: rgba(255,255,255,0.05); }
  .main-nav .sub-menu a:hover { background: rgba(255,255,255,0.1); color: var(--color-white); }
  .nav-search { display: none; }
  .nav-wrapper { position: relative; }

  .footer-widgets .row { flex-direction: column; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.4rem; }
}

/* ==========================================================================
   18. Print
   ========================================================================== */
@media print {
  .site-header, .site-footer, .nav-wrapper, .menu-toggle,
  .go-to-top, .partners-carousel, .widget-area, .nav-search { display: none !important; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; text-decoration: underline; }
  .container { max-width: 100%; }
}

/* ==========================================================================
   19. Premium — Scroll Reveal
   ========================================================================== */
/*
 * Sections are visible by default.
 * JS (animations.js) adds .js-loaded to <body> before animating,
 * so users without JS or in the Customizer preview always see content.
 */
body.js-loaded .flavor-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
body.js-loaded .flavor-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
body.js-loaded .flavor-reveal[data-delay="1"] { transition-delay: 0.15s; }
body.js-loaded .flavor-reveal[data-delay="2"] { transition-delay: 0.30s; }
body.js-loaded .flavor-reveal[data-delay="3"] { transition-delay: 0.45s; }

/* ==========================================================================
   20. Premium — Glassmorphism Cards
   ========================================================================== */
.flavor-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 2em;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.flavor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   21. Premium — Gradient Buttons
   ========================================================================== */
.btn-gradient {
  background: var(--color-accent-gradient);
  color: var(--color-white);
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}
.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
  background: var(--color-accent-gradient);
  color: var(--color-white);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}
.btn-outline:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

/* ==========================================================================
   22. Premium — Hero Section
   ========================================================================== */
.flavor-hero {
  position: relative;
  background: var(--color-bg-dark);
  color: var(--color-white);
  padding: 6em 0;
  text-align: center;
  overflow: hidden;
}
.flavor-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--color-accent-gradient);
  opacity: 0.85;
  z-index: 1;
}
.flavor-hero .container { position: relative; z-index: 2; }
.flavor-hero h1 { color: var(--color-white); font-size: 3rem; margin-bottom: 0.5em; }
.flavor-hero p { color: rgba(255,255,255,0.9); font-size: 1.2rem; max-width: 600px; margin: 0 auto 2em; }

/* ==========================================================================
   23. Premium — Counter Stats
   ========================================================================== */
/* Wrapper section */
.flavor-stats-section {
  background: var(--color-bg-alt);
  padding: 2.5em 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
/* Inner grid */
.flavor-stats {
  display: flex;
  justify-content: center;
  gap: 3em;
  flex-wrap: wrap;
  padding: 0;
}
/* Also handle the case where .flavor-stats is the section itself (legacy) */
section.flavor-stats {
  background: var(--color-bg-alt);
  padding: 2.5em 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
section.flavor-stats .flavor-stats {
  padding: 0;
}
.flavor-stat {
  text-align: center;
  min-width: 140px;
}
.flavor-counter {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
  display: block;
}
.flavor-stat-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.5em;
}

/* ==========================================================================
   24. Premium — CTA Section
   ========================================================================== */
.flavor-cta-section {
  background: var(--color-bg-dark);
  color: var(--color-white);
  padding: 4em 0;
  text-align: center;
}
.flavor-cta-section h2 { color: var(--color-white); }
.flavor-cta-section p { color: rgba(255,255,255,0.8); max-width: 550px; margin: 0 auto 1.5em; }

/* CTA Widget */
.flavor-cta-widget {
  background: var(--color-accent-gradient);
  color: var(--color-white);
  padding: 2em;
  border-radius: 12px;
  text-align: center;
}
.flavor-cta-widget h3 { color: var(--color-white); }
.flavor-cta-widget p { color: rgba(255,255,255,0.9); }
.flavor-cta-btn {
  background: var(--color-white) !important;
  color: var(--color-accent) !important;
  font-weight: 700;
  border-radius: 8px;
  margin-top: 0.5em;
}
.flavor-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ==========================================================================
   25. Premium — Submenu Toggle
   ========================================================================== */
.submenu-toggle {
  background: transparent;
  border: none;
  color: inherit;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 0.8rem;
  min-height: auto;
  min-width: auto;
  display: inline-flex;
  transition: transform 0.2s;
}
.submenu-toggle[aria-expanded="true"] {
  transform: rotate(180deg);
}

/* ==========================================================================
   26. Premium — Social Links
   ========================================================================== */
.flavor-social-links ul {
  display: flex;
  gap: 0.5em;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.flavor-social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  padding: 8px 14px;
  border: 1px solid currentColor;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
}
.footer-widgets .flavor-social-links a {
  border-color: rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.85);
}
.flavor-social-links a:hover {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

/* ==========================================================================
   27. Premium — Page Templates
   ========================================================================== */
.page-template-fullwidth .content-area { flex: 0 0 100%; max-width: 100%; }
.page-template-fullwidth .widget-area { display: none; }
.page-template-sidebar-left .site-content { flex-direction: row-reverse; }
.page-template-sidebar-left .widget-area { padding-left: 0; padding-right: 2em; }

/* ==========================================================================
   28. Premium — Enhanced Radius & Shadows
   ========================================================================== */
.post-thumbnail img { border-radius: 12px; }
.widget { border-radius: 12px; border: 1px solid var(--color-border); }
.site-header { box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.nav-wrapper { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
input, textarea, select { border-radius: 8px; }
button, .btn, .more-link { border-radius: 8px; }
.pagination .page-numbers { border-radius: 8px; }

/* ==========================================================================
   29. Grid System — Row / Columns
   ========================================================================== */
.row { display: flex; flex-wrap: wrap; gap: var(--gap); }
.col-1   { flex: 0 0 100%; max-width: 100%; }
.col-1-2 { flex: 0 0 calc(50% - var(--gap)/2); max-width: calc(50% - var(--gap)/2); }
.col-1-3 { flex: 0 0 calc(33.333% - var(--gap)*2/3); max-width: calc(33.333% - var(--gap)*2/3); }
.col-1-4 { flex: 0 0 calc(25% - var(--gap)*3/4); max-width: calc(25% - var(--gap)*3/4); }

@media (max-width: 768px) {
  .col-1-2, .col-1-3, .col-1-4 { flex: 0 0 100%; max-width: 100%; }
}

/* ==========================================================================
   30. Hero Section
   ========================================================================== */
.flavor-hero {
  background: var(--color-accent-gradient);
  color: var(--color-white);
  padding: 4em 0 3em;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.flavor-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(124,58,237,0.2) 0%, transparent 40%);
  pointer-events: none;
}
.flavor-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: 0.5em;
  position: relative;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.2;
}
.flavor-hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 700px;
  margin: 0 auto 2em;
  opacity: 0.92;
}
.flavor-hero .btn { position: relative; }
.flavor-hero .btn-outline {
  background: transparent;
  border: 2px solid var(--color-white);
  color: var(--color-white);
}
.flavor-hero .btn-outline:hover,
.flavor-hero .btn-outline:focus-visible {
  background: var(--color-white);
  color: var(--color-primary);
}

/* ==========================================================================
   31. Stats Section (Animated Counters)
   ========================================================================== */
.flavor-stats {
  display: flex;
  justify-content: center;
  gap: 3em;
  flex-wrap: wrap;
  padding: 1.5em 0;
}
section.flavor-stats { background: var(--color-bg-alt); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.flavor-stat {
  text-align: center;
  min-width: 140px;
}
.flavor-counter {
  display: block;
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  background: var(--color-accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.flavor-stat-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.3em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
section.flavor-stats .flavor-stat-label { color: var(--color-text-muted); }

/* ==========================================================================
   32. Glassmorphism Cards
   ========================================================================== */
.flavor-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 2em;
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.flavor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.flavor-card h2 { font-size: 1.3rem; margin-bottom: 0.5em; }
.flavor-card h3 { font-size: 1.15rem; margin-bottom: 0.5em; }
.flavor-card p { color: var(--color-text-light); line-height: 1.7; }
.flavor-card a:not(.btn) {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
}
.flavor-card a:not(.btn):hover { text-decoration: underline; }
.flavor-card img {
  border-radius: 12px;
  margin-bottom: 1em;
  width: 100%;
  height: auto;
}

/* ==========================================================================
   33. CTA Section
   ========================================================================== */
.flavor-cta-section {
  background: var(--color-bg-dark);
  color: var(--color-white);
  padding: 4em 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.flavor-cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(37,99,235,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.flavor-cta-section h2 {
  color: var(--color-white);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.5em;
  position: relative;
}
.flavor-cta-section p {
  max-width: 600px;
  margin: 0 auto 1.5em;
  opacity: 0.85;
  position: relative;
}
.flavor-cta-section .btn { position: relative; }

/* ==========================================================================
   34. Scroll Reveal Transitions
   ========================================================================== */
.flavor-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.flavor-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.flavor-reveal[data-delay="1"] { transition-delay: 0.15s; }
.flavor-reveal[data-delay="2"] { transition-delay: 0.3s; }
.flavor-reveal[data-delay="3"] { transition-delay: 0.45s; }

@media (prefers-reduced-motion: reduce) {
  .flavor-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   35. Partners Carousel
   ========================================================================== */
.partners-carousel {
  background: var(--color-bg-alt);
  padding: 3em 0;
  overflow: hidden;
}
.partners-carousel h2 {
  text-align: center;
  margin-bottom: 1.5em;
  font-size: 1.5rem;
}
.carousel-track-wrapper { overflow: hidden; }
.carousel-track {
  display: flex;
  animation: carousel-scroll 30s linear infinite;
  gap: 3em;
}
.carousel-item {
  flex: 0 0 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-item img {
  max-height: 60px;
  width: auto;
  filter: grayscale(1);
  opacity: 0.6;
  transition: filter 0.3s, opacity 0.3s;
}
.carousel-item img:hover,
.carousel-item a:focus-visible img {
  filter: grayscale(0);
  opacity: 1;
}
@keyframes carousel-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .carousel-track { animation: none; flex-wrap: wrap; justify-content: center; }
}

.carousel-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}
.carousel-pause,
.job-ticker-toggle,
.fh-hero-video-toggle {
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border: 2px solid currentColor;
  border-radius: 4px;
  background: #fff;
  color: #064e3b;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* Header ticker: contain the long animated track at narrow widths and expose a pause control. */
.job-ticker-wrapper {
  max-width: 100%;
  min-width: 0;
}
.job-ticker-label {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 0.3rem;
  padding: 0.55rem 1rem;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85em;
  white-space: nowrap;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  z-index: 2;
}
.job-ticker-marquee {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  font-size: var(--ticker-size, 0.95em);
}
.job-ticker-track {
  display: inline-block;
  width: max-content;
  padding-left: 100%;
  animation: flavor-marquee var(--ticker-speed, 300s) linear infinite;
}
.job-ticker-track.is-paused,
.job-ticker-track:hover,
.job-ticker-track:focus-within {
  animation-play-state: paused;
}
.job-ticker-toggle {
  flex: 0 0 auto;
  margin: 0.2rem 0.35rem;
  border-color: #fff;
  background: #064e3b;
  color: #fff;
  white-space: nowrap;
  z-index: 2;
}
@keyframes flavor-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
@media (max-width: 600px) {
  .job-ticker-label { padding-inline: 0.65rem; }
  .job-ticker-label-text,
  .job-ticker-toggle-text { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; }
  .job-ticker-toggle { min-width: 44px; padding-inline: 0.6rem; }
}

.fh-hero-video-toggle {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 5;
  border-color: #fff;
  background: rgba(6, 78, 59, 0.96);
  color: #fff;
}

/* ==========================================================================
   36. Back to Top Button
   ========================================================================== */
.go-to-top {
  position: fixed;
  bottom: 2em;
  right: 2em;
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.go-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.go-to-top a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-accent-gradient);
  color: var(--color-white);
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.5rem;
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
  transition: box-shadow 0.3s, transform 0.2s;
}
.go-to-top a:hover,
.go-to-top a:focus-visible {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37,99,235,0.5);
}

/* ==========================================================================
   37. Responsive Fine-tuning
   ========================================================================== */
@media (max-width: 600px) {
  .flavor-hero { padding: 2.5em 1em 2em; }
  .flavor-stats { gap: 1.5em; }
  .flavor-counter { font-size: 2.2rem; }
  .flavor-card { padding: 1.5em; }
  .flavor-cta-section { padding: 3em 1em; }
}

/* ==========================================================================
   38. Breadcrumbs
   ========================================================================== */
.flavor-breadcrumbs {
  padding: 1em 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.flavor-breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.flavor-breadcrumbs li { display: inline-flex; align-items: center; }
.flavor-breadcrumbs a {
  color: var(--color-accent);
  text-decoration: none;
}
.flavor-breadcrumbs a:hover { text-decoration: underline; }
.breadcrumb-sep { margin: 0 0.4em; color: var(--color-border-dark); }
.flavor-breadcrumbs [aria-current] { color: var(--color-text); font-weight: 500; }

/* ==========================================================================
   39. 404 Page
   ========================================================================== */
.flavor-404 {
  text-align: center;
  padding: 5em 1em;
}
.flavor-404-code {
  font-family: var(--font-heading);
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 900;
  line-height: 1;
  background: var(--color-accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.1em;
  animation: pulse-404 3s ease-in-out infinite;
}
@keyframes pulse-404 {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
  .flavor-404-code { animation: none; }
}
.flavor-404 h1 { margin-bottom: 0.5em; }
.flavor-404 p { color: var(--color-text-light); max-width: 500px; margin: 0 auto 1.5em; }

/* ==========================================================================
   40. Posts Grid (Archive)
   ========================================================================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5em;
}
.posts-grid .flavor-card { display: flex; flex-direction: column; }
.posts-grid .card-content { flex: 1; display: flex; flex-direction: column; }
.posts-grid .entry-title { font-size: 1.15rem; margin-bottom: 0.3em; }
.posts-grid .entry-title a { color: var(--color-text); text-decoration: none; }
.posts-grid .entry-title a:hover { color: var(--color-accent); }
.posts-grid .entry-meta { font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 0.8em; }
.posts-grid .entry-summary { flex: 1; color: var(--color-text-light); line-height: 1.6; }
.posts-grid .read-more {
  display: inline-block;
  margin-top: auto;
  padding-top: 0.8em;
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}
.posts-grid .read-more:hover { text-decoration: underline; }
.posts-grid .post-thumbnail-link img { width: 100%; height: auto; }

.archive-header { margin-bottom: 2em; }
.archive-title { margin-bottom: 0.3em; }
.archive-description { color: var(--color-text-light); }

/* ==========================================================================
   41. Single Post
   ========================================================================== */
.flavor-single .entry-header { margin-bottom: 1.5em; }
.flavor-single .entry-title { font-size: clamp(1.5rem, 4vw, 2.5rem); line-height: 1.2; text-align: left; }
.flavor-single .entry-meta { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 0.5em; }
.flavor-single .entry-meta .sep { margin: 0 0.5em; }
.flavor-single .entry-meta a { color: var(--color-accent); text-decoration: none; }
.flavor-single .entry-content { margin-bottom: 2em; }
.flavor-single .entry-footer { border-top: 1px solid var(--color-border); padding-top: 1em; margin-top: 2em; }
.flavor-single .tag-label { font-weight: 600; margin-right: 0.5em; }

/* Post Navigation */
.post-navigation {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--color-border);
  padding-top: 1.5em;
  margin-top: 2em;
  gap: 1em;
}
.post-navigation .nav-links { display: flex; justify-content: space-between; width: 100%; }
.post-navigation a { color: var(--color-accent); text-decoration: none; font-weight: 500; }
.post-navigation a:hover { text-decoration: underline; }
.nav-previous, .nav-next { max-width: 45%; }

/* ==========================================================================
   42. Comments
   ========================================================================== */
.comments-area { margin-top: 3em; padding-top: 2em; border-top: 1px solid var(--color-border); }
.comments-title { font-size: 1.5rem; margin-bottom: 1.5em; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { margin-bottom: 1.5em; padding-bottom: 1.5em; border-bottom: 1px solid var(--color-border); }
.comment-body { display: grid; grid-template-columns: 48px 1fr; gap: 1em; }
.comment-body .avatar { border-radius: 50%; }
.comment-meta { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.5em; }
.comment-content p { margin: 0.5em 0; }
.comment-reply-link {
  font-size: 0.8rem;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}
.comment-respond { margin-top: 2em; }
.comment-form label { display: block; font-weight: 500; margin-bottom: 0.3em; }
.comment-form input,
.comment-form textarea { width: 100%; }

/* ==========================================================================
   43. WooCommerce Overrides
   ========================================================================== */
.woocommerce-content { padding: 2em 0; }
.woocommerce ul.products li.product {
  border-radius: 16px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: box-shadow 0.3s;
}
.woocommerce ul.products li.product:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.08); }
.woocommerce ul.products li.product .price { color: var(--color-accent); font-weight: 700; }
.woocommerce .button,
.woocommerce a.button {
  background: var(--color-accent-gradient) !important;
  color: var(--color-white) !important;
  border: none !important;
  border-radius: 8px !important;
}
/* ==========================================================================
   44. Dark Mode — handled exclusively by JS toggle ([data-theme="dark"])
   The prefers-color-scheme auto-detection was removed because it conflicted
   with the manual toggle in dark-mode.js, causing unpredictable mixed colors.
   See section 59 for the [data-theme="dark"] rules.
   ========================================================================== */

/* ==========================================================================
   45. Print Styles
   ========================================================================== */
@media print {
  *, *::before, *::after { background: transparent !important; color: #000 !important; box-shadow: none !important; text-shadow: none !important; }
  a, a:visited { text-decoration: underline; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
  a[href^="#"]::after, a[href^="javascript"]::after { content: ""; }
  abbr[title]::after { content: " (" attr(title) ")"; }
  img { max-width: 100% !important; page-break-inside: avoid; }
  p, h2, h3 { orphans: 3; widows: 3; }
  h2, h3 { page-break-after: avoid; }

  /* Hide non-content */
  .site-header,
  .site-footer,
  .nav-wrapper,
  .go-to-top,
  .partners-carousel,
  .flavor-hero,
  .searchform,
  .comment-respond,
  .post-navigation,
  .pagination { display: none !important; }

  .container { max-width: 100%; margin: 0; padding: 0; }
  .site-content { flex-direction: column; }
  .widget-area { display: none; }
  .content-column { max-width: 100%; flex: 0 0 100%; }

  @page { margin: 2cm; }
}

/* ==========================================================================
   46. RTL Support
   ========================================================================== */
[dir="rtl"] .main-nav .menu { flex-direction: row-reverse; }
[dir="rtl"] .main-nav .sub-menu { left: auto; right: 0; }
[dir="rtl"] .main-nav .sub-menu .sub-menu { left: auto; right: 100%; }
[dir="rtl"] .flavor-breadcrumbs ol { direction: rtl; }
[dir="rtl"] .breadcrumb-sep { transform: scaleX(-1); }
[dir="rtl"] .post-navigation .nav-previous { text-align: right; }
[dir="rtl"] .post-navigation .nav-next { text-align: left; }
[dir="rtl"] .entry-meta .sep { margin: 0 0.5em; }
[dir="rtl"] .header-contact { text-align: left; }
[dir="rtl"] .site-branding { text-align: right; }
[dir="rtl"] .footer-widgets .row { flex-direction: row-reverse; }

/* ==========================================================================
   47. Sticky Header
   ========================================================================== */
.site-header.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  animation: slideDown 0.3s ease;
  box-shadow: 0 2px 16px rgba(0,0,0,0.12);
}
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}
.site-header.is-sticky .top-bar { display: none; }
@media (prefers-reduced-motion: reduce) {
  .site-header.is-sticky { animation: none; }
}

/* ==========================================================================
   48. Reading Progress Bar
   ========================================================================== */
.flavor-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--color-accent-gradient);
  z-index: 10001;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ==========================================================================
   49. Social Share Buttons
   ========================================================================== */
.flavor-share {
  display: flex;
  align-items: center;
  gap: 0.8em;
  flex-wrap: wrap;
  padding: 1.5em 0;
  border-top: 1px solid var(--color-border);
  margin-top: 2em;
}
.share-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}
.share-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.share-link:hover,
.share-link:focus-visible {
  transform: scale(1.1);
}
.share-twitter:hover  { background: #1da1f2; color: #fff; }
.share-facebook:hover { background: #1877f2; color: #fff; }
.share-linkedin:hover { background: #0a66c2; color: #fff; }
.share-whatsapp:hover { background: #25d366; color: #fff; }
.share-email:hover    { background: var(--color-accent); color: #fff; }

/* ==========================================================================
   50. Author Box
   ========================================================================== */
.flavor-author-box {
  display: flex;
  gap: 1.5em;
  padding: 2em;
  background: var(--color-bg-alt);
  border-radius: 16px;
  border: 1px solid var(--color-border);
  margin: 2em 0;
}
.author-avatar img {
  border-radius: 50%;
  width: 80px;
  height: 80px;
}
.author-info { flex: 1; }
.author-name { margin: 0 0 0.3em; font-size: 1.1rem; }
.author-name a { color: var(--color-text); text-decoration: none; }
.author-name a:hover { color: var(--color-accent); }
.author-bio { color: var(--color-text-light); font-size: 0.9rem; line-height: 1.6; margin: 0 0 0.5em; }
.author-website {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
}
.author-website:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .flavor-author-box { flex-direction: column; text-align: center; }
  .author-avatar img { margin: 0 auto; }
}

/* ==========================================================================
   51. Related Posts
   ========================================================================== */
.flavor-related {
  margin-top: 3em;
  padding-top: 2em;
  border-top: 1px solid var(--color-border);
}
.related-title { font-size: 1.5rem; margin-bottom: 1em; }
.flavor-card-sm { padding: 1.2em; }
.flavor-card-sm .entry-title { font-size: 1rem; margin-bottom: 0.3em; }
.flavor-card-sm .entry-title a { color: var(--color-text); text-decoration: none; }
.flavor-card-sm .entry-title a:hover { color: var(--color-accent); }
.flavor-card-sm .entry-meta { font-size: 0.8rem; color: var(--color-text-muted); }

/* ==========================================================================
   52. Table of Contents
   ========================================================================== */
.flavor-toc {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.2em 1.5em;
  margin-bottom: 2em;
}
.flavor-toc summary {
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  color: var(--color-primary);
}
.flavor-toc-list {
  margin: 0.8em 0 0;
  padding-left: 1.5em;
  list-style: none;
  counter-reset: toc;
}
.flavor-toc-list li { margin-bottom: 0.3em; }
.flavor-toc-list li::before {
  counter-increment: toc;
  content: counters(toc, ".") ". ";
  font-weight: 600;
  color: var(--color-accent);
}
.flavor-toc-list .toc-h3 { padding-left: 1.5em; font-size: 0.9em; }
.flavor-toc-list a { color: var(--color-text); text-decoration: none; }
.flavor-toc-list a:hover { color: var(--color-accent); text-decoration: underline; }

/* ==========================================================================
   53. Reading Time Badge
   ========================================================================== */
.reading-time {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ==========================================================================
   54. Cookie Consent Banner
   ========================================================================== */
.flavor-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: var(--color-bg-dark);
  color: rgba(255,255,255,0.9);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5em;
  max-width: 1170px;
  margin: 0 auto;
  padding: 1em 1.5em;
}
.cookie-text { margin: 0; font-size: 0.9rem; flex: 1; }
.cookie-text a { color: var(--color-accent); }
.cookie-actions { display: flex; gap: 0.8em; flex-shrink: 0; }
.cookie-reject { background: transparent; border: 1px solid rgba(255,255,255,0.3); color: rgba(255,255,255,0.7); }
.cookie-reject:hover { border-color: #fff; color: #fff; }

@media (max-width: 768px) {
  .cookie-inner { flex-direction: column; text-align: center; }
  .cookie-actions { justify-content: center; }
}

/* ==========================================================================
   55. Newsletter Widget
   ========================================================================== */
.flavor-newsletter-widget { text-align: center; }
.newsletter-form {
  display: flex;
  gap: 0.5em;
}
.newsletter-form input[type="email"] {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-size: 0.9rem;
}
.newsletter-form .btn { white-space: nowrap; }
.newsletter-privacy {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.5em;
}

@media (max-width: 480px) {
  .newsletter-form { flex-direction: column; }
}

/* ==========================================================================
   56. Search Form Enhanced
   ========================================================================== */
.search-wrapper {
  display: flex;
  position: relative;
}
.search-wrapper .search-field {
  flex: 1;
  padding-right: 48px;
}
.search-submit {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.2s;
}
.search-submit:hover,
.search-submit:focus-visible { color: var(--color-accent); }

/* ==========================================================================
   57. Responsive Menu Fixes
   ========================================================================== */
@media (max-width: 991px) {
  .main-nav { flex-wrap: wrap; }
  .menu-toggle { display: block; background: transparent; border: 1px solid rgba(255,255,255,0.3); color: #fff; padding: 8px 12px; border-radius: 4px; cursor: pointer; margin-left: auto; }
  .main-nav .menu { display: none; width: 100%; flex-direction: column; padding: 10px 0; }
  .main-nav.is-open .menu { display: flex; }
  .main-nav .menu > li > a { white-space: normal; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.1); height: auto; min-height: 44px; }
  .main-nav .sub-menu { position: static; display: none; padding-left: 20px; border: none; box-shadow: none; background: rgba(0,0,0,0.2); }
  .main-nav .menu li:hover > .sub-menu, .main-nav .menu li.focus > .sub-menu { display: block; }
}
@media (min-width: 992px) {
  .menu-toggle { display: none; }
}


/* Mobile-only member access CTA. Desktop keeps the existing top-bar button. */
.mobile-member-access {
  display: none;
}

@media (max-width: 991px) {
  .main-nav .menu > li.mobile-member-access {
    display: list-item;
    margin: 8px 12px 4px;
  }

  .main-nav .menu > li.mobile-member-access > a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 14px;
    border: 1px solid rgba(255,255,255,.38);
    border-radius: 6px;
    background: var(--color-accent);
    color: #fff;
    font-weight: 700;
    text-align: center;
  }

  .main-nav .menu > li.mobile-member-access > a:hover,
  .main-nav .menu > li.mobile-member-access > a:focus-visible {
    background: var(--color-accent-hover);
    color: #fff;
  }

  .mobile-member-access__icon {
    line-height: 1;
  }
}

/* ==========================================================================
   58. PREMIUM REDESIGN — COACCM Marketplace Level
   ========================================================================== */

/* --- Design Tokens Override: More Premium --- */
:root {
  --color-primary: #064e3b;
  --color-primary-light: #047857;
  --color-accent: #047857;
  --color-accent-hover: #065f46;
  --color-accent-gradient: linear-gradient(135deg, #047857 0%, #065f46 100%);
  --color-gold: #f59e0b;
  --color-gold-light: rgba(245,158,11,0.1);
  --color-bg-dark-deep: #060d17;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.07);
  --shadow-xl:  0 24px 64px rgba(0,0,0,.16), 0 8px 24px rgba(0,0,0,.09);
  --shadow-green: 0 8px 30px rgba(16,185,129,.35);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --transition-fast: 0.15s cubic-bezier(.4,0,.2,1);
  --transition-base: 0.25s cubic-bezier(.4,0,.2,1);
  --transition-slow: 0.45s cubic-bezier(.4,0,.2,1);
}

/* --- Global body refinement --- */
body {
  text-align: left;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
}

/* --- Premium Typography Scale --- */
h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; letter-spacing: -0.015em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.7rem); font-weight: 700; }
h4 { font-size: 1.2rem; font-weight: 600; }

/* --- Header: Light top bar (Original Style) --- */
.header-contact {
  background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 12px 0;
}
.header-contact .site-title a { color: var(--color-primary); }
.header-contact .site-description { color: var(--color-text-muted); }
.header-contact .contact-info { color: var(--color-text-muted); font-size: 0.85rem; font-weight: 500; }
.header-contact .contact-info a { color: var(--color-text-muted); }
.header-contact .contact-info a:hover { color: var(--color-accent); text-decoration: none; }
.header-contact .contact-info .btn {
  background: var(--color-primary);
  color: #fff !important;
  box-shadow: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0;
  transition: background var(--transition-fast);
}
.header-contact .contact-info .btn:hover {
  transform: none;
  box-shadow: none;
  background: var(--color-primary-light);
}

/* Site logo refinement */
.site-branding img { max-height: 50px; }
.site-title { font-size: 1rem; }

/* --- Navigation: Sticky with blur --- */
.nav-wrapper {
  background: var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}
.nav-wrapper.scrolled {
  background: rgba(6, 78, 59, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0,0,0,0.25);
}

/* Nav items with solid background */
.main-nav .menu > li > a {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 14px 18px;
  display: block;
  color: #ffffff;
  transition: background var(--transition-fast);
}
.main-nav .menu > li > a:hover,
.main-nav .menu > li.current-menu-item > a {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Submenu premium */
.main-nav .sub-menu {
  border: none;
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-md);
  animation: subMenuFadeIn 0.18s ease both;
  top: calc(100% + 2px);
}
.main-nav .menu > li > .sub-menu {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.main-nav .sub-menu li {
  position: relative;
}
.main-nav .sub-menu .sub-menu {
  top: 0;
  left: 100%;
  margin-top: -10px;
}
@keyframes subMenuFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.main-nav .sub-menu a {
  font-size: 0.88rem;
  padding: 12px 22px;
  border-bottom: 1px solid var(--color-border);
  font-weight: 500;
  transition: background var(--transition-fast), padding-left var(--transition-fast);
}
.main-nav .sub-menu a:hover {
  background: var(--color-accent-light);
  padding-left: 28px;
  color: var(--color-primary);
}
/* Redondear la esquina inferior del hover si es el último hijo */
.main-nav .sub-menu li:last-child > a { border-bottom: none; border-radius: 0 0 var(--radius-md) var(--radius-md); }
.main-nav .menu > li > .sub-menu > li:first-child > a { border-radius: 0; }
.main-nav .sub-menu .sub-menu li:first-child > a { border-radius: var(--radius-md) var(--radius-md) 0 0; }

/* Nav search box */
.nav-search .search-field {
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 0.85rem;
  width: 180px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.nav-search .search-field::placeholder { color: rgba(255,255,255,0.7); }
.nav-search .search-field:focus {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.4);
  color: #fff;
  outline: none;
}

/* --- Premium Buttons --- */
.btn,
button,
input[type="submit"] {
  border-radius: var(--radius-md);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.btn-primary,
.wp-block-button__link,
.wp-element-button {
  background: var(--color-accent-gradient) !important;
  color: #fff !important;
  box-shadow: var(--shadow-green);
  border-radius: var(--radius-md) !important;
  border: none !important;
  padding: 12px 28px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.btn-primary:hover,
.wp-block-button__link:hover,
.wp-element-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(16,185,129,.45) !important;
  color: #fff !important;
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  color: #fff !important;
  box-shadow: 0 8px 30px rgba(220,38,38,.3);
}
.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(220,38,38,.45) !important;
}

/* --- Premium Cards (override) --- */
.flavor-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  overflow: hidden;
}
.flavor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

/* Step boxes (Alta / Baja) premium override */
.wp-block-column.has-background {
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-md);
  border-top: 3px solid var(--color-accent);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.wp-block-column.has-background:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* --- Premium Forms --- */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea, select {
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  padding: 12px 16px;
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  background: var(--color-bg);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
  outline: none;
}
label {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

/* CF7 form premium */
.wpcf7-form .wpcf7-submit {
  background: var(--color-accent-gradient);
  box-shadow: var(--shadow-green);
  border-radius: var(--radius-md);
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 14px 36px;
  font-size: 1rem;
  width: 100%;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.wpcf7-form .wpcf7-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 44px rgba(16,185,129,.45);
}
.wpcf7-response-output {
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-weight: 500;
}
.wpcf7-mail-sent-ok { background: rgba(16,185,129,.08); border-color: var(--color-accent); color: #064e3b; }
.wpcf7-validation-errors { background: rgba(220,38,38,.06); border-color: var(--color-error); color: #991b1b; }

/* --- Legal notice boxes premium --- */
.flavor-legal-notice {
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

/* --- Footer: Deep dark premium --- */
.site-footer {
  background: var(--color-bg-dark-deep);
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}
.footer-widgets {
  padding: 3em 0 2em;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-widgets .widget-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 1em;
  font-weight: 700;
}
.footer-widgets ul li {
  padding: 5px 0;
  border: none;
  font-size: 0.85rem;
}
.footer-widgets ul li a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer-widgets ul li a:hover { color: var(--color-accent); }

.site-info {
  padding: 1.5em 0;
  background: rgba(0,0,0,0.3);
}
.site-info p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
}
.site-info a {
  color: rgba(255,255,255,0.45);
  transition: color var(--transition-fast);
}
.site-info a:hover { color: var(--color-accent); }

/* Footer gradient divider line */
.footer-widgets + .site-info {
  background: rgba(0,0,0,0.25);
}

/* Back to top premium */
.go-to-top a {
  background: var(--color-accent-gradient);
  box-shadow: var(--shadow-green);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.go-to-top a:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 12px 30px rgba(16,185,129,.5);
}

/* --- Partners carousel premium --- */
.partners-carousel {
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, #fff 100%);
  padding: 2.5em 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* --- Breadcrumbs premium --- */
.flavor-breadcrumbs {
  background: var(--color-bg-alt);
  padding: 10px var(--gap);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.5em;
  border-radius: 0;
  font-size: 0.82rem;
}

/* --- Widgets premium --- */
.widget {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.widget-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 8px;
  margin-bottom: 1em;
  color: var(--color-primary);
}

/* --- Pagination premium --- */
.pagination .page-numbers {
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.88rem;
}
.pagination .page-numbers.current {
  background: var(--color-accent-gradient);
  border-color: transparent;
  box-shadow: var(--shadow-green);
}

/* --- Post cards archive premium --- */
.posts-grid { gap: 2em; }
.posts-grid .flavor-card {
  border-radius: var(--radius-lg);
}
.posts-grid .post-thumbnail-link img {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  height: 200px;
  object-fit: cover;
  width: 100%;
}

/* --- Badge / Tag premium --- */
.flavor-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--color-accent-light);
  color: var(--color-primary);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.flavor-badge-gold {
  background: var(--color-gold-light);
  color: #92400e;
  border-color: rgba(245,158,11,0.3);
}

/* --- Section dividers --- */
.flavor-section {
  padding: 5em 0;
}
.flavor-section-alt {
  background: var(--color-bg-alt);
  padding: 5em 0;
}
.flavor-section-dark {
  background: var(--color-bg-dark);
  padding: 5em 0;
  color: var(--color-white);
}
.flavor-section-dark h2, .flavor-section-dark h3 { color: #fff; }
.flavor-section-dark p { color: rgba(255,255,255,0.8); }

/* --- Section heading with accent line --- */
.section-heading {
  text-align: center;
  margin-bottom: 3em;
}
.section-heading h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 0.6em;
}
.section-heading h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-accent-gradient);
  border-radius: var(--radius-full);
}
.section-heading p {
  max-width: 600px;
  margin: 1em auto 0;
  color: var(--color-text-light);
  font-size: 1.1rem;
}

/* --- WP-Members login box premium --- */
#wpmem_login, #wpmem_reg {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: none;
}

/* --- Responsive nav blur (mobile) --- */
@media (max-width: 991px) {
  .nav-wrapper { position: relative; }
  .main-nav .menu { background: rgba(6,78,59,0.98); backdrop-filter: blur(16px); }
}

/* --- Selection color --- */
::selection { background: rgba(16,185,129,0.25); color: var(--color-primary); }
::-moz-selection { background: rgba(16,185,129,0.25); color: var(--color-primary); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg-alt); }
::-webkit-scrollbar-thumb { background: var(--color-accent); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* ==========================================================================
   59. PREMIUM FEATURES — Dark Mode, Header Layouts, Animations, Patterns
   ========================================================================== */

/* ── Dark Mode Toggle Button ──────────────────────────────────────────────── */
.flavor-dm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
  flex-shrink: 0;
  margin-left: 8px;
}
.flavor-dm-btn:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.45);
  transform: rotate(12deg) scale(1.1);
}
.flavor-dm-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
@keyframes flavor-dm-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.flavor-dm-spin { animation: flavor-dm-spin 0.35s ease; }

/* ── Dark Mode — Tokens ───────────────────────────────────────────────────── */
[data-theme="dark"] {
  --color-bg:      #0f172a;
  --color-bg-alt:  #1e293b;
  --color-bg-dark: #060d17;
  --color-text:    #e2e8f0;
  --color-text-light: #cbd5e1;
  --color-text-muted: #94a3b8;
  --color-border:  #334155;
  --color-border-dark: #475569;
}

[data-theme="dark"] body {
  background: var(--color-bg);
  color: var(--color-text);
}
[data-theme="dark"] .header-contact {
  background: #060d17;
  border-bottom-color: rgba(16,185,129,0.15);
}
[data-theme="dark"] .header-contact .site-title a,
[data-theme="dark"] .header-contact .contact-info,
[data-theme="dark"] .header-contact .contact-info a { color: rgba(255,255,255,0.75); }
[data-theme="dark"] .header-contact .contact-info .btn { background: var(--color-primary); }
[data-theme="dark"] .site-footer { background: #060d17; }
[data-theme="dark"] .flavor-card,
[data-theme="dark"] .widget { background: #1e293b; border-color: #334155; }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 { color: #e2e8f0; }
[data-theme="dark"] p, [data-theme="dark"] li { color: #cbd5e1; }
[data-theme="dark"] a { color: var(--color-accent); }
[data-theme="dark"] input, [data-theme="dark"] textarea, [data-theme="dark"] select {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
[data-theme="dark"] .wp-block-column.has-background { background: #1e293b !important; }

/* Transición suave al cambiar de modo */
body, .header-contact, .site-footer, .flavor-card, .widget,
input, textarea, select, .wp-block-column {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* ── Header Layout: Transparent ───────────────────────────────────────────── */
.layout-transparent .header-contact {
  display: none; /* En transparente solo mostramos nav */
}
.layout-transparent .nav-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  box-shadow: none;
  z-index: 1001;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.layout-transparent .nav-wrapper.scrolled {
  background: var(--color-primary);
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  position: fixed;
}
.layout-transparent + #content {
  padding-top: 0;
}

/* ── Header Layout: Centered ──────────────────────────────────────────────── */
.layout-centered .header-contact {
  flex-direction: column;
  text-align: center;
  gap: 8px;
}
.layout-centered .header-contact .container {
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.layout-centered .nav-wrapper .container {
  justify-content: center;
}
.layout-centered .main-nav {
  width: 100%;
  justify-content: center;
}
.layout-centered .main-nav .menu {
  justify-content: center;
  width: 100%;
}
.layout-centered .nav-search { margin-left: auto; }

/* ── Scroll Animations ────────────────────────────────────────────────────── */
.flavor-anim {
  will-change: transform, opacity;
}

/* Estado inicial — invisible */
.flavor-anim--fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.55s cubic-bezier(.4,0,.2,1), transform 0.55s cubic-bezier(.4,0,.2,1);
}
.flavor-anim--fade-in {
  opacity: 0;
  transition: opacity 0.6s ease;
}
.flavor-anim--slide-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.55s cubic-bezier(.4,0,.2,1), transform 0.55s cubic-bezier(.4,0,.2,1);
}
.flavor-anim--zoom-in {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(.4,0,.2,1);
}

/* Estado final — visible */
.flavor-anim.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Block Pattern: Glassmorphism ─────────────────────────────────────────── */
.wp-block-column[style*="rgba(255,255,255,0.06)"],
.wp-block-column[style*="rgba(16,185,129,0.12)"] {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.wp-block-column[style*="rgba(255,255,255,0.06)"]:hover,
.wp-block-column[style*="rgba(16,185,129,0.12)"]:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* ── Hero Parallax ────────────────────────────────────────────────────────── */
.hero-parallax {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}
@media (max-width: 768px) {
  /* Desactivar parallax en móvil por rendimiento */
  .hero-parallax { background-attachment: scroll; }
}

/* ── Counters ─────────────────────────────────────────────────────────────── */
.flavor-stat { transition: transform 0.2s ease; }
.flavor-stat:hover { transform: translateY(-4px); }

/* ── Logo versión oscura ──────────────────────────────────────────────────── */
.custom-logo--dark { max-height: 64px; width: auto; }

/* ==========================================================================
   60. 404 PAGE — Premium
   ========================================================================== */
.flavor-404 {
  min-height: 75vh;
  display: flex;
  align-items: center;
  padding: 4em 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(16,185,129,0.06) 0%, transparent 70%),
              var(--color-bg);
}
.flavor-404-inner {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

/* Animated visual */
.flavor-404-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}
.flavor-404-num {
  font-size: clamp(5rem, 14vw, 9rem);
  font-weight: 900;
  font-family: var(--font-heading);
  line-height: 1;
  background: var(--color-accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.04em;
}
.flavor-404-icon {
  width: clamp(64px, 12vw, 100px);
  color: var(--color-accent);
  animation: flavor-404-float 3s ease-in-out 1;
}
.flavor-404-icon svg { width: 100%; height: auto; }

@keyframes flavor-404-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

.flavor-404 h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 12px;
  color: var(--color-text);
}
.flavor-404-desc {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Action buttons */
.flavor-404-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius-md, 8px);
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn-secondary:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Search */
.flavor-404-search {
  margin-bottom: 36px;
}
.flavor-404-search-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}
.flavor-404-search .search-form {
  display: flex;
  gap: 8px;
  max-width: 400px;
  margin: 0 auto;
}
.flavor-404-search .search-field {
  flex: 1;
  border-radius: var(--radius-md, 8px);
  border: 1.5px solid var(--color-border);
  padding: 10px 16px;
  font-size: 0.95rem;
}
.flavor-404-search .search-submit {
  border-radius: var(--radius-md, 8px);
  padding: 10px 20px;
  background: var(--color-accent-gradient);
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

/* Suggested pages */
.flavor-404-links {
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
  margin-top: 4px;
}
.flavor-404-links p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.flavor-404-links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.flavor-404-links li a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full, 9999px);
  font-size: 0.85rem;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.flavor-404-links li a:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
  color: var(--color-primary);
}

/* Dark mode 404 */
[data-theme="dark"] .flavor-404 {
  background: radial-gradient(ellipse at 60% 40%, rgba(16,185,129,0.08) 0%, transparent 70%),
              var(--color-bg);
}
[data-theme="dark"] .flavor-404 h1 { color: #e2e8f0; }
[data-theme="dark"] .btn-secondary {
  border-color: #334155;
  color: #e2e8f0;
}
[data-theme="dark"] .btn-secondary:hover {
  background: #1e293b;
}
[data-theme="dark"] .flavor-404-links li a {
  border-color: #334155;
  color: #cbd5e1;
}

/* ==========================================================================
   61. FOOTER BOTTOM ROW & SOCIAL MENU
   ========================================================================== */
.footer-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom-row p {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
}

/* Social nav icon links */
.social-nav .social-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.social-nav .social-menu li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.75rem;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
.social-nav .social-menu li a:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  transform: translateY(-2px);
}

/* Accessibility link */
.a11y-footer-link {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color var(--transition-fast);
  white-space: nowrap;
}
.a11y-footer-link:hover { color: var(--color-accent); }

/* Responsive footer bottom */
@media (max-width: 640px) {
  .footer-bottom-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }
}

/* ==========================================================================
   CORRECCIONES CRÍTICAS — Auditoría 15/06/2025
   ========================================================================== */

/* 1. CORTAFUEGOS: Si el JS de animaciones falla (SyntaxError o 404),
      forzar visibilidad de TODOS los elementos animados.
      NOTA: !important dentro de @keyframes es ignorado por la especificación CSS
      en la mayoría de navegadores, así que usamos selectores directos. */

/* Fallback INMEDIATO: si body NO tiene .js-loaded (= JS no ejecutó o falló),
   desactivar TODAS las animaciones y mostrar todo al instante */
body:not(.js-loaded) .flavor-anim,
body:not(.js-loaded) .flavor-anim--fade-up,
body:not(.js-loaded) .flavor-anim--fade-in,
body:not(.js-loaded) .flavor-anim--slide-left,
body:not(.js-loaded) .flavor-anim--zoom-in,
body:not(.js-loaded) .flavor-reveal {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
  transition: none !important;
  animation: none !important;
}

/* Segundo cortafuegos: si JS SÍ ejecutó (body.js-loaded) pero un elemento
   concreto NUNCA recibió .is-visible (IntersectionObserver no disparó),
   lo mostramos igualmente tras una transición larga */
@keyframes flavor-force-show-safe {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: none; }
}
body.js-loaded .flavor-anim:not(.is-visible) {
  animation: flavor-force-show-safe 0.4s ease 2.5s both;
}


/* 2. FOOTER VACÍO: Ocultar el bloque .footer-widgets si no hay widgets activos.
      WordPress renderiza el div igualmente; con :empty lo colapsamos sin alterar PHP. */
.footer-widgets:empty,
.footer-widgets .row:empty {
  display: none !important;
  padding: 0 !important;
  border: none !important;
}

/* Alternativa robusta: si el div de widgets tiene solo espacios en blanco,
   se reduce a 0 altura automáticamente */
.footer-widgets .row {
  min-height: 0;
}
.footer-widgets:not(:has(.widget)) {
  display: none;
}

/* 3. BANNERS VERDES VACÍOS: Algunas páginas hijas renderizan el título <h1>
      DOS veces: una vez por el template (entry-header) y otra vez dentro
      del bloque Gutenberg de tipo "Cover/Fondo". Ocultamos el del template
      cuando hay un bloque cover con contenido para evitar la duplicación. */
.entry-header:has(+ .entry-content .wp-block-cover .entry-title) {
  display: none;
}

/* Asegurar que los iframes de PDF tengan altura mínima visible */
.entry-content iframe[src*=".pdf"],
.entry-content iframe[src*="wp-content"] {
  width: 100%;
  min-height: 600px;
  border: none;
  display: block;
}

/* ==========================================================================
   CORRECCIÓN: Footer y Carousel a ancho completo
   El footer y el carrusel de partners están dentro del .container (max-width: 1170px)
   abierto por header.php. Usamos el truco de margin negativo para romper
   el contenedor y ocupar el 100% del viewport sin tocar el HTML.
   ========================================================================== */
.site-footer,
.partners-carousel,
.go-to-top {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* Asegurar que el contenido interno del footer siga centrado */
.site-footer .container,
.partners-carousel .container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ==========================================================================
   CORRECCIÓN: Reducir tamaño masivo de los banners de cabecera
   Las páginas internas tienen bloques Cover/Group como cabecera con un
   padding o min-height excesivo que ocupa toda la pantalla.
   ========================================================================== */
.entry-content > .wp-block-cover:first-child,
.entry-content > .wp-block-group:first-child {
  min-height: auto !important;
  padding-top: 3em !important;
  padding-bottom: 3em !important;
}
.entry-content > .wp-block-cover:first-child .wp-block-cover__inner-container,
.entry-content > .wp-block-group:first-child .wp-block-group__inner-container {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* ==========================================================================
   Gutenberg Alignments
   ========================================================================== */
.aligncenter {
  clear: both;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.alignleft {
  float: left;
  margin-right: 1.5em;
  margin-bottom: 1.5em;
}
.alignright {
  float: right;
  margin-left: 1.5em;
  margin-bottom: 1.5em;
}
figure.aligncenter {
  display: table;
  margin-left: auto;
  margin-right: auto;
}
.wp-block-image .aligncenter {
  margin-left: auto;
  margin-right: auto;
}
.wp-block-image .aligncenter img {
  display: block;
  margin: 0 auto;
}
