:root {
    --accent-primary: #059669;
    --accent-secondary: #10b981;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --border-color: #e2e8f0;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

body.cookie-lock {
    overflow: hidden;
}

.cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
    display: none;
}

.cookie-overlay.active {
    display: block;
}

.cookie-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 600px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    padding: 2.5rem;
    border-radius: 16px;
    z-index: 9999;
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    display: none;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.active {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0.8) 70%, transparent 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
}

.logo img {
  height: 45px;
  transition: transform 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem; /* Reduced gap slightly to fit buttons nicely */
  align-items: center;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem; /* Made text smaller */
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.3s ease;
  position: relative;
}

nav a:hover {
  color: var(--text-primary);
}

nav a:not(.nav-btn)::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-primary);
  transition: width 0.3s ease;
}

nav a:not(.nav-btn):hover::after {
  width: 100%;
}

.portal-nav-divider {
  width: 1px;
  height: 20px;
  background-color: var(--border-color);
  margin: 0 0.5rem;
}

.nav-btn {
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  display: inline-block;
}

.nav-btn-ai {
  background-color: rgba(5, 150, 105, 0.1);
  color: var(--accent-primary) !important;
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.nav-btn-ai:hover {
  background-color: var(--accent-primary);
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.2);
}

.nav-btn-pfm {
  background-color: #0f172a;
  color: white !important;
  border: 1px solid #0f172a;
}

.nav-btn-pfm:hover {
  background-color: #1e293b;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 3rem;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-secondary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: rgba(5, 150, 105, 0.1);
    color: var(--accent-primary);
}

.modal-body h3 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.modal-body p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.modal-image-container {
    width: 100%;
    text-align: center;
    margin-top: 2rem;
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
}

.modal-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Base Styles */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch; /* Change to stretch to sync heights */
  text-align: left;
  padding: 10rem 5% 5rem 5%;
  gap: 4rem;
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  color: var(--accent-primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(5, 150, 105, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  background: rgba(5, 150, 105, 0.05);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-primary, .btn-secondary {
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: white;
  border: 1px solid var(--accent-primary);
  box-shadow: 0 4px 6px rgba(5, 150, 105, 0.2);
}

.btn-primary:hover {
  background-color: #047857; /* Darker emerald */
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(5, 150, 105, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--text-primary);
  transform: translateY(-2px);
}

.hero-image {
  flex: 1;
  position: relative;
  display: flex;
}

.hero-image img {
  width: 100%;
  height: 100%; /* force height to match flex stretch */
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 20px 40px -10px rgba(5, 150, 105, 0.15);
}

.hero h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero h1 span {
  display: block;
  background: linear-gradient(135deg, #0f172a 0%, #475569 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.activities {
  padding: 8rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 4rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 0; /* Remove padding for full-bleed image */
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.card-img-container {
  width: 100%;
  height: 200px; /* Consistent height for all images */
  margin-bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0; /* Let background handle corners */
  overflow: hidden;
}

.card-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Make image fill the container perfectly */
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card:hover .card-img-container img {
  transform: scale(1.1);
}

.card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 30%; height: 3px;
  background: var(--accent-primary);
  opacity: 0;
  transition: opacity 0.3s ease, width 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  border-color: rgba(5, 150, 105, 0.2);
}

.card:hover h3 {
  color: var(--accent-primary);
}

.card:hover::after {
  opacity: 1;
  width: 100%;
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  flex-grow: 1; /* p empuja el botoncito read-more al final */
}

.card .read-more {
  margin-top: 1.5rem;
  font-weight: 600;
  color: var(--accent-primary);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.3s ease;
}

.card:hover .read-more {
  gap: 0.6rem;
}

/* Corporate Footer */
.corporate-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 5rem 5% 2rem 5%;
  margin-top: 5rem;
}

.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-brand .footer-logo {
  height: 40px;
  margin-bottom: 1.5rem;
  mix-blend-mode: multiply; /* Removes white background effectively on light surfaces */
  filter: contrast(1.1);
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 300px;
}

.footer-links h4 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-primary);
  background-color: transparent;
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-bottom p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: -150%;
    left: 5%;
    right: 5%;
    margin: 0 auto;
    max-width: 1000px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
    padding: 1.5rem 2.5rem;
    border-radius: 12px 12px 0 0;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: bottom 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-banner.active {
    bottom: 0;
}
.cookie-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    max-width: 700px;
}
.cookie-actions {
    display: flex;
    gap: 1rem;
}

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

.animate-up {
  opacity: 0;
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@media (max-width: 992px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  nav ul {
    display: none; 
  }
}

/* Tombstones Section */
.tombstones-section {
  background: var(--bg-primary);
  padding: 4rem 0;
}

.tombstone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.tombstone-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--accent-primary);
  border-radius: 10px;
  padding: 1.75rem 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 160px;
}

.tombstone-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(0,0,0,0.1);
  border-color: rgba(5, 150, 105, 0.4);
  border-top-color: var(--accent-primary);
}

.ts-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.ts-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.6rem;
  margin-bottom: 0.2rem;
}

.ts-desc {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.6;
  flex-grow: 1;
}
