/*
Theme Name: AIDA Contadores
Theme URI: https://aidacontadores.com
Author: AIDA SYSTEMS E.I.R.L.
Author URI: https://aidacontadores.com
Description: Tema WordPress moderno, rápido y 100% editable con Gutenberg. Sin page builders. Diseño blanco con azules y violetas suaves. Compatible con el editor de bloques nativo.
Version: 3.0.0
Requires at least: 6.3
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aida-contadores
Tags: block-patterns, gutenberg, full-site-editing, servicios, contabilidad, responsive
*/

/* ============================================================
   TOKENS — sincronizados con theme.json
   ============================================================ */
:root {
  --bg:          #f8f7ff;
  --surface:     #ffffff;
  --blue-soft:   #e8e6fd;
  --blue-mid:    #c7c2fa;
  --accent:      #6c63d4;
  --accent2:     #8b85e0;
  --accent-dark: #5750c0;
  --text:        #1a1833;
  --muted:       #6b6893;
  --border:      #e2e0f5;
  --gold:        #c9973a;
  --dark:        #13112a;

  --font-main: 'Inter', 'Montserrat', sans-serif;

  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;

  --shadow-sm: 0 1px 4px rgba(108,99,212,.06);
  --shadow-md: 0 4px 20px rgba(108,99,212,.1);
  --shadow-lg: 0 8px 32px rgba(108,99,212,.16);

  --w: 1200px;
  --header-h: 68px;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body  { font-family: var(--font-main); background: var(--bg); color: var(--text); line-height: 1.7; }
img   { max-width: 100%; height: auto; display: block; }
ul,ol { list-style: none; }
a     { color: var(--accent); text-decoration: none; transition: color .18s; }
a:hover { color: var(--accent-dark); }

/* ============================================================
   ACCESIBILIDAD
   ============================================================ */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--accent); color: #fff;
  padding: 8px 16px; border-radius: var(--r-sm);
  z-index: 9999; transition: top .2s;
}
.skip-link:focus { top: 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============================================================
   ORBES DECORATIVOS
   ============================================================ */
.site-orb {
  position: fixed; border-radius: 50%;
  pointer-events: none; z-index: 0; opacity: .38;
}
.site-orb-1 {
  width: 560px; height: 560px;
  background: radial-gradient(circle, #ddd9ff 0%, transparent 70%);
  top: -160px; right: -120px;
  animation: orbFloat1 14s ease-in-out infinite;
}
.site-orb-2 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, #e8e3ff 0%, transparent 70%);
  bottom: 8%; left: -100px;
  animation: orbFloat2 18s ease-in-out infinite;
}
@keyframes orbFloat1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-20px,20px)} }
@keyframes orbFloat2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(16px,-16px)} }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: var(--w); margin: 0 auto; padding: 0 24px; }
.section   { padding: 72px 0; position: relative; z-index: 1; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  height: var(--header-h);
  background: rgba(248,247,255,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s;
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  height: var(--header-h); gap: 20px;
}

/* Logo */
.site-logo-link { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 500; color: #fff;
}
.logo-img { height: 44px; width: auto; }
.logo-texts { display: flex; flex-direction: column; }
.logo-name    { font-size: .95rem; font-weight: 500; color: var(--text); line-height: 1.2; }
.logo-tagline { font-size: .68rem; color: var(--muted); letter-spacing: .05em; }

/* Nav */
.main-nav ul { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  font-size: .8rem; font-weight: 400;
  color: var(--muted); padding: 7px 12px;
  border-radius: var(--r-sm); transition: all .18s;
}
.main-nav a:hover,
.main-nav .current-menu-item > a { background: var(--blue-soft); color: var(--accent); }

.nav-cta > a {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 500 !important;
}
.nav-cta > a:hover { background: var(--accent-dark) !important; color: #fff !important; }

/* Hamburguesa */
.menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.menu-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--text); border-radius: 2px; transition: all .28s;
}

