/*
Theme Name:   Oceanus Child
Theme URI:    https://oceanus.org.mx
Description:  Child Theme de Oceanus A.C. — Restauración de Arrecifes de Coral del Caribe Mexicano. Basado en Hello Elementor.
Author:       Oceanus A.C.
Author URI:   https://oceanus.org.mx
Template:     hello-elementor
Version:      1.0.0
Text Domain:  oceanus-child
*/

/* ============================================================
   OCEANUS — SISTEMA DE DISEÑO GLOBAL
   Paleta: Profundidad marina + coral vivo del Caribe Mexicano
   Tipografía: Playfair Display + DM Sans
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Variables de diseño ──────────────────────────────────── */
:root {
  /* Paleta principal */
  --ocn-navy:    #0B2A45;
  --ocn-ocean:   #0D5C8C;
  --ocn-teal:    #0E8C8C;
  --ocn-seafoam: #1AB5A8;
  --ocn-coral:   #E85C2E;
  --ocn-sand:    #F5EFE0;
  --ocn-cream:   #FAFAF7;
  --ocn-white:   #FFFFFF;

  /* Texto */
  --ocn-text-dark:  #0B1F2E;
  --ocn-text-mid:   #3A5A72;
  --ocn-text-light: #7A9BAE;
  --ocn-border:     rgba(11, 42, 69, 0.12);

  /* Tipografía */
  --ocn-font-display: 'Playfair Display', Georgia, serif;
  --ocn-font-body:    'DM Sans', system-ui, sans-serif;

  /* Radios */
  --ocn-radius-sm: 8px;
  --ocn-radius-md: 16px;
  --ocn-radius-lg: 28px;
  --ocn-radius-xl: 48px;

  /* Sombras */
  --ocn-shadow-soft: 0 4px 32px rgba(11, 42, 69, 0.10);
  --ocn-shadow-card: 0 2px 16px rgba(11, 42, 69, 0.08);
  --ocn-shadow-pop:  0 12px 48px rgba(11, 42, 69, 0.18);

  /* Transiciones */
  --ocn-transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset y base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--ocn-font-body);
  color: var(--ocn-text-dark);
  background-color: var(--ocn-cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Tipografía global ────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ocn-font-display);
  color: var(--ocn-navy);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
  font-family: var(--ocn-font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ocn-text-mid);
  margin-bottom: 1.2rem;
}

a {
  color: var(--ocn-ocean);
  text-decoration: none;
  transition: var(--ocn-transition);
}

a:hover { color: var(--ocn-teal); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Barra de progreso de scroll ──────────────────────────── */
#ocn-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--ocn-teal), var(--ocn-seafoam), var(--ocn-coral));
  z-index: 99999;
  transition: width 0.1s linear;
}

/* ── HEADER / NAVBAR ──────────────────────────────────────── */
.ocn-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  padding: 0;
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}

.ocn-header.transparent {
  background: transparent;
}

.ocn-header.scrolled {
  background: rgba(11, 42, 69, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 32px rgba(0, 0, 0, 0.25);
}

.ocn-nav-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  transition: height 0.3s ease;
}

.ocn-header.scrolled .ocn-nav-inner {
  height: 64px;
}

/* Logo */
.ocn-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ocn-logo img {
  height: 46px;
  width: auto;
  transition: height 0.3s ease, filter 0.3s ease;
}

.ocn-header.scrolled .ocn-logo img {
  height: 38px;
}

/* Logo versión blanca para fondos oscuros */
.ocn-logo .logo-white { display: block; }
.ocn-logo .logo-color { display: none; }

/* Menú desktop */
.ocn-nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}

.ocn-nav-menu > li > a {
  display: block;
  font-family: var(--ocn-font-body);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  padding: 8px 14px;
  border-radius: var(--ocn-radius-sm);
  transition: var(--ocn-transition);
  white-space: nowrap;
}

.ocn-nav-menu > li > a:hover {
  color: var(--ocn-white);
  background: rgba(255, 255, 255, 0.10);
}

/* Dropdown */
.ocn-nav-menu li {
  position: relative;
}

.ocn-nav-menu .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--ocn-navy);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--ocn-radius-md);
  padding: 8px;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.22s ease;
  box-shadow: var(--ocn-shadow-pop);
}

.ocn-nav-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ocn-nav-menu .sub-menu li a {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.80);
  padding: 9px 14px;
  border-radius: var(--ocn-radius-sm);
  transition: var(--ocn-transition);
}

.ocn-nav-menu .sub-menu li a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ocn-seafoam);
}

