/* ═══════════════════════════════════════════════════════════
   Consulado General de Panamá en Valencia — styles.css
   Paleta institucional: azul marino · rojo · blanco
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Reset & Variables ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --azul:         #003366;
  --azul-mid:     #0a4080;
  --azul-light:   #1a6abf;
  --azul-tint:    #e8f0f8;
  --rojo:         #C0392B;
  --rojo-light:   #d9534f;
  --rojo-tint:    #fdf0ee;
  --blanco:       #ffffff;
  --gris-bg:      #f0f4f8;
  --gris-card:    #f8fafc;
  --gris-borde:   #dde3ec;
  --texto:        #1a2535;
  --sutil:        #6b7a94;

  --radius-sm:    8px;
  --radius-md:    16px;
  --radius-lg:    24px;
  --shadow-sm:    0 2px 8px rgba(0, 51, 102, 0.08);
  --shadow-md:    0 8px 32px rgba(0, 51, 102, 0.14);
  --shadow-lg:    0 16px 56px rgba(0, 51, 102, 0.20);
  --transition:   0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--gris-bg);
  color: var(--texto);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ══════════════════════════════════
   ANIMATED BACKGROUND ORBS
══════════════════════════════════ */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: var(--azul);
  top: -200px;
  left: -150px;
  animation: drift1 20s ease-in-out infinite alternate;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--rojo);
  top: 40%;
  right: -200px;
  animation: drift2 25s ease-in-out infinite alternate;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: var(--azul-light);
  bottom: -100px;
  left: 30%;
  animation: drift3 18s ease-in-out infinite alternate;
}

@keyframes drift1 { to { transform: translate(60px, 80px) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-80px, -60px) scale(1.15); } }
@keyframes drift3 { to { transform: translate(-40px, 60px) scale(0.95); } }

/* ── Banda de bandera ── */
.flag-bar {
  display: flex;
  height: 5px;
  position: relative;
  z-index: 10;
}
.flag-bar span { flex: 1; }
.flag-bar .f1 { background: var(--azul); }
.flag-bar .f2 { background: #e8e8e8; }
.flag-bar .f3 { background: var(--rojo); }
.flag-bar .f4 { background: #e8e8e8; }

/* ══════════════════════════════════
   HEADER / HERO
══════════════════════════════════ */
header {
  position: relative;
  z-index: 5;
  background: linear-gradient(145deg, var(--azul) 0%, #00244d 50%, #001a38 100%);
  padding-bottom: 0;
  overflow: hidden;
}

/* Shimmer overlay */
header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(26, 106, 191, 0.55) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 85% 80%, rgba(192, 57, 43, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

/* Star-field dots */
header::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.6) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,255,255,0.3) 1px, transparent 1px);
  background-size: 120px 120px, 60px 60px;
  background-position: 0 0, 30px 30px;
  opacity: 0.08;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 32px 40px;
  display: flex;
  align-items: center;
  gap: 40px;
}

/* ── Logo en hero ── */
.header-emblem {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 6px 24px rgba(0,0,0,0.35));
  animation: floatEmblem 7s ease-in-out infinite;
}

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

/* ── Texto del hero ── */
.hero-text {
  color: var(--blanco);
  flex: 1;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 12px;
}

.hero-text h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 16px rgba(0,0,0,0.3);
  margin-bottom: 24px;
}

/* ── Status badge ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2.2s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(74,222,128,0.7);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.85); }
}

/* ── Wave separator ── */
.wave {
  position: relative;
  z-index: 2;
  line-height: 0;
}
.wave svg {
  width: 100%;
  height: 80px;
  display: block;
}

/* ══════════════════════════════════
   MAIN
══════════════════════════════════ */
main {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  z-index: 5;
}

/* ══════════════════════════════════
   LANG CARD
══════════════════════════════════ */
.lang-block {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.9);
  transition: transform var(--transition), box-shadow var(--transition);
  animation: slideUp 0.5s ease both;
}

