/*
Theme Name: Magic
Theme URI: https://themagic.mx
Author: Fausto Castillo
Description: Tema personalizado para The Magic — agencia creativa de Monterrey especializada en branding, estrategia digital, producción audiovisual y experiencias. Diseño moderno con hero animado, blog integrado, formulario de contacto y versión en inglés.
Version: 1.0.3
*/

/* Reset básico */
:root {
  --MGray-50: #F9FAFF;
  --MGray-300: #CED5E1;
  --MGray-500: #6E7189;
  --MGray-700: #354153;
  --MPurpleLight: #E4D4FF;
  --MPurple-50: #FBF5FF;
  --MPurple: #9551FB;
  --MCyan: #00CFE5;
  --White: #FFFFFF;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Tipografías */
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('assets/fonts/Satoshi-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* Estilos Globales */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  font-feature-settings: 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  color: #111;
  background-color: var(--MGray-50);
}

/* =========================================
   Header & Navegación
   ========================================= */
.site-header {
  padding: 1.5rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: transparent;
  z-index: 100;
  transition: background-color 0.2s ease;
}

/* Pill blanca con shadow al hacer scroll (desktop y móvil) */
.site-header.header-scrolled .header-container {
  background-color: #fff;
  border-radius: 9999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 0.5rem 1.5rem;
  transition: max-width 0.35s ease, background-color 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}

@media (min-width: 769px) {
  .site-header.header-scrolled .header-container {
    max-width: 768px;
  }
}

/* Ajuste para la barra de administración de WordPress */
body.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 0;
  transition: max-width 0.35s ease, background-color 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}

/* Logo */
.header-logo img {
  display: block;
  height: 40px;
  width: auto;
}

/* Wrapper del menú (centro + CTA en desktop; panel en móvil) */
.header-nav-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  flex: 1;
}

/* Menú (Centro en desktop) */
.header-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.header-nav ul {
  display: flex;
  list-style: none;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

/* Botón hamburguesa: oculto en desktop */
.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 110;
  transition: opacity 0.2s ease;
}

.burger-btn:hover {
  opacity: 0.8;
}