/* Selector de idioma */
.ocn-lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.ocn-lang-switcher a {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: var(--ocn-transition);
  letter-spacing: 0.05em;
}

.ocn-lang-switcher a.active,
.ocn-lang-switcher a:hover {
  color: var(--ocn-white);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.ocn-lang-switcher .sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 11px;
}

/* Botón CTA Donar */
.ocn-nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 16px;
}

.ocn-btn-donar {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--ocn-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ocn-white) !important;
  background: var(--ocn-coral);
  padding: 10px 22px;
  border-radius: var(--ocn-radius-xl);
  box-shadow: 0 4px 18px rgba(232, 92, 46, 0.40);
  transition: var(--ocn-transition);
  white-space: nowrap;
  text-decoration: none;
}

.ocn-btn-donar:hover {
  background: #d44d22;
  color: var(--ocn-white) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232, 92, 46, 0.50);
}

/* Hamburger móvil */
.ocn-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  background: none;
  border: none;
  margin-left: 12px;
}

.ocn-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.90);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.ocn-hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.ocn-hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.ocn-hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Menú móvil overlay */
.ocn-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8999;
  background: rgba(11, 42, 69, 0.98);
  backdrop-filter: blur(20px);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 100px 32px 48px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ocn-mobile-menu.open {
  display: flex;
  opacity: 1;
}

.ocn-mobile-menu nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 400px;
}

.ocn-mobile-menu nav a {
  font-family: var(--ocn-font-body);
  font-size: 18px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  padding: 14px 24px;
  border-radius: var(--ocn-radius-md);
  width: 100%;
  text-align: center;
  transition: var(--ocn-transition);
}

.ocn-mobile-menu nav a:hover {
  color: var(--ocn-white);
  background: rgba(255, 255, 255, 0.08);
}

.ocn-mobile-menu .ocn-btn-donar-mobile {
  margin-top: 20px;
  width: 100%;
  max-width: 300px;
  text-align: center;
  font-size: 17px;
  padding: 16px 32px;
  border-radius: var(--ocn-radius-xl);
}

/* ── FOOTER ───────────────────────────────────────────────── */
.ocn-footer {
  background: var(--ocn-navy);
  color: rgba(255, 255, 255, 0.70);
  padding: 80px 0 40px;
  position: relative;
  overflow: hidden;
}

.ocn-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(26, 181, 168, 0.4), transparent);
}

.ocn-footer-grid {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 36px;
}

.ocn-footer-brand .ocn-footer-logo img {
  height: 42px;
  width: auto;
  margin-bottom: 18px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.ocn-footer-brand p {
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.60);
  max-width: 280px;
  margin-bottom: 24px;
}

/* Redes sociales */
.ocn-social {
  display: flex;
  gap: 10px;
}

.ocn-social a {
  width: 38px;
  height: 38px;
  border-radius: var(--ocn-radius-sm);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.65);
  font-size: 15px;
  transition: var(--ocn-transition);
  text-decoration: none;
}

.ocn-social a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--ocn-seafoam);
  border-color: var(--ocn-seafoam);
  transform: translateY(-2px);
}

.ocn-footer-col-title {
  font-family: var(--ocn-font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.90);
  margin-bottom: 18px;
}

.ocn-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ocn-footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.58);
  transition: var(--ocn-transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ocn-footer-links a::before {
  content: '';
  width: 0;
  height: 1px;
  background: var(--ocn-seafoam);
  transition: width 0.2s ease;
  flex-shrink: 0;
}

.ocn-footer-links a:hover {
  color: var(--ocn-seafoam);
  padding-left: 6px;
}

.ocn-footer-links a:hover::before {
  width: 12px;
}

/* Footer bottom */
.ocn-footer-bottom {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.ocn-footer-bottom-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.38);
  line-height: 1.6;
}

.ocn-footer-badges {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ocn-footer-badges img {
  height: 34px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.35;
  transition: opacity 0.2s;
}

.ocn-footer-badges img:hover {
  opacity: 0.55;
}

/* ── UTILIDADES GLOBALES ──────────────────────────────────── */

/* Contenedor principal */
.ocn-container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Secciones */
.ocn-section { padding: 100px 0; }
.ocn-section-sm { padding: 64px 0; }

/* Tag / etiqueta de sección */
.ocn-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--ocn-font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ocn-seafoam);
  background: rgba(26, 181, 168, 0.10);
  padding: 5px 14px;
  border-radius: 40px;
  margin-bottom: 18px;
}

