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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  background: #ffffff;
  color: #333333;
  line-height: 1.6;
}
/
/* Fix moderno para anchors con header fijo */
#seo,
#web-design,
#digital-marketing {
  scroll-margin-top: 150px;
}

main {
  padding-bottom: 4rem;
}

/* TOP BAR NEGRA */
.topbar {
  background: #000000;
  color: #f9fafb;
  font-size: 0.85rem;
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.35rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.topbar-left span {
  color: #e5e7eb;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.topbar-right a {
  color: #f9fafb;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.topbar-right a:hover {
  text-decoration: underline;
}

.topbar-separator {
  color: #9ca3af;
}

/* Iconos topbar */
.topbar-icon {
  font-size: 0.9rem;
  display: inline-block;
}

.topbar-icon-star {
  color: #facc15;
}

.topbar-icon-phone {
  color: #ffffff;
}

.topbar-icon-mail {
  color: #ffffff;
}

/* HEADER */
.header {
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: auto;
  padding: 0;
  background: transparent;
  border-radius: 0;
  border: none;
  transition: opacity 0.3s ease;
}

.header-logo-link:hover {
  opacity: 0.8;
}

.header-logo-img {
  height: 96px;
  width: auto;
  max-width: 384px;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.header-logo-img:hover {
  opacity: 0.8;
}

/* HEADER NAV */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
}

.header-nav a {
  color: #333333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.header-nav a:hover {
  color: #174f78;
}

.nav-separator {
  color: #9ca3af;
  font-weight: 400;
}

/* =========================
   CAROUSEL DE TEXTO
   ========================= */
.text-carousel {
  background: #174f78;
  color: #f9fafb;
  border-bottom: 1px solid #123a57;
}

.text-carousel-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem 3rem;
  position: relative;
  text-align: center;
}

.text-carousel-slide {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  max-width: 980px;
  margin: 0 auto;
}

.text-carousel-slide.is-active {
  display: block;
  opacity: 1;
}

.text-carousel-slide h2 {
  margin: 0;
  padding: 1.1rem 2.5rem;
  font-size: 1.9rem;
  font-weight: 700;
  color: #ffffff;
  background: #000000;
  display: inline-block;
}

.text-carousel-slide p {
  margin: 1rem auto 0;
  padding: 1rem 2.5rem;
  font-size: 1.15rem;
  color: #111111;
  background: #ffffff;
  display: inline-block;
}

.text-carousel-dots {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.4rem;
  justify-content: center;
}

.text-carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: none;
  background: #123a57;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}

.text-carousel-dot.is-active {
  background: #ffffff;
  width: 18px;
}

/* =========================
   HERO
   ========================= */
.hero {
  padding: 4rem 1.5rem 3rem;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 2.5rem;
}

.hero-main h1 {
  font-size: 2.8rem;
  margin-bottom: 0.8rem;
  color: #1f2937;
  font-weight: 700;
  line-height: 1.2;
}

.hero-main p {
  margin-bottom: 0.8rem;
  color: #555555;
  font-size: 1.05rem;
}

.hero-subtitle {
  font-weight: 600;
  color: #174f78;
  font-size: 1rem;
}

/* =========================
   BOTONES - AZUL CORPORATIVO
   ========================= */
.btn-primary {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.875rem 2rem;
  border-radius: 6px;
  background: #174f78;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(23, 79, 120, 0.3);
}

.btn-primary:hover {
  background: #0f3a57;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(23, 79, 120, 0.4);
}

/* ========================= BTN-SECONDARY (TESTIMONIALS BUTTON) ========================= */
.btn-secondary {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: 6px;
  background: #174f78 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 12px rgba(23, 79, 120, 0.3) !important;
  border: none !important;
}

