/* ---------- Global Variables ---------- */
:root {
  /* Colors */
  --color-bg: #e7e7e3;
  --color-text: #333;
  --color-primary: #0f8ad9;
  --color-navbar: #525657;
  --color-light: #f5f5f5;
  --color-border: #ddd;
  --color-hover: #a6a6a6;

  /* Typography */
  --font-main: Arial, sans-serif;
  --font-size-small: 0.85rem;
  --font-size-medium: 1rem;
  --font-size-large: 1.8rem;

  /* Radii */
  --radius-small: 4px;
  --radius-medium: 8px;
  --radius-large: 10px;

  /* Shadows */
  --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-medium: 0 4px 8px rgba(0,0,0,0.15);
  --shadow-strong: 0 5px 15px rgba(0,0,0,0.4);

  /* Spacing */
  --spacing-small: 5px;
  --spacing-medium: 10px;
  --spacing-large: 20px;
}

/* ---------- Global ---------- */
html {
  font-size: 16px;
}
body {
  margin: 0;
  background: var(--color-bg);
  font-family: var(--font-main);
  color: var(--color-text);
}
h1 {
  color: var(--color-text);
}

/* ---------- Header & Logo ---------- */
.page-header {
  background: var(--color-bg);
  text-align: center;
  border-radius: var(--radius-large);
}
.logo {
  text-align: center;
  margin: 0.5% 0;
}
.logo img {
  width: 90%;
  height: auto;
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-light);
}

/* ---------- Navbar ---------- */
.navbar {
  display: flex;
  width: 88%;
  margin: 0 auto;
  flex-direction: column;
  background: var(--color-navbar);
  border-radius: var(--radius-large);
  position: relative;
  justify-content: center;
  align-items: center;
}
.menu-buttons {
  display: none;
  flex-direction: column;
  width: 100%;
}
.menu-buttons.show {
  display: flex;
}
.menu-buttons a {
  color: white;
  text-decoration: none;
  padding: var(--spacing-medium);
  border-top: 1px solid rgba(255,255,255,0.2);
}
.menu-buttons a:hover {
  background: var(--color-hover);
  transition: background 0.3s ease;
  border-radius: var(--radius-large);
}

/* Hamburger toggle button */
.menu-toggle {
  font-size: var(--font-size-large);
  color: white;
  cursor: pointer;
}

/* ---------- Search Bar ---------- */
.search-container {
  width: 90%;
  margin: var(--spacing-large) auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#search-box {
  width: 70%;
  margin-right: 10%;
  padding: var(--spacing-medium);
  font-size: var(--font-size-medium);
  border: 1px solid #ccc;
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-light);
}
#count-container {
  width: 20%;
  padding: var(--spacing-medium) 15px;
  font-size: var(--font-size-medium);
  text-align: center;
  border-radius: var(--radius-large);
  background: var(--color-primary);
  color: #fff;
}

/* ---------- Index & Contact Content ---------- */
.content-wrapper {
  background: var(--color-bg, #fafafa);
  padding: 2rem;
  margin: auto;
  max-width: 900px;
  border-radius: 8px;
  text-align: center;
}

.content-main {
  width: 100%;
}

/* === TYPOGRAPHY === */
.heading-h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.heading-h2 {
  font-size: 1.4rem;
  color: #444;
  margin-bottom: 1.5rem;
}

.heading-h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #333;
}

p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.text-highlight a {
  color: var(--color-primary, #0f8ad9);
  text-decoration: none;
  font-weight: 600;
}

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

/* === IMAGES === */
.image-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}
.image-medium {
  width: 25%;
  height: auto;
  max-width: 250px;
}
.image-small {
  height: 3rem;
  max-height: 150px;
  max-width: 200px;
  object-fit: contain;
  border: 2px solid #eee;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 6px;
  background: white;
  display: block;
}
.icon-small {
  width: 1.2rem;
  height: 1.2rem;
  vertical-align: middle;
  margin-right: 0.4rem;
}
.icon-medium {
  max-height: 2rem;
  max-width: 2rem;
  vertical-align: middle;
  margin-right: 0.4rem;
  object-fit: contain;
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 0px;
  background: white;
}

