
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;600;700&family=Montserrat:wght@400;600;700&display=swap');

:root {
  --primary: #0F4C81;
  --secondary: #00A7C1;
  --accent: #FF6F61;
  --dark: #2A2A2A;
  --light: #F7F7F7;
  --gray: #eceff1;
  --font-body: 'Lato', sans-serif;
  --font-heading: 'Montserrat', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background-color: var(--light);
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.header {
  background-color: var(--light);
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 30;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.header-logo img {
  height: 40px;
  width: auto;
}
.header-nav {
  display: flex;
  gap: 1.5rem;
}
.header-nav a {
  font-weight: 500;
  color: var(--dark);
  transition: color 0.2s;
}
.header-nav a:hover { color: var(--primary); }

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 60%, var(--secondary) 100%);
  color: #fff;
  padding: 4rem 2rem;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero p {
  max-width: 600px;
  font-size: 1.15rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.85);
}
.hero .cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.8rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s;
}
.hero .cta:hover { background: #e85a50; }

/* Content container */
.container { max-width: 1100px; margin: 0 auto; padding: 2rem; }

/* Post section */
.posts-section { margin-top: 4rem; }
.posts-section h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}
.post-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.post-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}
.post-card .post-content { padding: 1rem; display:flex; flex-direction: column; height: 100%; }
.post-card .category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.post-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  flex-grow: 0;
}
.post-card p { color: var(--dark); font-size: 0.95rem; margin-bottom: auto; }
.post-card a.read-more {
  margin-top: 1rem;
  color: var(--accent);
  font-weight: 600;
}

/* Contact page */
.contact-hero {
  padding: 4rem 2rem;
  background-color: var(--light);
  position: relative;
  overflow: hidden;
}

/* ------------------------------------------------------------------ */
/* Navigation active pill                                           */
/* Add a soft pill background to the currently active navigation    */
/* link. The active state is applied via the aria-current="page"    */
/* attribute or via the .active class.                              */
.header-nav a[aria-current="page"], .header-nav a.active {
  background-color: rgba(15, 76, 129, 0.1);
  border-radius: 9999px;
  padding: 0.4rem 0.8rem;
  font-weight: 600;
  color: var(--primary);
}
.header-nav a[aria-current="page"]:hover, .header-nav a.active:hover {
  background-color: rgba(15, 76, 129, 0.15);
}

/* ====== Eclosión blog improvements ====== */
/*
 * This block adds improved typography and layout for blog posts and
 * related content. Headings use the brand colours and Montserrat
 * font for hierarchy, while body text remains in Lato. Images in
 * posts (memes at the top and infograms at the end) are floated
 * alongside the text at a consistent width using CSS variables. On
 * smaller screens, they expand to full width for readability.
 */

:root {
  /* Width of post visuals: clamp between 240px and 420px (~38% of container) */
  --post-visual-w: clamp(240px, 38%, 420px);
  --post-visual-gap: 1.25rem;
  --post-visual-radius: 10px;
  --post-visual-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

/* Balanced headings */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
  color: var(--primary);
  text-wrap: balance;
}

/* Drop cap: apply the class .dropcap to <article> to enable */
article.dropcap p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--primary);
  font-size: 3.2rem;
  line-height: 0.9;
  margin: 0.1rem 0.4rem 0 0;
}
article.dropcap p:first-of-type {
  text-indent: 0;
}
@media (max-width: 480px) {
  article.dropcap p:first-of-type::first-letter {
    float: none;
    font-size: inherit;
    font-weight: inherit;
    margin: 0;
  }
}

/* Containers for post visuals (meme and infogram) */
article .post-image,
article .post-infographic {
  width: var(--post-visual-w);
  max-width: var(--post-visual-w);
  box-sizing: border-box;
}
article .post-image {
  float: right;
  margin: 0 0 1rem var(--post-visual-gap);
  shape-outside: margin-box;
}
article .post-infographic {
  float: left;
  margin: 0 var(--post-visual-gap) 1rem 0;
  shape-outside: margin-box;
}
article .post-image img,
article .post-infographic img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--post-visual-radius);
  box-shadow: var(--post-visual-shadow);
}
@media (max-width: 768px) {
  article .post-image,
  article .post-infographic {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 1rem 0;
  }
}

