/* ============================================
   AEE — Administración Empresarial Estratégica S.C.
   Diseñado por EM-SOFTWARE · ixtazihuapp@gmail.com
   ============================================ */

:root {
  /* Colores institucionales + vibrantes */
  --color-primary: #1E6FA8;
  --color-primary-dark: #0A2540;
  --color-primary-light: #3B9EDB;
  --color-cyan: #00C2FF;
  --color-accent: #2E8B57;
  --color-gold: #FFB547;
  --color-bg: #F8FAFC;
  --color-white: #FFFFFF;
  --color-text: #0F172A;
  --color-text-light: #64748B;
  --color-border: #E2E8F0;

  --gradient-primary: linear-gradient(135deg, #0A2540 0%, #1E6FA8 50%, #3B9EDB 100%);
  --gradient-hero: linear-gradient(135deg, #0A2540 0%, #1E6FA8 60%, #00C2FF 100%);
  --gradient-accent: linear-gradient(135deg, #00C2FF 0%, #3B9EDB 100%);

  --font-title: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 2px 8px rgba(10,37,64,.06);
  --shadow-md: 0 8px 24px rgba(10,37,64,.10);
  --shadow-lg: 0 20px 48px rgba(10,37,64,.15);
  --shadow-glow: 0 0 40px rgba(0,194,255,.35);

  --container: 1200px;
  --header-height: 80px;
  --transition: cubic-bezier(.4,.0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color .3s var(--transition); }
a:hover { color: var(--color-cyan); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* ============ BOTONES ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .3s var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transition: left .6s var(--transition);
}
.btn:hover::before { left: 100%; }

.btn--primary {
  background: var(--gradient-primary);
  color: var(--color-white);
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(30,111,168,.35);
}
.btn--primary:hover {
  color: var(--color-white);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 28px rgba(0,194,255,.45);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn--lg { padding: 18px 36px; font-size: 16px; }
.btn--full { width: 100%; }

/* ============ HEADER ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  transition: box-shadow .3s var(--transition);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

.header__logo { display: flex; align-items: center; gap: 12px; color: var(--color-text); }
.header__logo img { transition: transform .4s var(--transition); }
.header__logo:hover img { transform: rotate(-6deg) scale(1.08); }

.header__brand { display: flex; flex-direction: column; line-height: 1.2; }
.header__name {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
}
.header__tagline { font-size: 11px; color: var(--color-text-light); letter-spacing: .3px; }

.header__nav { display: flex; gap: 32px; align-items: center; }
.header__nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 15px;
  position: relative;
  padding: 4px 0;
}
.header__nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 2px;
  background: var(--gradient-accent);
  transition: all .3s var(--transition);
  transform: translateX(-50%);
}
.header__nav a:hover::after,
.header__nav a.active::after { width: 100%; }
.header__nav a.active { color: var(--color-primary); }

.header__cta { padding: 10px 20px; font-size: 14px; }

.header__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.header__toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--color-text);
  transition: all .3s;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 100px 0 120px;
  background: var(--gradient-hero);
  overflow: hidden;
  color: var(--color-white);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(0,194,255,.25) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,181,71,.15) 0%, transparent 50%);
  pointer-events: none;
}

/* Formas flotantes */
.hero__shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero__shape {
  position: absolute;
  border-radius: 50%;
  opacity: .15;
  animation: float 12s ease-in-out infinite;
}
.hero__shape--1 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #00C2FF, transparent);
  top: 10%; left: 5%;
  animation-delay: 0s;
}
.hero__shape--2 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, #FFB547, transparent);
  bottom: 15%; right: 10%;
  animation-delay: -3s;
}
.hero__shape--3 {
  width: 150px; height: 150px;
  background: radial-gradient(circle, #3B9EDB, transparent);
  top: 50%; right: 30%;
  animation-delay: -6s;
}

@keyframes float {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(30px,-20px) scale(1.1); }
  66% { transform: translate(-20px,20px) scale(.95); }
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero__eyebrow {
  display: inline-block;
  color: var(--color-cyan);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding: 6px 14px;
  border: 1px solid rgba(0,194,255,.4);
  border-radius: 999px;
  background: rgba(0,194,255,.08);
  backdrop-filter: blur(10px);
}

.hero__title {
  font-family: var(--font-title);
  font-size: clamp(34px, 4.8vw, 56px);
  line-height: 1.1;
  color: var(--color-white);
  margin-bottom: 24px;
  font-weight: 700;
  letter-spacing: -.5px;
}

.hero__text {
  font-size: 18px;
  color: rgba(255,255,255,.85);
  margin-bottom: 36px;
  max-width: 580px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero .btn--primary {
  background: var(--color-white);
  color: var(--color-primary-dark);
}
.hero .btn--primary:hover {
  background: var(--color-cyan);
  color: var(--color-white);
  box-shadow: var(--shadow-glow);
}

.hero .btn--outline {
  border-color: rgba(255,255,255,.5);
  color: var(--color-white);
}
.hero .btn--outline:hover {
  background: var(--color-white);
  color: var(--color-primary-dark);
  border-color: var(--color-white);
}

.hero__image {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero__image img {
  max-width: 320px;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.3));
  transition: transform .4s ease;
}
.hero__image img:hover {
  transform: scale(1.04);
}

/* ============ SECCIONES ============ */
.section { padding: 100px 0; position: relative; }

.section__title {
  font-family: var(--font-title);
  font-size: clamp(30px, 3.8vw, 44px);
  color: var(--color-primary-dark);
  text-align: center;
  margin-bottom: 12px;
  font-weight: 700;
  letter-spacing: -.5px;
}
.section__subtitle {
  text-align: center;
  color: var(--color-text-light);
  font-size: 17px;
  margin-bottom: 64px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ============ SERVICIOS ============ */
.services {
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
}
.services::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,194,255,.08), transparent 70%);
  pointer-events: none;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.service-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 36px 30px;
  border: 1px solid var(--color-border);
  transition: all .4s var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.service-card:hover::before { transform: scaleX(1); }

.service-card__icon {
  font-size: 40px;
  margin-bottom: 20px;
  display: inline-block;
  transition: transform .4s var(--transition);
}
.service-card:hover .service-card__icon {
  transform: scale(1.2) rotate(-8deg);
}

.service-card h3 {
  font-family: var(--font-title);
  font-size: 21px;
  color: var(--color-primary-dark);
  margin-bottom: 12px;
  font-weight: 600;
}
.service-card p { color: var(--color-text-light); font-size: 15px; }

/* ============ DETALLE SERVICIOS ============ */
.services-detail { background: var(--color-white); }

.service-detail {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 40px 44px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: all .35s var(--transition);
  position: relative;
  overflow: hidden;
}
.service-detail::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--gradient-accent);
}
.service-detail:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
}
.service-detail h3, .service-detail h2 {
  font-family: var(--font-title);
  font-size: 24px;
  color: var(--color-primary-dark);
  margin-bottom: 18px;
  font-weight: 600;
}
.service-detail ul { list-style: none; padding: 0; }
.service-detail li {
  padding: 8px 0 8px 32px;
  position: relative;
  color: var(--color-text-light);
  font-size: 16px;
  transition: color .2s;
}
.service-detail li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 8px;
  width: 22px; height: 22px;
  background: var(--gradient-accent);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.service-detail li:hover { color: var(--color-text); }