.burger-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--MGray-700);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Estado abierto: icono X */
.site-header.nav-open .burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.nav-open .burger-line:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ========== Responsive: menú hamburguesa ========== */
@media (max-width: 768px) {
  .burger-btn {
    display: flex;
  }

  .header-nav-wrap {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 5rem 2rem 2rem;
    background-color: var(--White);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .site-header.nav-open .header-nav-wrap {
    opacity: 1;
    visibility: visible;
  }

  .header-nav {
    position: static;
    transform: none;
  }

  .header-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .header-nav .navbar-option {
    display: block;
    padding: 1rem 1.5rem;
    text-align: center;
    font-size: 26px;
  }

  .header-nav-wrap .btn-primary {
    font-size: 1.25rem;
    padding: 1rem 2rem;
  }
}

/* Selector más específico para ganar a cualquier regla genérica */
.header-nav .navbar-option {
  text-decoration: none;
  color: var(--MGray-700);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  font-feature-settings: 'cv11' on;
  
  /* Efecto Pill */
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background-color: transparent; /* Definido explícitamente para transición */
  transition: background-color 0.4s ease, color 0.4s ease;
}

.header-nav .navbar-option:hover {
  color: var(--MPurple);
  background-color: var(--MPurple-50);
}

/* Tamaño de enlaces en menú móvil (debe ir después de la regla base para ganar) */
@media (max-width: 768px) {
  .header-nav .navbar-option {
    font-size: 26px !important;
    padding: 1rem 1.5rem;
  }
}

/* 3. Botón (Derecha) */
.btn-primary {
  display: inline-block;
  background-color: var(--MPurple);
  color: var(--White);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.btn-primary:hover {
  background-color: var(--MPurpleLight);
  color: var(--MPurple);
}

/* Layout de prueba */
main {
  display: block;
  padding: 0;
}

.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}

/* Fondo del hero: solo video con transparencia 10% */
.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-video {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.08;
}

.hero-backdrop-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35%;
  background: linear-gradient(to top, var(--MGray-50) 0%, transparent 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.hero-pill {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.5);
  color: var(--MGray-700);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  font-style: normal;
  line-height: normal;
  font-feature-settings: 'cv11' on;
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero-pill-mobile {
  display: none;
}

.text-gradient {
  background: linear-gradient(
    to right, 
    var(--MCyan) 0%, 
    var(--MPurple) 50%, 
    var(--MCyan) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 600;
  background-size: 200% auto;
  animation: textShine 4s linear infinite;
}

@keyframes textShine {
  to {
    background-position: 200% center;
  }
}

.hero-title {
  color: var(--MPurple);
  text-align: center;
  font-size: 60px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
  font-family: 'Satoshi', sans-serif;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  color: var(--MGray-700);
  text-align: center;
  font-feature-settings: 'cv11' on;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

.hero-subtitle-mobile {
  display: none;
}

.rotating-words {
  min-height: 34px;
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem; /* Espacio entre palabras */
  flex-wrap: wrap; /* Para móviles si es necesario */
}

.word-slot {
  color: var(--MGray-300);
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  transition: opacity 1s ease-in-out;
  opacity: 1;
  width: 200px; /* Ancho fijo para evitar saltos */
  display: inline-block; /* Necesario para respetar el width */
}

.word-slot.fade-out {
  opacity: 0;
}

/* Chevron scroll (hero) */
.hero {
  position: relative;
}

.hero-chevron {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--MPurpleLight);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.hero-chevron:hover {
  color: var(--MPurple);
  opacity: 0.9;
}

.hero-chevron-icon {
  width: 20px;
  height: 20px;
  display: block;
  animation: hero-chevron-bounce 2s ease-in-out infinite;
}

@keyframes hero-chevron-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

/* Hero: ajustes solo móvil */
@media (max-width: 768px) {
  .hero-pill-full {
    display: none !important;
  }

  .hero-pill-mobile {
    display: inline !important;
  }

  .hero-title {
    font-size: 52px;
    line-height: 1.1;
  }

  .hero-subtitle-desktop {
    display: none !important;
  }

  .hero-subtitle-mobile {
    display: inline !important;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .rotating-words .word-slot:nth-child(n+3) {
    display: none !important;
  }

  .rotating-words {
    flex-wrap: nowrap;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .rotating-words .word-slot {
    width: auto;
    min-width: 0;
    max-width: 50%;
    flex: 1 1 auto;
  }

  .hero-chevron-icon {
    width: 16px;
    height: 16px;
  }
}

h1 {
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

/* =========================================
   About Section (Nosotros)
   ========================================= */
.about-section {
  padding: 5rem 1.5rem;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .about-section {
    padding: 8rem 2rem;
  }
}

.about-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

@media (min-width: 1024px) {
  .about-container {
    flex-direction: row;
    align-items: flex-start;
  }
}

/* Text Column */
.about-text-col {
  flex: 1;
  max-width: 100%;
}

@media (min-width: 1024px) {
  .about-text-col {
    max-width: 32rem;
    position: sticky;
    top: 2rem;
  }
}

.about-title {
  font-family: 'Satoshi', sans-serif;
  font-size: 48px;
  font-weight: 300;
  color: var(--MPurple);
  line-height: normal;
  margin-bottom: 3rem;
  position: relative;
}

.about-title::after {
  content: '';
  display: block;
  width: 12.5%;
  height: 1px;
  background-color: var(--MCyan);
  position: absolute;
  bottom: -1.5rem;
  left: 0;
}

.about-lead {
  color: var(--MGray-700);
  font-feature-settings: 'cv11' on;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px; /* 150% */
  margin-bottom: 1.5rem;
}

.about-desc {
  color: var(--MGray-700);
  font-feature-settings: 'cv11' on;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px; /* 150% */
  opacity: 0.9;
  margin-bottom: 2.5rem;
}

.magic-highlight {
  font-weight: 400;
  font-style: italic;
  color: var(--MPurple);
}

.about-cta {
  display: flex;
}

.about-signature-block {
  margin-top: 1.5rem;
}

.about-signature-img {
  display: block;
  height: auto;
  max-width: 100px;
  margin-bottom: 0.5rem;
}

.about-signature-role {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--MGray-500);
  margin: 0;
  line-height: 1.4;
}

/* Gallery */
.about-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .about-gallery {
    flex: 1; /* Take remaining space */
    min-width: 0; /* Prevent grid blowout */
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    align-items: start; /* Default alignment */
  }

  /* Image 1: Large Vertical (Left) */
  .item-1 {
    grid-column: 1 / span 7;
    grid-row: 1 / span 3;
  }

  /* Image 2: Small (Right Top) */
  .item-2 {
    grid-column: 8 / span 5;
    align-self: end; /* Align to bottom of its cell if row is taller */
    justify-self: end; /* Push to right edge */
    width: 80%; /* Make it smaller horizontally like the Tailwind layout? */
  }

  /* Image 3: Medium (Right Middle) */
  .item-3 {
    grid-column: 8 / span 5;
    /* Full width of the column */
  }

  /* Image 4: Small (Right Bottom) */
  .item-4 {
    grid-column: 9 / span 4; /* Indented from left */
  }
}

/* Image Items */
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
  background-color: var(--MGray-50);
  display: block;
}

/* Aspect Ratios */
.item-1 img {
  aspect-ratio: 4/5; /* Portrait */
}

.item-2 img {
  aspect-ratio: 4/3;
}

.item-3 img {
  aspect-ratio: 7/5;
}

.item-4 img {
  aspect-ratio: 4/3;
}

/* Responsive tweaks for mobile */
@media (max-width: 1023px) {
  .gallery-item img {
    aspect-ratio: 3/2; /* Uniform landscape on mobile */
  }

  .item-1 img {
    aspect-ratio: 3/4; /* Más altura para imagen 1 en móvil */
  }
}

/* =========================================
   Services Section (¿Qué hacemos?)
   ========================================= */
.services-section {
  padding: 6rem 1.5rem;
}

.services-container {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.services-badge {
  display: inline-block;
  background-color: var(--White);
  color: var(--MPurple);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 8px 24px;
  border-radius: 999px;
  margin-bottom: 2rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.services-title {
  font-family: 'Satoshi', sans-serif;
  font-size: 48px;
  font-weight: 300;
  color: var(--MPurple);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.services-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #64748B;
  line-height: 28px;
  max-width: 600px;
  margin-bottom: 4rem;
}

.services-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
}

@media (min-width: 640px) {
  .services-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.services-card {
  background: #FFF;
  border-radius: 16px;
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.05);
  padding: 2.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.services-icon {
  width: 3.5rem;
  height: 3.5rem;
  background-color: var(--MPurple-50);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.services-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--MPurple);
}

.services-card-text {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--MGray-700);
  line-height: 1.4;
}

/* =========================================
   Agency Cards Section
   ========================================= */
.agency-cards-section {
  padding: 2rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

.ac-card {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  background-color: #ffffff;
  border-radius: 15px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-family: 'Inter', sans-serif;
  overflow: visible;
  box-sizing: border-box;
}

.ac-gradient-overlay {
  position: absolute;
  inset: 6px;
  border-radius: 15px;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(87deg, rgba(204, 245, 250, 0.00) 23.05%, rgba(204, 245, 250, 0.20) 98.4%);
}

.ac-pill {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  padding: 8px 24px;
  border-radius: 100px;
  z-index: 10;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.ac-pill span {
  color: var(--MPurple);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.ac-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: 32px;
  gap: 24px;
}

.ac-content {
  flex: 1;
}

.ac-title {
  color: var(--MGray-700);
  font-family: 'Satoshi', sans-serif;
  font-size: 30px;
  font-weight: 600;
  line-height: 36px;
  margin: 0 0 32px 0;
}

.ac-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ac-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--MGray-500);
  font-size: 16px;
  line-height: 1.4;
}

.ac-icon {
  width: 20px;
  height: 20px;
  color: var(--MPurple);
  flex-shrink: 0;
  margin-top: 2px;
}

.ac-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.ac-image {
  width: 360px;
  height: 360px;
  object-fit: contain;
}

@media (min-width: 768px) {
  .ac-inner {
    flex-direction: row;
    padding: 60px;
    align-items: center;
  }

  .ac-content {
    flex: 0 0 60%;
  }

  .ac-image-container {
    flex: 0 0 40%;
  }

  .ac-title {
    font-size: 30px;
  }

  .ac-list {
    grid-template-columns: 1fr 1fr;
    gap: 20px 40px;
  }
}

@media (max-width: 767px) {
  .ac-image-container {
    order: -1;
    margin-bottom: 20px;
  }

  .ac-image {
    max-width: 100%;
    width: auto;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .ac-title {
    text-align: center;
    font-size: 24px;
  }
}

/* =========================================
   Contact Section (Contáctanos)
   ========================================= */
.contact-section {
  padding: 2rem 1.5rem 5rem;
}

.contact-section .ac-card {
  max-width: 1280px;
}

.contact-card .ac-gradient-overlay {
  display: none;
}

.contact-inner {
  position: relative;
  z-index: 2;
  padding: 48px 60px 60px;
  text-align: center;
}

.contact-title {
  font-family: 'Satoshi', sans-serif;
  font-size: 48px;
  font-weight: 300;
  line-height: 1.2;
  margin: 0 0 1rem 0;
}

.contact-title.text-gradient {
  font-weight: 300;
  background: linear-gradient(
    to right,
    var(--MPurple) 0%,
    var(--MCyan) 50%,
    var(--MPurple) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  background-size: 200% auto;
  animation: textShine 4s linear infinite;
}

.contact-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--MGray-700);
  line-height: 1.5;
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

.contact-form {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-field-full {
  margin-bottom: 1.5rem;
}

.contact-form label {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--MGray-700);
}

.contact-form .required {
  color: var(--MPurple);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--MGray-700);
  background: #fff;
  border: 1px solid var(--MGray-300);
  border-radius: 8px;
  box-sizing: border-box;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--MPurple);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--MGray-500);
  font-size: 14px;
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-submit-wrap {
  text-align: center;
  margin-top: 0.5rem;
}

.contact-section .btn-primary {
  cursor: pointer;
  border: none;
}

@media (max-width: 767px) {
  .contact-inner {
    padding: 48px 24px 40px;
  }

  .contact-title {
    font-size: 36px;
  }

  .contact-form-row {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   Footer
   ========================================= */
.tm-footer {
  background-color: var(--MPurple);
  color: var(--White);
  padding: 60px 20px 80px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

.tm-footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.tm-footer-logo-link {
  display: inline-block;
  margin-bottom: 32px;
}

.tm-footer-logo {
  height: 32px;
  width: auto;
  display: block;
}

.tm-lang-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  margin-bottom: 24px;
}

.tm-lang-selector a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s ease;
}

.tm-lang-selector a.active {
  color: var(--White);
  cursor: default;
}

.tm-lang-selector a:hover:not(.active) {
  color: var(--White);
}

.tm-lang-sep {
  opacity: 0.7;
}

.tm-social-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
}

.tm-social-links a {
  color: var(--White);
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
}

.tm-social-links a:hover {
  opacity: 0.8;
}

.tm-social-icon {
  width: 24px;
  height: 24px;
}

.tm-contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  margin-bottom: 24px;
}

.tm-contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--White);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.tm-contact-link:hover {
  opacity: 0.8;
}

.tm-contact-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.tm-copyright {
  font-size: 14px;
  margin: 0;
  opacity: 1;
}

@media (min-width: 768px) {
  .tm-contact-info {
    flex-direction: row;
    justify-content: center;
    gap: 40px;
  }
}

/* =========================================
   Blog listing (solo español)
   ========================================= */
.blog-listing-page {
  padding-bottom: 4rem;
}

.blog-listing-header {
  padding: 10rem 1.5rem 3rem;
  text-align: center;
  /* Mismo fondo que el hero del index (imagen + gradiente) */
  background-image: linear-gradient(to bottom, transparent 70%, var(--MGray-50) 100%), url('assets/images/hero/hero_bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.blog-listing-header-inner {
  max-width: 640px;
  margin: 0 auto;
}

/* Mismo estilo que la pill del Hero */
.blog-listing-pill {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--MGray-700);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  font-feature-settings: 'cv11' on;
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 1.5rem;
}

.blog-listing-title {
  font-family: 'Satoshi', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  color: var(--MGray-700);
  line-height: 1.2;
  margin: 0 0 1rem;
}

.blog-listing-title-accent {
  color: var(--MPurple);
}

.blog-listing-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--MGray-500);
  line-height: 1.6;
  margin: 0;
}

