/* Custom UI Enhancements */

:root {
  --deep-blue: #0056D2;
  --vermilion: #FF2B06;
  --surface-low: #F8FAFC;
  --pure-white: #FFFFFF;
  --plus-jakarta: 'Outfit', 'Outfit-Fallback', sans-serif;
  --inter: 'Outfit', 'Outfit-Fallback', sans-serif;
}

/* Glassmorphism utilities */
.glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 1rem;
}

/* Animations */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-left {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-right {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-up {
    animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-left {
    animation: slide-left 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-right {
    animation: slide-right 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Base state for scroll reveal */
[data-animate] {
    opacity: 0;
}

/* Ensure headings and critical content are never stuck invisible */
h1[data-animate],
h2[data-animate],
h3[data-animate],
h4[data-animate],
.headline-xl,
[data-animate].animated {
    opacity: 1 !important;
    transform: none !important;
}

/* Mesh gradient background (animated) */
.mesh-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, var(--gradient-teal), transparent 50%),
              radial-gradient(circle at 70% 70%, var(--gradient-orange), transparent 50%);
  animation: meshMove 20s infinite alternate;
  pointer-events: none;
  z-index: -1;
}
@keyframes meshMove {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

/* Custom reactive cursor */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0,102,204,0.4);
  pointer-events: none;
  transform: translate3d(var(--x, 0), var(--y, 0), 0) translate(-50%, -50%);
  scale: 1;
  transition: scale 0.15s ease-out, background 0.3s ease;
  mix-blend-mode: difference;
  z-index: 9999;
}
.interactive:hover .custom-cursor {
  scale: 2;
  background: rgba(0,102,204,0.8);
}

/* Dark mode refinements */
html.dark .glass-card {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(255,255,255,0.1);
}

/* Utility for fade-up animation using Tailwind classes */
[data-animate="fade-up"] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
[data-animate="fade-up"].animated {
  opacity: 1;
  transform: translateY(0);
}

/* Image Loading Shimmer Effect */
.shimmer-container {
    position: relative;
    overflow: hidden;
    background-color: #f6f7f8;
}

.shimmer-container::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.shimmer-container img {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.shimmer-container.loaded::after {
    display: none;
}

.shimmer-container.loaded img {
    opacity: 1;
}

/* --- MODERN ARCHITECTURAL FOOTER --- */
.footer-redesign {
    background-color: var(--pure-white);
    padding-top: clamp(60px, 10vw, 100px);
    padding-bottom: 50px;
    font-family: var(--inter);
    color: #1e293b; /* Slate-800 equivalent */
}

.footer-heading {
    font-family: var(--plus-jakarta);
    font-weight: 800;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #0f172a; /* Slate-900 */
}

.footer-dot {
    color: var(--vermilion);
}

.footer-contact-link {
    font-weight: 500;
    color: #475569; /* Slate-600 */
    transition: color 0.3s ease;
}

.footer-contact-link:hover {
    color: var(--deep-blue);
}

.cta-card {
    background: var(--pure-white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 20px; /* Reduced padding on tiny screens */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 640px) {
    .cta-card {
        padding: 40px;
    }
}

.cta-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.05);
}

.btn-primary-blue {
    background-color: var(--deep-blue);
    color: var(--pure-white);
    padding: 12px 16px; /* Smaller padding for mobile */
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.75rem; /* Smaller font for mobile (12px) */
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    white-space: normal; /* Allow text wrapping if needed */
    transition: background-color 0.3s ease, transform 0.2s ease;
}

@media (min-width: 640px) {
    .btn-primary-blue {
        padding: 14px 28px;
        font-size: 0.875rem;
    }
}

.btn-primary-blue:hover {
    background-color: #0046b3;
    transform: translateY(-1px);
}

.btn-whatsapp {
    background-color: #25D366 !important;
    color: #ffffff !important;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.025em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

/* Unified CTA Box Action Buttons */
.cta-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.625rem !important;
    padding: 0.875rem 2rem !important;
    border-radius: 9999px !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    border: none !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.cta-action-btn:hover {
    transform: translateY(-2px) !important;
}
.cta-action-btn:active {
    transform: translateY(0) scale(0.98) !important;
}
.cta-action-btn-call {
    background-color: #0066CC !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 102, 204, 0.28) !important;
}
.cta-action-btn-call:hover {
    background-color: #0052a3 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 22px rgba(0, 102, 204, 0.4) !important;
}
.cta-action-btn-whatsapp {
    background-color: #075E54 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(7, 94, 84, 0.35) !important;
}
.cta-action-btn-whatsapp:hover {
    background-color: #054c44 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 22px rgba(7, 94, 84, 0.45) !important;
}
.cta-action-btn svg,
.cta-action-btn .material-symbols-outlined {
    width: 1rem !important;
    height: 1rem !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    fill: currentColor !important;
    color: currentColor !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

@media (min-width: 640px) {
    .btn-whatsapp {
        padding: 14px 28px;
        font-size: 0.875rem;
    }
}

.btn-whatsapp:hover {
    background-color: #20ba5a !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.45);
}

.btn-whatsapp svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: #ffffff !important;
    display: inline-block;
    flex-shrink: 0;
}

.btn-whatsapp i {
    color: #ffffff !important;
    font-size: 1.125rem;
}

/* Fallback utilities for arbitrary classes */
.bg-\[\#25D366\],
.bg-whatsapp {
    background-color: #25D366 !important;
}

.hover\:bg-\[\#20ba5a\]:hover,
.hover\:bg-whatsapp-dark:hover {
    background-color: #20ba5a !important;
}

.border-\[\#25D366\] {
    border-color: #25D366 !important;
}

.sitemap-header {
    font-family: var(--plus-jakarta);
    font-weight: 700;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #000000; /* Black */
    margin-bottom: 24px;
}

.sitemap-link {
    color: #475569; /* Slate-600 */
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.sitemap-link:hover {
    color: var(--deep-blue);
}

.social-icon-ghost {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.3s ease;
}

.social-icon-ghost:hover {
    background-color: var(--deep-blue);
    border-color: var(--deep-blue);
    color: var(--pure-white);
}

.footer-bottom-bar {
    border-top: 1px solid #f1f5f9;
    padding-top: 30px;
    margin-top: 80px;
    font-size: 0.8rem;
    color: #000000; /* Black */
}

/* Dark Mode Overrides for Footer */
html.dark .footer-redesign {
    background-color: #0f172a; /* Slate-900 */
    color: #e2e8f0;
}

html.dark .footer-heading {
    color: var(--pure-white);
}

html.dark .cta-card {
    background-color: #1e293b; /* Slate-800 */
    border-color: rgba(255, 255, 255, 0.05);
}

html.dark .cta-card h3 {
    color: var(--pure-white);
}

html.dark .sitemap-header {
    color: #e2e8f0;
}

html.dark .sitemap-link {
    color: #94a3b8;
}

html.dark .sitemap-link:hover {
    color: var(--pure-white);
}

html.dark .footer-bottom-bar {
    border-top-color: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
}

html.dark .social-icon-ghost {
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

/* ==========================================================================
   MOBILE USABILITY FIXES (SEOptimer compliance)
   ========================================================================== */

/* 1. Viewport Overflow & Box Sizing */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}
*, *::before, *::after {
  box-sizing: border-box;
}

/* 2. Responsive Images */
img, video, canvas, svg {
  max-width: 100% !important;
  height: auto !important;
}

/* Exception: card cover images must fill full card height (position:absolute inside grid cell) */
.card-img-col img {
  height: 100% !important;
  max-width: none !important;
  width: 100% !important;
}

/* 3. Tap Targets, Spacing, & Fonts on Mobile */
@media (max-width: 768px) {
  /* Tap Targets */
  button, .btn, .nav-link, #mobile-menu a, .sitemap-link {
    min-height: 48px;
    min-width: 48px;
    padding-top: 12px;
    padding-bottom: 12px;
    margin-bottom: 8px; /* Touch spacing */
  }
  
  #mobile-menu a {
    display: flex;
    align-items: center;
    width: 100%;
  }

  #menu-btn {
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Font Sizes */
  body, p, li, .article-body {
    font-size: 16px !important;
  }
  
  /* Override Tailwind tiny text to ensure legibility without being huge */
  .text-\[8px\] {
    font-size: 10px !important;
  }
  .text-\[10px\] {
    font-size: 11px !important;
  }
  .text-xs {
    font-size: 13px !important;
  }
}

/* ==========================================================================
   MOBILE-ONLY RESPONSIVENESS OVERRIDES (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
  /* Issue 1: Hero H1 Font Size Override */
  h1.text-6xl {
    font-size: clamp(2.2rem, 11vw, 3.5rem) !important;
    line-height: 1.1 !important;
  }

  /* Issue 2: Large Empty Gap Override (Typewriter Wrapper Spacing) */
  .min-h-\[4rem\] {
    margin-bottom: 1.5rem !important;
    padding-bottom: 0 !important;
  }

  /* Issue 3: Scroll-to-Top Button Mobile Position Override */
  #back-top {
    bottom: 90px !important;
  }

  /* Issue 5: Touch Targets Accessibility Compliance */
  nav a,
  .cta, [class*="cta"],
  .btn, [class*="btn"],
  button {
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
  }
}

/* Article Typography Overrides */
.article-body h2 {
    font-size: 2rem !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
    margin-top: 2.5rem !important;
    margin-bottom: 1.25rem !important;
    line-height: 1.25 !important;
}

.article-body h3 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.25 !important;
}

.article-body p {
    margin-bottom: 1.5rem !important;
    line-height: 1.75 !important;
}

.article-body ul {
    list-style-type: disc !important;
    margin-bottom: 1.5rem !important;
    padding-left: 1.5rem !important;
}

.article-body ol {
    list-style-type: decimal !important;
    margin-bottom: 1.5rem !important;
    padding-left: 1.5rem !important;
}

.article-body li {
    margin-bottom: 0.5rem !important;
    line-height: 1.75 !important;
    list-style: inherit !important;
}



/* ==========================================================================
   PDF REPORT STYLES (html2pdf)
   ========================================================================== */
.pdf-report-container {
    background-color: #ffffff;
    font-family: 'Outfit', 'Outfit-Fallback', sans-serif;
    color: #1a1a1a;
    padding: 40px;
}
.pdf-report-header {
    text-align: center;
    border-bottom: 2px solid #0056D2;
    padding-bottom: 20px;
    margin-bottom: 30px;
}
.pdf-report-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px 0;
}
.pdf-report-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.pdf-report-section {
    margin-bottom: 24px;
    padding: 20px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.pdf-report-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0056D2;
    margin: 0 0 10px 0;
}
.pdf-report-section-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #334155;
    margin: 0;
}
.pdf-report-score-box {
    text-align: center;
    padding: 30px;
    background-color: rgba(0, 86, 210, 0.05);
    border: 2px dashed rgba(0, 86, 210, 0.3);
    border-radius: 16px;
    margin: 30px 0;
}
.pdf-report-score-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #475569;
    margin: 0 0 10px 0;
}
.pdf-report-score-value {
    font-size: 4rem;
    font-weight: 900;
    color: #0056D2;
    margin: 0;
    line-height: 1;
}
.pdf-report-score-verdict {
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #1e293b;
}
.pdf-report-footer {
    text-align: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
    margin-top: 40px;
}
.pdf-report-footer-brand {
    font-size: 1.25rem;
    font-weight: 900;
    color: #0056D2;
    margin: 0 0 5px 0;
}
.pdf-report-footer-tagline {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #64748b;
    margin: 0;
}