/* ============================================================
   BOTONES GLOBALES
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 24px; border-radius: var(--r-sm);
  font-family: var(--font-main); font-size: .88rem;
  font-weight: 500; cursor: pointer; border: none;
  transition: all .22s; line-height: 1.3; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline { background: var(--surface); color: var(--accent); border: 1.5px solid var(--border); }
.btn-outline:hover { background: var(--blue-soft); border-color: var(--blue-mid); transform: translateY(-2px); }
.btn-white  { background: #fff; color: var(--accent); }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.14); color: var(--accent-dark); }

/* ============================================================
   PATRONES — HERO
   ============================================================ */
.aida-hero {
  padding: 80px 0 64px; text-align: center;
  position: relative; z-index: 1; overflow: hidden;
}
.aida-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue-soft); border: 1px solid var(--blue-mid);
  border-radius: 100px; padding: 6px 16px;
  font-size: .75rem; color: var(--accent);
  margin-bottom: 24px;
}
.aida-hero-badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0;
  animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.3;transform:scale(.75)} }

.aida-hero h1 { margin-bottom: 18px; }
.aida-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.aida-hero-desc {
  font-size: 1rem; color: var(--muted);
  max-width: 520px; margin: 0 auto 36px; line-height: 1.8;
}
.aida-hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.aida-hero-img  {
  margin-top: 48px; border-radius: var(--r-xl);
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.aida-hero-img img { width: 100%; object-fit: cover; max-height: 420px; }

/* ============================================================
   PATRONES — STATS
   ============================================================ */
.aida-stats { padding: 0 0 56px; position: relative; z-index: 1; }
.aida-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 600px) { .aida-stats-grid { grid-template-columns: repeat(4,1fr); } }

.aida-stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px 16px; text-align: center;
  cursor: default; transition: all .25s;
}
.aida-stat:hover { border-color: var(--blue-mid); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.aida-stat-num {
  display: block; font-size: clamp(1.5rem,4vw,2rem);
  font-weight: 500; color: var(--accent); margin-bottom: 6px; line-height: 1;
}
.aida-stat-label { font-size: .78rem; color: var(--muted); line-height: 1.5; }

/* ============================================================
   PATRONES — SERVICIOS
   ============================================================ */
.aida-services-grid {
  display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 40px;
}
@media (min-width: 500px) { .aida-services-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 800px) { .aida-services-grid { grid-template-columns: repeat(3,1fr); } }

.aida-service-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 28px 24px;
  transition: all .25s; cursor: default; position: relative; overflow: hidden;
}
.aida-service-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.aida-service-card:hover { border-color: var(--blue-mid); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.aida-service-card:hover::after { transform: scaleX(1); }

.aida-service-icon {
  width: 48px; height: 48px; border-radius: var(--r-md);
  background: var(--blue-soft); display: flex; align-items: center;
  justify-content: center; margin-bottom: 18px; font-size: 1.4rem;
  transition: background .25s;
}
.aida-service-card:hover .aida-service-icon { background: var(--blue-mid); }
.aida-service-card h3 { font-size: .95rem; font-weight: 500; color: var(--text); margin-bottom: 10px; }
.aida-service-card p  { font-size: .85rem; color: var(--muted); line-height: 1.7; margin-bottom: 18px; }
.aida-service-link    { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; color: var(--accent); font-weight: 500; transition: gap .2s; }
.aida-service-card:hover .aida-service-link { gap: 10px; }

/* ============================================================
   PATRONES — HERRAMIENTAS
   ============================================================ */
.aida-tools-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 28px 32px; margin-top: 40px;
}
.aida-tools-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.aida-tools-title  { font-size: .85rem; font-weight: 500; color: var(--text); white-space: nowrap; }
.aida-tools-line   { flex: 1; height: 1px; background: var(--border); }
.aida-tools-pills  { display: flex; gap: 10px; flex-wrap: wrap; }