.ocn-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ocn-seafoam);
  flex-shrink: 0;
}

/* Botones globales */
.ocn-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ocn-font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 30px;
  border-radius: var(--ocn-radius-xl);
  transition: var(--ocn-transition);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.ocn-btn-primary {
  background: var(--ocn-coral);
  color: var(--ocn-white);
  box-shadow: 0 4px 20px rgba(232, 92, 46, 0.35);
}

.ocn-btn-primary:hover {
  background: #d44d22;
  color: var(--ocn-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(232, 92, 46, 0.45);
}

.ocn-btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: var(--ocn-white);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
}

.ocn-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.20);
  color: var(--ocn-white);
  transform: translateY(-2px);
}

.ocn-btn-outline {
  background: transparent;
  color: var(--ocn-ocean);
  border: 1.5px solid var(--ocn-ocean);
}

.ocn-btn-outline:hover {
  background: var(--ocn-ocean);
  color: var(--ocn-white);
  transform: translateY(-2px);
}

.ocn-btn-teal {
  background: var(--ocn-teal);
  color: var(--ocn-white);
  box-shadow: 0 4px 20px rgba(14, 140, 140, 0.30);
}

.ocn-btn-teal:hover {
  background: #0a7070;
  color: var(--ocn-white);
  transform: translateY(-2px);
}

/* ── ANIMACIONES DE SCROLL ────────────────────────────────── */

/* Fade up — clase base */
.ocn-fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.70s ease, transform 0.70s ease;
}

.ocn-fade-up.ocn-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Delays escalonados */
.ocn-delay-1 { transition-delay: 0.10s; }
.ocn-delay-2 { transition-delay: 0.20s; }
.ocn-delay-3 { transition-delay: 0.30s; }
.ocn-delay-4 { transition-delay: 0.40s; }
.ocn-delay-5 { transition-delay: 0.50s; }

/* Fade lateral */
.ocn-fade-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.70s ease, transform 0.70s ease;
}

.ocn-fade-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.70s ease, transform 0.70s ease;
}

.ocn-fade-left.ocn-visible,
.ocn-fade-right.ocn-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale in */
.ocn-scale-in {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.ocn-scale-in.ocn-visible {
  opacity: 1;
  transform: scale(1);
}

/* ── CARDS ────────────────────────────────────────────────── */
.ocn-card {
  background: var(--ocn-white);
  border-radius: var(--ocn-radius-lg);
  border: 1px solid var(--ocn-border);
  overflow: hidden;
  transition: var(--ocn-transition);
}

.ocn-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--ocn-shadow-pop);
  border-color: transparent;
}

/* ── WAVE SEPARADOR SVG ───────────────────────────────────── */
.ocn-wave {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.ocn-wave svg {
  display: block;
  width: 100%;
}

/* ── CHATBOT FAB (posición fija global) ───────────────────── */
#ocn-chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9500;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ocn-teal) 0%, var(--ocn-ocean) 100%);
  color: var(--ocn-white);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 6px 28px rgba(14, 140, 140, 0.45);
  transition: var(--ocn-transition);
}

#ocn-chat-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 36px rgba(14, 140, 140, 0.55);
}

#ocn-chat-fab .ocn-chat-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--ocn-coral);
  color: var(--ocn-white);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ocn-cream);
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .ocn-nav-menu,
  .ocn-lang-switcher,
  .ocn-nav-cta {
    display: none;
  }

  .ocn-hamburger {
    display: flex;
  }

  .ocn-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 768px) {
  .ocn-section { padding: 72px 0; }
  .ocn-section-sm { padding: 48px 0; }

  .ocn-container {
    padding: 0 20px;
  }

  .ocn-footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .ocn-footer-brand p {
    max-width: 100%;
  }

  #ocn-chat-fab {
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .ocn-footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ── ELEMENTOR — AJUSTES DE INTEGRACIÓN ───────────────────── */

/* Eliminar margen superior en páginas con header fijo */
.elementor-page .elementor-section:first-child,
.elementor-page .e-con:first-child {
  margin-top: 0;
}

/* Asegurar que las secciones de Elementor no tengan padding extra no deseado */
.elementor-section.elementor-section-full_width {
  overflow: hidden;
}

/* Widget HTML de Elementor — contenedor limpio */
.elementor-widget-html .elementor-widget-container {
  overflow: visible;
}

/* Quitar outline azul de Elementor en edit mode para secciones con fondo oscuro */
body.elementor-editor-active .ocn-header {
  position: relative !important;
}