/* ============================================================ */

/* === Grid Layout === */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-large);
  justify-content: center;
}

.grid.single {
  justify-content: flex-start; /* for single card rows */
}

/* ============================================== */



/* === Cards === */
.card {
  background: var(--color-light);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-medium);
  padding: 1rem;
  flex: 1 1 250px; /* responsive width */
  max-width: 300px;
  text-align: left;
}
.card-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-medium);
  margin-bottom: var(--spacing-small);
}
.card-logo {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--color-primary);
  color: #fff;
  font-weight: bold;
  font-size: 1rem;
  border-radius: var(--radius-small);
  flex-shrink: 0;
}

/* === Card Links (reuse existing text-highlight style) === */
.list-links a {
  display: block;
  margin-bottom: var(--spacing-small);
  font-size: var(--font-size-medium);
}

/* ============================================================================ */

/* === LOGO GRID === */
.logo-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px 30px;
}

.logo-grid a {
  display: block;
}

/* ---------- Iframe ---------- */
  .iframe-container {
    width: 100%;
    overflow: hidden;
    position: relative;
  }
  .iframe-container iframe {
    width: 100%;
    height: 1600px;
    border: 0;
  }

/* --- Organizadores Section --- */
.organizadores {
  text-align: center;
  margin: 40px auto;
  padding: 0 20px;
  max-width: 70%;
}

.organizadores h2 {
  font-size: var(--font-size-large);
  margin-bottom: 10px;
}

.organizadores .intro {
  font-size: var(--font-size-medium);
  color: var(--color-text);
  margin-bottom: 30px;
}

/* --- Grid Layout --- */
.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 columns */
  grid-template-rows: repeat(4, auto);   /* 4 rows */
  gap: 30px;
}

.grid-item {
  text-align: center;
}