.aida-tool-pill {
  display: inline-block; background: var(--blue-soft);
  border: 1px solid var(--blue-mid); border-radius: var(--r-sm);
  padding: 7px 16px; font-size: .82rem; color: var(--accent);
  font-weight: 500; transition: all .2s; cursor: pointer;
}
.aida-tool-pill:hover {
  background: var(--accent); color: #fff; border-color: var(--accent);
  transform: translateY(-2px); box-shadow: 0 4px 14px rgba(108,99,212,.2);
}

/* ============================================================
   PATRONES — POSTS GRID
   ============================================================ */
.aida-posts-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 40px;
}
@media (min-width: 500px) { .aida-posts-grid { grid-template-columns: repeat(2,1fr); } }

.aida-post-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; transition: all .25s;
}
.aida-post-card:hover { border-color: var(--blue-mid); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.aida-post-thumb { overflow: hidden; }
.aida-post-thumb img { width: 100%; height: 200px; object-fit: cover; transition: transform .4s; }
.aida-post-card:hover .aida-post-thumb img { transform: scale(1.04); }
.aida-post-placeholder { height: 180px; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.aida-post-body   { padding: 22px; }
.aida-post-meta   { font-size: .72rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.aida-post-body h3 { font-size: .95rem; font-weight: 500; color: var(--text); margin-bottom: 10px; line-height: 1.45; }
.aida-post-body h3 a { color: inherit; }
.aida-post-body h3 a:hover { color: var(--accent); }
.aida-post-body p  { font-size: .82rem; color: var(--muted); margin-bottom: 16px; line-height: 1.65; }

/* ============================================================
   PATRONES — CONTACTO
   ============================================================ */
.aida-contact-grid {
  display: grid; grid-template-columns: 1fr; gap: 40px; margin-top: 40px;
}
@media (min-width: 760px) { .aida-contact-grid { grid-template-columns: 1fr 1.2fr; } }

.aida-contact-info-title { font-size: 1rem; font-weight: 500; margin-bottom: 10px; }
.aida-contact-info-desc  { font-size: .88rem; color: var(--muted); margin-bottom: 28px; line-height: 1.7; }

.aida-contact-item  { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.aida-contact-icon  {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--blue-soft); border: 1px solid var(--blue-mid);
  border-radius: var(--r-sm); display: flex; align-items: center;
  justify-content: center; font-size: 1.1rem; transition: all .2s;
}
.aida-contact-item:hover .aida-contact-icon { background: var(--accent); border-color: var(--accent); }
.aida-contact-label { display: block; font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }
.aida-contact-value { font-size: .88rem; color: var(--text); }

.aida-contact-form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 32px;
  border-top: 3px solid var(--accent); box-shadow: var(--shadow-sm);
}
.aida-form-title { font-size: 1rem; font-weight: 500; margin-bottom: 24px; }
.aida-form-group { margin-bottom: 16px; }
.aida-form-group label {
  display: block; font-size: .76rem; font-weight: 500;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: 6px;
}
.aida-form-group input,
.aida-form-group textarea,
.aida-form-group select {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-family: var(--font-main); font-size: .9rem;
  color: var(--text); background: var(--bg);
  transition: border-color .18s, box-shadow .18s;
}
.aida-form-group input:focus,
.aida-form-group textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,99,212,.12); background: #fff;
}
.aida-form-group textarea { height: 110px; resize: vertical; }

/* ============================================================
   PATRONES — CTA BANNER
   ============================================================ */