/* ============ CTA ============ */
.cta {
  background: var(--gradient-primary);
  color: var(--color-white);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0,194,255,.2), transparent 70%);
  pointer-events: none;
}
.cta__inner { position: relative; z-index: 2; }
.cta__inner h2 {
  font-family: var(--font-title);
  font-size: clamp(28px, 3.5vw, 40px);
  margin-bottom: 16px;
  font-weight: 700;
}
.cta__inner p {
  font-size: 18px;
  opacity: .9;
  margin-bottom: 36px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}
.cta .btn--primary {
  background: var(--color-white);
  color: var(--color-primary-dark);
}
.cta .btn--primary:hover {
  background: var(--color-cyan);
  color: var(--color-white);
  box-shadow: var(--shadow-glow);
}

/* ============ PAGE HERO ============ */
.page-hero {
  padding: 80px 0 60px;
  background: var(--gradient-primary);
  text-align: center;
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(0,194,255,.2), transparent 60%);
}
.page-hero h1 {
  font-family: var(--font-title);
  font-size: clamp(34px, 4vw, 52px);
  margin-bottom: 12px;
  font-weight: 700;
  position: relative;
}
.page-hero p {
  font-size: 18px;
  opacity: .9;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

/* ============ CONTACTO ============ */
.contact { background: var(--color-bg); }

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}
.contact__info h2 {
  font-family: var(--font-title);
  font-size: 28px;
  color: var(--color-primary-dark);
  margin-bottom: 28px;
}
.contact__block {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--color-border);
  transition: transform .3s var(--transition);
}
.contact__block:hover { transform: translateX(6px); }
.contact__block:last-child { border-bottom: none; }
.contact__block h3 {
  font-size: 16px;
  color: var(--color-primary);
  margin-bottom: 8px;
  font-weight: 600;
}
.contact__block p { color: var(--color-text-light); font-size: 15px; }