.grid-item img {
  max-width: 65%;
  max-height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border: 2px var(--color-border);
  border-radius: 8px;
  box-shadow: 0 4px 6px var(--shadow-medium);
  padding: 8px;
  background: var(--color-bg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid-item img:hover {
  transform: scale(1.10);
  box-shadow: 0 6px 10px var(--shadow-medium);
}

.grid-item p {
  margin-top: 10px;
  font-size: var(--font-size-medium);
  font-weight: 600;
  color: var(--color-text);
}

/* ---------- Table ---------- */
#content-container,
.table-header {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 auto;
}
table {
  width: 90%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: var(--spacing-large) auto;
  border-radius: var(--radius-large);
  overflow: hidden;
  box-shadow: var(--shadow-strong);
}
table a {
  text-decoration: none;
  color: inherit;
}
th {
  position: sticky;
  top: 0;
  border: 1px solid var(--color-border);
  padding: var(--spacing-medium) 7px;
  background: var(--color-primary);
  color: #fff;
  text-transform: uppercase;
  box-shadow: var(--shadow-strong);
}
td {
  border: 1px solid var(--color-border);
  padding: var(--spacing-medium) 7px;
  white-space: nowrap;
}
th:nth-child(1), td:nth-child(1) { width: 1%; text-align: center; }
th:nth-child(2), td:nth-child(2) { width: 14%; text-align: center; }
th:nth-child(3), td:nth-child(3) { width: 12%; text-align: center; }
th:nth-child(4), td:nth-child(4) { width: 72%; text-align: left; }
td.indicator-cell {
  width: 8px; /* adjust narrow width */
  padding: 0; /* no extra space */
}
td.fecha-cell {
  font-size: var(--font-size-medium);
  font-weight: bold;
  text-align: center; /* keep if needed */
}
td.poster-cell {
  text-align: center;
  vertical-align: middle;
  padding: 4px;
}
.poster-img {
  width: 80px;
  height: 100px;
  object-fit: contain;
  border: 2px solid #fff;
  background: #fff;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  border-radius: var(--radius-small);
  display: block;
  margin: auto;
}
.event-info {
  display: flex;
  flex-direction: column;
}
.event-info .carrera {
  font-size: var(--font-size-medium);
  font-weight: bold;
  margin-bottom: 4px;
  padding: 6px 8px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
}
.event-info .localizacion {
  font-size: var(--font-size-medium);
  color: #555;
  padding: 6px 8px;
}
tr { background: #fff; }
tr:hover { filter: brightness(85%); }

/* Month Colors */
.indicator-cell[data-month="Ene"] { background: #ffb6c1; }  /* light pink */
.indicator-cell[data-month="Feb"] { background: #add8e6; }  /* light blue */
.indicator-cell[data-month="Mar"] { background: #98fb98; }  /* pale green */
.indicator-cell[data-month="Abr"] { background: #ffdaba; }  /* peach */
.indicator-cell[data-month="May"] { background: #b0e0e6; }  /* powder blue */
.indicator-cell[data-month="Jun"] { background: #ffffe0; }  /* light yellow */
.indicator-cell[data-month="Jul"] { background: #d8bfd8; }  /* thistle */
.indicator-cell[data-month="Ago"] { background: #ffb6c1; }  /* light pink */
.indicator-cell[data-month="Sep"] { background: #e0ffff; }  /* light cyan */
.indicator-cell[data-month="Oct"] { background: #ffebcd; }  /* blanched almond */
.indicator-cell[data-month="Nov"] { background: #add8e6; }  /* light blue */
.indicator-cell[data-month="Dic"] { background: #98fb98; }  /* pale green */

/* ---------- Footer ---------- */
footer {
  background: var(--color-light);
  padding: var(--spacing-large) 0;
  width: 100%;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(0,0,0,0.05);
  font-family: var(--font-main);
}
footer .footer-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--spacing-medium);
}
footer .social-media-sharing {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: var(--spacing-small);
  flex-wrap: wrap;
  font-weight: bold;
  color: var(--color-text);
}
footer .social-media-sharing span {
  margin-right: var(--spacing-small);
}
footer .social-media-sharing a img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: transform 0.3s, box-shadow 0.3s;
}
footer .social-media-sharing a img:hover {
  transform: scale(1.2);
  box-shadow: var(--shadow-medium);
}
footer .footer-info small {
  font-size: var(--font-size-small);
  color: #555;
  display: block;
  margin-top: var(--spacing-small);
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  html {
    font-size: 12px; /* mobile */
  }

  table, thead, tbody, th, td, tr {
    table-layout: fixed;
    width: 90%;
    margin: 0 auto;
  }

  th, td {
    padding: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    text-align: left;
  }

  td.poster-cell img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: auto;
  }

  .event-info .carrera {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .navbar {
    margin: 0 auto;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .menu-buttons {
    display: none;
    flex-direction: column;
    width: 90%;
    margin: 0 auto;
    background: var(--color-navbar);
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    padding: var(--spacing-medium);
    border-radius: 0 0 var(--radius-large) var(--radius-large);
    box-shadow: var(--shadow-light);
    z-index: 200;
  }

  .menu-buttons.show {
    display: flex;
  }

  .navbar .menu-buttons a {
    text-align: center;
    margin: 5px 0;
    font-size: var(--font-size-medium);
  }
}

/* @media (min-width: 601px) {
  .menu-toggle {
    display: none;
  }

  .menu-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
  }

  .navbar {
    flex-direction: row;
    justify-content: space-between;
    padding: var(--spacing-small) 20px;
  }

  .menu-buttons a {
    margin: 0 10px;
    border-top: none;
    font-size: var(--font-size-medium);
  }
} */