.aida-cta-banner {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  border-radius: var(--r-xl); padding: 40px 36px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.aida-cta-banner h2 { font-size: 1.2rem; font-weight: 500; color: #fff; margin-bottom: 6px; }
.aida-cta-banner p  { font-size: .88rem; color: rgba(255,255,255,.78); line-height: 1.6; }

/* ============================================================
   SECTION HEADER (eyebrow + título + subtítulo)
   ============================================================ */
.aida-section-head { text-align: center; margin-bottom: 0; }
.aida-eyebrow {
  display: block; font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px; font-weight: 500;
}
.aida-eyebrow::before { content: '● '; }
.aida-section-title  { margin-bottom: 10px; }
.aida-section-title em { font-style: normal; background: linear-gradient(90deg,var(--accent),var(--accent2)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.aida-section-sub    { font-size: .92rem; color: var(--muted); max-width: 520px; margin: 0 auto; line-height: 1.75; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--dark); color: rgba(255,255,255,.6);
  padding: 60px 0 28px; position: relative; z-index: 1;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 36px; margin-bottom: 48px;
}
@media (min-width: 600px) { .footer-grid { grid-template-columns: 2fr 1fr; } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }

.footer-brand p { font-size: .85rem; line-height: 1.75; max-width: 300px; margin-top: 14px; color: rgba(255,255,255,.45); }
.footer-logo-wrap { display: flex; align-items: center; gap: 10px; }
.footer-logo-icon { width: 40px; height: 40px; border-radius: var(--r-sm); background: linear-gradient(135deg,var(--accent),var(--accent2)); display: flex; align-items: center; justify-content: center; font-size: .82rem; font-weight: 500; color: #fff; }
.footer-logo-name { font-size: 1rem; font-weight: 500; color: rgba(255,255,255,.9); }

.footer-col h4 { font-size: .78rem; font-weight: 500; color: rgba(255,255,255,.9); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-col li   { margin-bottom: 10px; }
.footer-col a    { font-size: .84rem; color: rgba(255,255,255,.48); transition: color .18s; }
.footer-col a:hover { color: var(--accent2); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,.07); padding-top: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: .78rem; color: rgba(255,255,255,.32); }
.footer-bottom a { color: rgba(255,255,255,.32); }
.footer-bottom a:hover { color: var(--accent2); }

.social-links { display: flex; gap: 8px; }
.social-links a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.5); font-size: .85rem; transition: all .2s; }
.social-links a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* WhatsApp flotante */
.whatsapp-float { position: fixed; bottom: 28px; right: 28px; z-index: 9999; width: 52px; height: 52px; background: #25d366; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 18px rgba(37,211,102,.4); transition: transform .2s, box-shadow .2s; color: #fff; font-size: 1.4rem; }
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 26px rgba(37,211,102,.55); color: #fff; }

/* ============================================================
   GUTENBERG — overrides para que los bloques respeten el diseño
   ============================================================ */
.wp-block-group { position: relative; z-index: 1; }
.wp-block-button__link { border-radius: var(--r-sm) !important; font-weight: 500 !important; }
.wp-block-image img { border-radius: var(--r-md); }
.wp-block-separator { border-color: var(--border) !important; }
.wp-block-quote { border-left: 3px solid var(--accent); padding-left: 20px; color: var(--muted); }

/* Alineaciones anchas */
.alignwide  { max-width: 1200px; margin-left: auto; margin-right: auto; }
.alignfull  { max-width: 100%; }

/* ============================================================
   ANIMACIONES
   ============================================================ */
.anim-fade { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.anim-fade.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .main-nav.open {
    display: block; position: absolute;
    top: var(--header-h); left: 0; right: 0;
    background: rgba(248,247,255,.98); backdrop-filter: blur(14px);
    box-shadow: var(--shadow-md); padding: 12px 0; z-index: 999;
  }
  .main-nav.open ul  { flex-direction: column; gap: 0; }
  .main-nav.open a   { display: block; padding: 13px 24px; border-radius: 0; }
  .menu-toggle       { display: flex; }

  .aida-hero         { padding: 52px 0 40px; }
  .aida-hero-btns    { flex-direction: column; align-items: center; }
  .aida-hero-btns .btn { width: 100%; max-width: 280px; justify-content: center; }

  .aida-cta-banner   { text-align: center; flex-direction: column; align-items: center; }
  .aida-contact-form-card { padding: 24px 18px; }
  .aida-tools-wrap   { padding: 20px; }
  .footer-bottom     { flex-direction: column; text-align: center; }
  .section           { padding: 52px 0; }
}