.lang-block.en {
  animation-delay: 0.1s;
}

.lang-block:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Card header ── */
.lang-header {
  padding: 14px 28px;
  background: linear-gradient(90deg, var(--azul) 0%, var(--azul-mid) 100%);
  border-bottom: 3px solid rgba(255,255,255,0.12);
}

.lang-block.en .lang-header {
  background: linear-gradient(90deg, var(--rojo) 0%, #a93226 100%);
}

.lang-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
}

.lang-flag {
  font-size: 1.4rem;
  line-height: 1;
}

/* ── Card body ── */
.lang-block .body {
  padding: 36px 36px 32px;
}

.lang-block h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--azul);
  margin-bottom: 18px;
  line-height: 1.3;
}

.lang-block.en h2 {
  color: var(--rojo);
}

.lang-block p {
  font-size: 0.95rem;
  line-height: 1.9;
  color: #3d4f68;
  margin-bottom: 14px;
}

.lang-block p:last-of-type { margin-bottom: 0; }

.lang-block p strong {
  color: var(--texto);
  font-weight: 600;
}

/* ══════════════════════════════════
   CONTACT GRID
══════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 28px;
}

@media (max-width: 500px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-card {
  background: var(--gris-card);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--azul), var(--azul-light));
  opacity: 0;
  transition: opacity var(--transition);
}

.lang-block.en .contact-card::before {
  background: linear-gradient(90deg, var(--rojo), #e74c3c);
}

.contact-card:hover {
  background: var(--azul-tint);
  border-color: rgba(0, 51, 102, 0.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.contact-card:hover::before {
  opacity: 1;
}

.lang-block.en .contact-card:hover {
  background: var(--rojo-tint);
  border-color: rgba(192, 57, 43, 0.3);
}

.contact-card .cc-icon {
  font-size: 1.3rem;
  line-height: 1;
  margin-bottom: 4px;
}

.contact-card .cc-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sutil);
  font-weight: 600;
}

.contact-card .cc-value {
  font-size: 0.88rem;
  color: var(--azul);
  word-break: break-all;
  font-weight: 500;
  transition: color var(--transition);
}

.lang-block.en .contact-card .cc-value {
  color: var(--rojo);
}

.contact-card:hover .cc-value {
  color: var(--azul-mid);
  text-decoration: underline;
}

.lang-block.en .contact-card:hover .cc-value {
  color: var(--rojo-light);
}

/* ── Separador ── */
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
}

.divider span:not(.divider-text) {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gris-borde), transparent);
}

.divider-text {
  font-size: 0.68rem;
  color: var(--sutil);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
footer {
  background: linear-gradient(180deg, #fff 0%, #f0f4f8 100%);
  border-top: 1px solid var(--gris-borde);
  padding: 40px 24px 32px;
  position: relative;
  z-index: 5;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-divider-v {
  width: 1px;
  height: 80px;
  background: linear-gradient(180deg, transparent, var(--gris-borde), transparent);
}

.footer-logo {
  object-fit: contain;
  transition: transform var(--transition), filter var(--transition);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.10));
}

.footer-logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.18));
}

.footer-logo-consulate {
  height: 110px;
  width: auto;
}

.footer-logo-amp {
  height: 90px;
  width: auto;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--sutil);
  letter-spacing: 0.04em;
  text-align: center;
}

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 700px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
    padding: 40px 20px 32px;
    gap: 24px;
  }

  .header-emblem {
    width: 140px;
    height: 140px;
  }

  .hero-text h1 {
    font-size: 1.65rem;
  }

  .lang-block .body {
    padding: 24px 20px 22px;
  }

  .lang-block h2 {
    font-size: 1.4rem;
  }

  .lang-header {
    padding: 12px 20px;
  }

  .footer-divider-v {
    width: 80px;
    height: 1px;
  }
}