.blog-listing-cards {
  padding: 0 1.5rem 3rem;
}

.blog-listing-container {
  max-width: 1200px;
  margin: 0 auto;
}

.blog-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .blog-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  background: var(--White);
  border-radius: 16px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.blog-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.blog-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.blog-card-image-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--MGray-50);
}

.blog-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.blog-card-link:hover .blog-card-image {
  transform: scale(1.06);
}

.blog-card-image-placeholder {
  background: linear-gradient(135deg, var(--MPurpleLight) 0%, var(--MGray-300) 100%);
}

.blog-card-body {
  padding: 1.5rem;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.blog-card-category {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--MPurple);
  background-color: var(--MPurpleLight);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.blog-card-date {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--MGray-500);
  flex-shrink: 0;
}

.blog-card-title {
  font-family: 'Satoshi', sans-serif;
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--MGray-700);
  line-height: 1.3;
  margin: 0 0 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-excerpt {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--MGray-500);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-no-posts {
  text-align: center;
  color: var(--MGray-500);
  padding: 3rem;
}

/* Paginación del blog */
.blog-listing-container .nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.blog-listing-container .nav-links a,
.blog-listing-container .nav-links .current {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--MGray-700);
  background: var(--White);
  border: 1px solid var(--MGray-300);
}

.blog-listing-container .nav-links a:hover {
  background: var(--MPurpleLight);
  color: var(--MPurple);
  border-color: var(--MPurple);
}