.btn-secondary:hover {
  background: #123a57 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(23, 79, 120, 0.4) !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

/* HERO GRID - 3 SERVICIOS */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.hero-card {
  background: #f9fafb;
  border-radius: 8px;
  padding: 1.4rem 1.3rem;
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.hero-card:hover {
  border-color: #174f78;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.hero-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: #1f2937;
  font-weight: 600;
}

.hero-card h3 a {
  color: inherit;
  text-decoration: none;
}

.hero-card h3 a:hover {
  color: #174f78;
}

.hero-card p {
  margin: 0;
  font-size: 0.95rem;
  color: #666666;
}

/* =========================
   SECCIONES
   ========================= */
.section {
  padding: 3.5rem 1.5rem;
  background: #ffffff;
}

.section:nth-of-type(odd) {
  background: #f5f7fb;
}

.section-inner {
  max-width: 900px;
  margin: 0 auto;
}

.section-card {
  position: relative;
  background: #ffffff;
  border-radius: 10px;
  padding: 2.2rem 2rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.section-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  border-radius: 10px 10px 0 0;
  background: #174f78;
}

.section-card:hover {
  transform: translateY(-4px);
  border-color: #174f78;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.section h2 {
  position: relative;
  font-size: 2rem;
  margin: 0 0 1rem 0;
  color: #0f172a;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.section p {
  margin: 0;
  color: #4b5563;
  line-height: 1.8;
  font-size: 1.05rem;
}

.section-card ul {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  color: #4b5563;
  font-size: 1.02rem;
}

.section-card li {
  margin-bottom: 0.3rem;
}

/* FOOTER */
.footer {
  background: #1f2937;
  color: #e5e7eb;
  padding: 2rem 1.5rem;
  border-top: 1px solid #111827;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.95rem;
  text-align: center;
}

.footer a {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
}

.footer a:hover {
  text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-main h1 {
    font-size: 2.2rem;
  }

  .header-nav {
    display: none;
  }

  .header-logo-img {
    height: 50px;
    max-width: 200px;
  }

  .topbar-inner {
    padding: 0.4rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .topbar-right {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .text-carousel-inner {
    padding: 2rem 1rem 2.1rem;
  }

  .text-carousel-slide {
    max-width: 100%;
  }

  .section {
    padding: 2.8rem 1.2rem;
  }

  .section-card {
    padding: 1.8rem 1.4rem;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 2.5rem 1rem 2rem;
  }

  .hero-main h1 {
    font-size: 1.8rem;
  }

  .hero-main p {
    font-size: 0.95rem;
  }

  .section {
    padding: 2.2rem 1rem;
  }

  .section-card {
    padding: 1.6rem 1.2rem;
  }

  .section h2 {
    font-size: 1.6rem;
  }

  .header-logo-img {
    height: 45px;
    max-width: 170px;
  }

  .btn-primary {
    padding: 0.7rem 1.4rem;
    font-size: 0.95rem;
  }
}

/* =========================
   ABOUT: TIMELINE
   ========================= */
.timeline {
  position: relative;
  margin-top: 1.5rem;
  padding-left: 3.8rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 1.4rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e5e7eb;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.8rem;
  padding-left: 0;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-year {
  position: relative;
  font-weight: 700;
  color: #174f78;
  margin-bottom: 0.2rem;
  margin-left: 2.8rem;
}

.timeline-year::before {
  content: "";
  position: absolute;
  left: -2.4rem;
  top: 0.05rem;
  width: 24px;
  height: 24px;
  background-image: url("../img/icons/milestone-bullet.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.timeline-content {
  margin-left: 3.3rem;
}

.timeline-content h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  color: #0f172a;
  font-weight: 600;
}

.timeline-content p {
  margin: 0;
  font-size: 0.98rem;
  color: #4b5563;
  line-height: 1.7;
}

.about-postscript {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.98rem;
  color: #4b5563;
  line-height: 1.4;
}

.about-postscript p {
  margin: 0;
}

.about-postscript p + p {
  margin-top: 0.1rem;
}

.about-postscript .about-cv-link {
  margin-top: 0.2rem;
  font-weight: 500;
}

.about-postscript .about-cv-link a {
  color: #174f78;
  font-weight: 600;
  text-decoration: none;
}

.about-postscript .about-cv-link a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .timeline {
    padding-left: 3.1rem;
  }

  .timeline::before {
    left: 1.2rem;
  }

  .timeline-year {
    margin-left: 2.4rem;
  }

  .timeline-year::before {
    left: -2.2rem;
  }

  .timeline-content {
    margin-left: 2.4rem;
  }
}

/* ===== NAV RESPONSIVE ===== */
.header-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0;
  margin-left: auto;
  cursor: pointer;
}

.header-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background-color: #111827;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-toggle.is-active .header-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.header-toggle.is-active .header-toggle-bar:nth-child(2) {
  opacity: 0;
}

.header-toggle.is-active .header-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 768px) {
  .header-inner {
    align-items: center;
  }

  .header-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    display: none;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem;
    z-index: 50;
  }

  .header-nav.is-open {
    display: flex;
  }

  .header-nav a,
  .header-nav .nav-separator {
    padding: 0.25rem 0;
  }

  .header-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    margin-left: auto;
  }
}

@media (min-width: 769px) {
  .header-nav {
    position: static;
    display: flex;
    align-items: center;
  }
}

.about-milestones-title {
  text-align: center;
}