.contact__form {
  background: var(--color-white);
  padding: 44px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.contact__form::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: var(--gradient-accent);
}
.contact__form h2 {
  font-family: var(--font-title);
  font-size: 24px;
  color: var(--color-primary-dark);
  margin-bottom: 28px;
}
.form-group { margin-bottom: 22px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--color-text);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--color-white);
  transition: all .3s var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-cyan);
  box-shadow: 0 0 0 4px rgba(0,194,255,.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ============ LEGAL ============ */
.legal__content { max-width: 800px; margin: 0 auto; }
.legal__content h2 {
  font-family: var(--font-title);
  font-size: 22px;
  color: var(--color-primary-dark);
  margin: 32px 0 12px;
}
.legal__content p, .legal__content li {
  color: var(--color-text-light);
  margin-bottom: 12px;
}
.legal__content ul { padding-left: 24px; }

/* ============ FOOTER ============ */
.footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,.85);
  padding: 70px 0 0;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-accent);
}
.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  position: relative;
  z-index: 2;
}
.footer__brand img { margin-bottom: 12px; }
.footer__brand p { margin-bottom: 8px; font-size: 14px; line-height: 1.7; }
.footer__brand strong { color: var(--color-white); font-size: 16px; }
.footer h4 {
  color: var(--color-white);
  font-size: 15px;
  margin-bottom: 16px;
  font-weight: 600;
}
.footer__links a {
  display: block;
  color: rgba(255,255,255,.75);
  font-size: 14px;
  margin-bottom: 10px;
  transition: all .2s;
}
.footer__links a:hover {
  color: var(--color-cyan);
  transform: translateX(4px);
}
.footer__contact p { font-size: 14px; margin-bottom: 10px; }
.footer__contact a { color: rgba(255,255,255,.85); }
.footer__contact a:hover { color: var(--color-cyan); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 24px 0;
  font-size: 13px;
  color: rgba(255,255,255,.6);
}
.footer__bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__bottom p { margin: 0; }

/* Crédito EM-SOFTWARE */
.footer__credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.7);
  font-size: 13px;
  transition: all .3s var(--transition);
}
.footer__credit:hover { color: var(--color-cyan); }
.footer__credit strong {
  background: linear-gradient(135deg, #00C2FF, #3B9EDB);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  letter-spacing: .5px;
}

/* ============ WHATSAPP ============ */
.whatsapp-float {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 60px; height: 60px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,.45);
  z-index: 90;
  transition: all .3s var(--transition);
  animation: pulseWA 2.5s infinite;
}
.whatsapp-float:hover {
  transform: scale(1.12) rotate(8deg);
  box-shadow: 0 12px 32px rgba(37,211,102,.6);
}
.whatsapp-float svg { width: 30px; height: 30px; fill: white; }

@keyframes pulseWA {
  0%, 100% { box-shadow: 0 8px 24px rgba(37,211,102,.45); }
  50% { box-shadow: 0 8px 24px rgba(37,211,102,.45), 0 0 0 8px rgba(37,211,102,.10); }
}

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s var(--transition), transform .8s var(--transition);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ SCROLL PROGRESS ============ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient-accent);
  z-index: 200;
  transition: width .1s linear;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero__text { margin-left: auto; margin-right: auto; }
  .hero__actions { justify-content: center; }
  .hero__image { order: -1; }
  .hero__image img { max-width: 220px; }
  .contact__grid { grid-template-columns: 1fr; gap: 40px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .header__nav {
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: 28px;
    gap: 20px;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-120%);
    transition: transform .35s var(--transition);
    box-shadow: var(--shadow-md);
  }
  .header__nav.open { transform: translateY(0); }
  .header__cta { display: none; }
  .header__toggle { display: flex; }
  .header__brand .header__tagline { display: none; }

  .section { padding: 70px 0; }
  .service-detail { padding: 28px 24px; }
  .contact__form { padding: 28px 24px; }
  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom .container { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero { padding: 60px 0 70px; }
  .hero__actions .btn { width: 100%; }
}

/* Accesibilidad: reducir movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}