.blog-listing-container .nav-links .current {
  background: var(--MPurple);
  color: var(--White);
  border-color: var(--MPurple);
}

/* =========================================
   Single post (entrada del blog)
   ========================================= */
.single-post-page {
  padding: 8rem 1.5rem 4rem;
  min-height: 100vh;
}

.single-post-card {
  max-width: 900px;
  margin: 0 auto;
  background: var(--White);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.single-post-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--MGray-50);
}

.single-post-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.single-post-hero-placeholder {
  width: 100%;
  height: 100%;
  min-height: 280px;
  background: linear-gradient(135deg, var(--MPurpleLight) 0%, var(--MGray-300) 100%);
}

.single-post-article {
  padding: 0;
}

.single-post-content-wrap {
  padding: 2.5rem 2rem 3rem;
  max-width: 720px;
  margin: 0 auto;
}

.single-post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.single-post-category {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--MPurple);
  background-color: var(--MPurpleLight);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.single-post-date {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--MGray-500);
}

.single-post-title {
  font-family: 'Satoshi', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--MGray-700);
  line-height: 1.2;
  text-align: center;
  margin: 0 0 0.75rem;
}

.single-post-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--MGray-500);
  line-height: 1.45;
  text-align: center;
  margin: 0 0 1rem;
}