.portfolio-intro-title,
.portfolio-projects-title {
  text-align: center;
}

.about-main-title,
.about-experience-title {
  text-align: center;
}

/* ===== TIPOGRAFÍA HOME ===== */
.home-page h1,
.home-page .section-card h2 {
  text-align: center;
}

.home-page p {
  text-align: justify;
}

.home-page .hero-main p,
.home-page .hero-main .hero-subtitle {
  text-align: justify;
}

.hero-main .hero-subtitle {
  text-align: justify;
}

.home-page .hero-main h1 {
  text-align: center;
}

.home-page .hero-main p,
.home-page .hero-main .hero-subtitle {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
}

.home-page .footer p {
  text-align: center !important;
}

.services-page .section-card h2 {
  text-align: center;
}

.section-card h1,
.section-card h2 {
  text-align: center;
}

/* =========================
   404 PAGE
   ========================= */
.section-404-layout {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 32px;
  align-items: flex-start;
  justify-content: flex-start;
  margin-top: 24px;
  width: 100%;
}

.section-404-text {
  flex: 1 1 0;
  min-width: 0;
}

.section-404-image {
  flex: 0 1 320px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  margin-top: 0;
}

.section-404-image img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.section-404-text ul {
  list-style: disc;
  padding-left: 20px;
  margin-top: 12px;
}

.section-404-text ul li {
  margin-bottom: 8px;
}

.section-404-text a {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .section-404-layout {
    flex-direction: column;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
  }

  .section-404-text {
    flex: 1 1 100%;
  }

  .section-404-image {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .services-page .section-card h1 {
    font-size: 1.6rem;
  }
}

main > .section:first-child {
  background: #174f78;
}

.section {
  background: #ffffff;
}

.section:nth-of-type(odd) {
  background: #f5f7fb;
}

/* =========================
   HOME STATS
   ========================= */
.home-stats {
  background: #f8f9fa;
  padding: 60px 20px;
  border-bottom: 1px solid #e0e0e0;
}

.home-stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.stat-card {
  background: #ffffff;
  padding: 30px 20px;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(23, 79, 120, 0.15);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #174f78;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 1rem;
  color: #666;
  font-weight: 500;
}

/* =========================
   HOME CTA - AZUL CORPORATIVO
   ========================= */
.home-cta {
  background: linear-gradient(135deg, #174f78 0%, #1a5f8f 100%);
  padding: 80px 20px;
  text-align: center;
  color: #ffffff;
}

.home-cta-inner {
  max-width: 800px;
  margin: 0 auto;
}

.cta-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 20px;
}

.cta-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #e8f4f8;
  margin-bottom: 30px;
}

.cta-button {
  display: inline-block;
  background: #ffffff;
  color: #174f78;
  padding: 15px 40px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  background: #0ec6d5;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.section:nth-child(even) {
  background: #f8f9fa;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .home-stats {
    padding: 40px 20px;
  }

  .home-stats-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .home-cta {
    padding: 60px 20px;
  }

  .cta-title {
    font-size: 1.8rem;
  }

  .cta-description {
    font-size: 1rem;
  }

  .cta-button {
    padding: 12px 30px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .home-stats-inner {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 20px 15px;
  }

  .cta-title {
    font-size: 1.6rem;
  }
}

/* Títulos azules reutilizables (mismo estilo que "Testimonials 100% Authentic") */
.section-title-blue {
  color: #174f78;        /* Azul corporativo */
  font-weight: 700;      /* Misma fuerza de fuente que tus h2 */
  letter-spacing: 0.02em;
}

.home-page .home-main-title.section-title-blue {
  color: #174f78 !important;
}

.portfolio-projects-title.section-title-blue {
  color: #174f78 !important;
}

.section-title-blue {
  color: #174f78;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Forzar títulos azules dentro de .section */
.section .section-title-blue {
  color: #174f78 !important;
}

/* Títulos azules reutilizables */
.section-title-blue {
  color: #174f78;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Forzar dentro de .section */
.section .section-title-blue {
  color: #174f78 !important;
}

/* Forzar en la home (Our Core Services) */
.home-featured-services .section-title-blue {
  color: #174f78 !important;
}

.about-postscript .section-title-blue {
  font-size: 1.05rem;
  text-transform: uppercase;
}

.testimonials-cta {
  text-align: center;          /* Centra el contenido inline/inline-block dentro del div */
  margin: 0 auto;             /* (Opcional) centra el propio contenedor si tiene ancho fijo */
}

.btn-secondary {
  display: inline-block;      /* Asegura que el botón se comporte bien como elemento centrado */
}