/* Related posts section at bottom of articles */
.related-posts {
  margin-top: 3rem;
}
.related-posts h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--primary);
}
.related-posts .posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.related-posts .post-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.related-posts .post-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}
.related-posts .post-card .post-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.related-posts .post-card .category {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.related-posts .post-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  flex-grow: 0;
}
.related-posts .post-card p {
  color: var(--dark);
  font-size: 0.85rem;
  margin-bottom: auto;
}
.related-posts .post-card a.read-more {
  margin-top: 0.5rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
}
.contact-hero h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.contact-hero p { font-size: 1.15rem; color: var(--dark); }
.contact-shape {
  position: absolute;
  top: -100px;
  right: -50px;
  width: 500px;
  height: 500px;
  background: var(--accent);
  border-radius: 50% 50% 40% 60% / 60% 40% 50% 50%;
  opacity: 0.25;
  z-index: -1;
}
.contact-shape2 {
  position: absolute;
  top: -50px;
  right: 150px;
  width: 450px;
  height: 450px;
  background: var(--secondary);
  border-radius: 60% 40% 70% 30% / 30% 70% 40% 60%;
  opacity: 0.3;
  z-index: -2;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}
.contact-info {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  padding: 2rem;
}
.contact-info h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}
.contact-info .info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.contact-info .info-item svg { width: 20px; height: 20px; fill: var(--accent); }

.contact-form {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  padding: 2rem;
}
.contact-form h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}
.contact-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.contact-form label { font-weight: 600; font-size: 0.95rem; color: var(--dark); }
.contact-form input,
.contact-form textarea {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
  font-size: 0.95rem;
}
.contact-form textarea { resize: vertical; height: 120px; }
.contact-form .notice {
  font-size: 0.8rem;
  color: var(--dark);
  margin-bottom: 1rem;
}
.contact-form button {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 0.8rem 1.6rem;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.contact-form button:hover { background: #0c3d69; }

/* Small hero used on interior pages like Nosotros */
.hero-small {
  background: var(--primary);
  color: #fff;
  padding: 3rem 2rem;
  text-align: center;
}
.hero-small h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.hero-small p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
}

/* Brand summary section on home */
.brand-summary {
  padding: 4rem 2rem;
  background-color: var(--light);
  color: var(--dark);
  text-align: center;
}
.brand-summary h2 {
  font-family: var(--font-heading);
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 1rem;
}
.brand-summary p {
  max-width: 800px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  line-height: 1.6;
}
.principles-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-bottom: 3rem;
}
.principle-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.principle-item svg {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  color: var(--secondary);
}
.principle-item p {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}
.mv-cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.mv-card {
  color: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.mv-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.mv-card p {
  font-size: 1rem;
  line-height: 1.5;
}
.mv-card.mission { background-color: var(--accent); }
.mv-card.vision { background-color: var(--secondary); }
.mv-card.mantra { background-color: var(--primary); }
/* Modal */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
  width: 90%;
}
.modal h3 { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 0.5rem; }
.modal p { font-size: 0.95rem; margin-bottom: 1rem; color: var(--dark); }
.modal button {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
}

/* Footer */
.footer {
  background: var(--primary);
  color: #fff;
  padding: 2rem;
  margin-top: 4rem;
  text-align: center;
}
.footer p { font-size: 0.9rem; margin: 0; }

@media (max-width: 600px) {
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
}

/* Toolbar to filter and sort posts on the index page */
.posts-toolbar {
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.posts-toolbar label {
  margin-right: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.posts-toolbar select {
  padding: 0.35rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text, #333);
}

/* Figure used to display infographic images at the start of posts */
.post-image {
  margin-bottom: 1.5rem;
}
.post-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}