.single-post-author {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--MGray-500);
  text-align: center;
  margin: 0 0 2rem;
}

.single-post-body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--MGray-700);
}

.single-post-body p {
  margin: 0 0 1rem;
}

.single-post-body p:last-child {
  margin-bottom: 0;
}

.single-post-body strong {
  font-weight: 600;
}

/* Títulos dentro del cuerpo: separación clara del contenido anterior y posterior */
.single-post-body h1,
.single-post-body h2,
.single-post-body h3,
.single-post-body h4,
.single-post-body h5,
.single-post-body h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.25;
  color: var(--MGray-700);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.single-post-body h2 { font-size: 1.5rem; }
.single-post-body h3 { font-size: 1.25rem; }
.single-post-body h4 { font-size: 1.125rem; }

/* Listas dentro del margen, sin que bullets/números se salgan */
.single-post-body ul,
.single-post-body ol {
  padding-left: 1.5em;
  margin: 0 0 1rem;
  line-height: 1.55;
}

.single-post-body ul {
  list-style-type: disc;
  list-style-position: outside;
}

.single-post-body ol {
  list-style-type: decimal;
  list-style-position: outside;
}

.single-post-body li {
  margin-bottom: 0.35rem;
}

.single-post-body li:last-child {
  margin-bottom: 0;
}

.single-post-back-wrap {
  margin-top: 2.5rem;
  margin-bottom: 0;
  text-align: center;
}

.single-post-back {
  text-decoration: none;
}

/* =========================================
   Fade-in on scroll
   ========================================= */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.12s; }
.fade-in-delay-2 { transition-delay: 0.24s; }
.fade-in-delay-3 { transition-delay: 0.36s; }

/* Hero content: animación al cargar la página (sin scroll) */
@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content {
  animation: heroFadeIn 0.9s ease forwards;
}