/* Explicit Dark Slate & Contrast Utilities for Organizer Hub & Components */
.bg-slate-900,
html.dark .bg-slate-900 {
    background-color: #0f172a !important;
    color: #ffffff !important;
}

.bg-slate-800,
html.dark .bg-slate-800 {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

.bg-slate-950,
html.dark .bg-slate-950 {
    background-color: #090d16 !important;
    color: #ffffff !important;
}

.border-slate-800 {
    border-color: #1e293b !important;
}

.border-slate-700 {
    border-color: #334155 !important;
}

.text-slate-300 {
    color: #cbd5e1 !important;
}

.text-slate-400 {
    color: #94a3b8 !important;
}

/* ==========================================================================
   AEO / SEMANTIC TABLE STYLES
   ========================================================================== */
.table-responsive {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
table.aeo-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}
table.aeo-table th {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.85rem 1rem;
  color: #60a5fa;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
table.aeo-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}
table.aeo-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   UTILITY EXPANSIONS (Slate typography, containers, icons)
   ========================================================================== */
.text-slate-600 { color: #475569 !important; }
.text-slate-700 { color: #334155 !important; }
.text-slate-800 { color: #1e293b !important; }
.bg-slate-50 { background-color: #f8fafc !important; }
.bg-slate-100 { background-color: #f1f5f9 !important; }
.border-slate-300 { border-color: #cbd5e1 !important; }
.hover\:border-problue:hover { border-color: #0066cc !important; }
.hover\:text-problue:hover { color: #0066cc !important; }
.hover\:text-primary:hover { color: #0066cc !important; }
.hover\:bg-primary\/90:hover { background-color: rgba(0, 102, 204, 0.9) !important; }
.shadow-primary\/10 { box-shadow: 0 4px 6px -1px rgba(0, 102, 204, 0.1), 0 2px 4px -2px rgba(0, 102, 204, 0.1) !important; }


/* Author Social Buttons */
.author-social-btn {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.author-social-btn:hover {
  color: #0066CC;
  border-color: #0066CC;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 102, 204, 0.18);
}

.author-social-btn.youtube:hover {
  color: #eb0028;
  border-color: #eb0028;
  box-shadow: 0 4px 10px rgba(235, 0, 40, 0.18);
}

/* Blog Article Body Typography & Reading Elements */
#progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: transparent;
  z-index: 9999;
}

#progress-bar {
  height: 100%;
  background: #0066CC;
  width: 0%;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  transition: width 0.1s ease-out;
}

.article-body p,
.article-body li {
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 1.25rem;
  line-height: 1.7;
  color: #334155;
  margin-bottom: 2rem;
  font-weight: 300;
  letter-spacing: 0.01em;
}

.article-body h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 2.25rem;
  color: #0f172a;
  margin-top: 4rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.025em;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 0.5rem;
}

.article-body h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: bold;
  font-size: 1.5rem;
  color: #0f172a;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.pull-quote {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.3;
  color: #0f172a;
  text-align: center;
  margin: 5rem auto;
  position: relative;
  padding: 3rem 2rem;
}

.pull-quote::before {
  content: "\201C";
  font-family: Georgia, serif;
  font-size: 8rem;
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #e2e8f0;
  z-index: -1;
}

.pull-quote::after {
  content: '';
  display: block;
  width: 100px;
  height: 4px;
  background: #0066CC;
  margin: 2rem auto 0;
  border-radius: 2px;
}

.source-link {
  font-family: 'Outfit', sans-serif;
  color: #0066CC;
  font-weight: bold;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

.answer-capsule {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #0066CC;
  padding: 1.25rem 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 2rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #1e3a5f;
}

