/* =====================================================
   CERTIFICATE HALL STYLES
   Enhanced styles for main hall and event halls
   ===================================================== */

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* Hall Container */
.hall-container {
  min-height: 100vh;
  background: url("assets/bg-login.jpg");
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-x: hidden;
  max-width: 100vw;
}

/* =====================================================
   MAIN HALL HEADER
   ===================================================== */

.hall-header {
  background: linear-gradient(135deg, #0a2918ee 0%, #061a10f5 50%, #030d07fa 100%);
  color: #ffffff;
  min-height: 10rem;
  padding: 30px 0;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4),
              inset 0 1px 0 rgba(100, 200, 140, 0.1);
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  border: 3px solid rgba(9, 78, 39, 0.5);
  border-bottom: 5px solid rgba(9, 78, 39, 0.65);
  backdrop-filter: blur(10px);
  margin-bottom: 0;
}

.header-content {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  max-width: 100%; /* Changed from 1400px to allow spreading to the edges */
  padding: 0 40px; /* Add edge padding */
  box-sizing: border-box;
  margin: 0 auto;
  gap: 10px; /* Reduced gap for navbar */
  text-align: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-self: start;
  /* padding-left removed since parent container now has padding */
}

.header-logo {
  max-width: 280px;
  max-height: 280px;
  object-fit: contain;
  display: block;
  transition: max-height 0.3s ease;
}

@media (max-width: 1200px) {
  .header-logo {
    max-height: 250px;
  }
}

@media (max-width: 900px) {
  .header-logo {
    max-height: 180px;
  }
}

@media (max-width: 600px) {
  .header-logo {
    max-height: 120px;
  }
  .header-content {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0 15px;
  }
  .logo-section {
    padding-left: 0;
    justify-content: center;
  }
  .hall-stats {
    padding-right: 0;
    justify-content: center;
  }
}

.header-text-navbar-main-hall {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  justify-self: center;
  width: 100%;
  max-width: 800px; /* Constrain width for centering */
}

.header-text-navbar-main-hall h1 {
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  margin: 0;
  padding: 0;
}

.header-text-navbar-main-hall h2 {
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 400;
  margin: 0;
  padding: 0;
  line-height: 1.4;
}
.hall-stats {
  display: flex;
  gap: 30px;
  justify-self: end;
  align-items: center;
  padding-right: 2rem;
  margin-left: auto;
  justify-content: flex-end;
}

.stat-item {
  text-align: center;
  display: none; /* Safely hide if still present in HTML */
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* =====================================================
   MAIN HALL CONTENT
   ===================================================== */

.hall-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px; /* Reduced top padding */
  flex: 1;
}

.hall-intro {
  text-align: center;
  margin-bottom: 15px; /* Reduced margin */
}

.hall-intro h3 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 15px;
  font-weight: 600;
}

.hall-intro p {
  font-size: 1.1rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* =====================================================
   EVENTS WALL - HANGING DIPLOMA FRAMES
   ===================================================== */

.events-wall {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 100px 85px; /* row-gap: chains need room; col-gap: 85px */
  padding: 20px 20px; /* Reduced top padding */
  max-width: 1000px;
  margin: 0 auto;
  margin-top: 2.5rem;
}

.diploma-frame {
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  transform-style: preserve-3d;
  width: 100%;
  /* Grid handles width */
}

@media (max-width: 900px) {
  .events-wall {
    grid-template-columns: 1fr;
    max-width: 600px;
    gap: 40px; /* Base gap */
  }
  
  /* Add extra top margin to all frames except the first one to account for the chain */
  .diploma-frame:not(:first-child) {
    margin-top: 50px;
  }
}

.diploma-frame:hover {
  transform: translateY(-5px) rotateY(2deg);
}

/* Hanging Chain */
.hanging-chain {
  position: absolute;
  top: -65px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
}

/* Graduated counter-translation: link 1 stays pinned, each link moves progressively more with the frame */
.diploma-frame:hover .chain-link:nth-child(1) { transform: translateY(5px); }   /* pinned to wall */
.diploma-frame:hover .chain-link:nth-child(2) { transform: translateY(3.5px); } /* partial */
.diploma-frame:hover .chain-link:nth-child(3) { transform: translateY(1.5px); } /* nearly free */
.diploma-frame:hover .chain-link:nth-child(4) { transform: translateY(0); }     /* moves with diploma */

.chain-link {
  width: 10px;
  height: 20px;
  background: linear-gradient(160deg, #ebebeb 0%, #b8b8b8 50%, #888888 100%);
  border-radius: 6px;
  margin-bottom: 3px;
  margin-top: 3px;
  box-shadow:
    1px 2px 4px rgba(0, 0, 0, 0.5),
    inset 2px 1px 3px rgba(255, 255, 255, 0.45),
    inset -1px -1px 2px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}

/* Last link looks like a mounting screw embedded in the frame */
.chain-link:last-child {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, #c8c8c8 55%, #787878 100%);
  border: 2px solid #909090;
  box-sizing: border-box;
  align-self: center;
  margin-bottom: 0;
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.6),
    inset 2px 2px 3px rgba(255, 255, 255, 0.55),
    inset -1px -1px 3px rgba(0, 0, 0, 0.4);
}

/* Frame Structure */
.frame-outer {
  background: linear-gradient(
    135deg,
    #243028 0%,   /* dark green-gray corner highlight */
    #141c18 20%,  /* deep green-black */
    #080e0a 50%,  /* near black center */
    #0f1712 80%,  /* dark pine */
    #1a2520 100%  /* slight green lift on opposite corner */
  );
  padding: 15px;
  border-radius: 8px;
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px rgba(80, 180, 120, 0.08),   /* subtle green inner highlight */
    inset 0 -2px 4px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(9, 78, 39, 0.3);              /* faint green outer ring */
  position: relative;
  overflow: hidden;
}

.frame-inner {
  background: #080e0a; /* Dark background to stop white bleeding */
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transform: translateZ(0); /* Forces WebKit/Blink to render an exact clipping mask, fixing border-radius bleed */
}

/* Event Thumbnail */
.event-thumbnail {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.event-thumbnail img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  padding: 10px;
}

.placeholder-thumbnail {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  width: 120px;
  max-width: 200px;
  border-radius: 5px;
  background: linear-gradient(0deg, #b17601 0%, #cb6811 100%);
  color: white;
}

/* Shared icon styles for consistency */
.placeholder-icon,
.empty-icon,
.empty-event-icon,
.event-icon-large {
  font-size: 4rem;
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-icon-large {
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.info-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.security-notice-icon {
  margin-right: 0.5rem;
}

/* Event Info Overlay */
.event-info-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.65) 60%, transparent 100%); /* Black shadow transition */
  color: white;
  padding: 30px 20px 20px;
  transform: translateY(100%); /* Changed to hide completely */
  transition: transform 0.3s ease;
}

.diploma-frame:hover .event-info-overlay {
  transform: translateY(0);
}

.event-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.event-description {
  font-size: 0.9rem;
  margin: 0 0 12px 0;
  opacity: 0.9;
  line-height: 1.4;
}

.certificate-count {
  display: flex;
  align-items: center;
  gap: 8px;
}

.count-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.count-label {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* Frame Glow Effect */
.frame-glow {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.35), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.diploma-frame:hover .frame-glow {
  opacity: 1;
}

/* =====================================================
   EVENT HALL STYLES
   ===================================================== */

.event-hall {
  background: url("assets/bg-login.jpg");
}

/* Event Header — UDLAP deep forest green */
.event-header {
  background: linear-gradient(135deg, #0a2918ee 0%, #061a10f5 50%, #030d07fa 100%);
  min-height: 11rem;
  color: #ffffff;
  padding: 30px 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.45),
              inset 0 1px 0 rgba(100, 200, 140, 0.12);
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  border: 3px solid rgba(9, 78, 39, 0.5);
  border-bottom: 4px solid rgba(9, 78, 39, 0.7);
  margin: 0px;
  backdrop-filter: blur(10px);
}

.nav-section {
  width: 100%;
  max-width: 100%; /* Changed from 1200px to stick back button to the edge */
  box-sizing: border-box;
  margin: 0;
  padding: 25px 40px 0; /* Add top and side padding */
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Better alignment since the breadcrumb is removed */
  margin-bottom: 20px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

.breadcrumb-link {
  color: #056d01;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-link:hover {
  color: #a96904;
}

.breadcrumb-separator {
  color: #bdc3c7;
}

.breadcrumb-current {
  color: #984900;
  font-weight: 500;
}

/* Event Hero */
.event-header-content {
  max-width: 1200px;
  max-height: 10rem;
  margin: 0 auto;
  padding: 0 20px;
}

.event-hero {
  display: flex;
  align-items: center;
  gap: 30px;
}

.event-icon {
  font-size: 4rem;
  background: linear-gradient(135deg, #1a5c36, #0e3d22);
  color: #d6f5e3;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(9, 78, 39, 0.4);
}

.event-details h1 {
  font-size: 2.5rem;
  color: #ffffff;
  margin-left: -7rem;
  font-weight: 700;
}

.event-details .event-description {
  font-size: 1.1rem;
  color: #322b2b;
  margin: 0 0 15px;
  line-height: 1.6;
  font-weight: 600;
}

.stat-badge {
  background: linear-gradient(135deg, #1a5c36, #0e3d22);
  color: #d6f5e3;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.9rem;
}

/* =====================================================
   CERTIFICATES WALL
   ===================================================== */

.certificates-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.certificates-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 50px 30px;
  padding: 20px 0;
}

.certificate-frame {
  position: relative;
  cursor: pointer;
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(30px);
}

.certificate-frame.entrance-animation {
  animation: certificateEntrance 0.6s ease forwards;
}

@keyframes certificateEntrance {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.certificate-frame:hover {
  transform: translateY(-8px) scale(1.02);
}

/* Certificate Frame Styling */
.cert-frame-outer {
  background: linear-gradient(145deg, #2c3e50, #34495e);
  padding: 12px;
  border-radius: 12px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
}

.artdeco-frame {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  cursor: pointer;

  border: 10px solid transparent;
  background:
    linear-gradient(white, white) padding-box,
    linear-gradient(
        135deg,
        #2c3e50,
        #34495e,
        #bdc3c7,
        #ecf0f1,
        #f39c12,
        #e67e22
      )
      border-box;
  box-shadow:
    0 0 0 2px #2c3e50,
    0 0 0 4px #f39c12,
    0 0 0 6px #2c3e50,
    0 0 0 8px #bdc3c7,
    0 0 0 10px #2c3e50,
    0 8px 25px rgba(44, 62, 80, 0.4),
    inset 0 0 0 3px rgba(243, 156, 18, 0.3);
}

.artdeco-frame:hover {
  transform: scale(1.05);
  box-shadow:
    0 0 0 2px #2c3e50,
    0 0 0 4px #f39c12,
    0 0 0 6px #2c3e50,
    0 0 0 8px #bdc3c7,
    0 0 0 10px #2c3e50,
    0 12px 35px rgba(44, 62, 80, 0.6),
    inset 0 0 0 3px rgba(243, 156, 18, 0.5);
}

.cert-frame-inner {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

/* Event-Specific Frame Colors */
.verano-stem-frame .cert-frame-outer {
  background: linear-gradient(145deg, #e7a83c, #c08e2b);
}

.docker-zth-frame .cert-frame-outer {
  background: linear-gradient(145deg, #3498db, #2980b9);
}

.various-frame .cert-frame-outer {
  background: linear-gradient(145deg, #9b59b6, #8e44ad);
}

/* Certificate Thumbnail */
.cert-thumbnail {
  height: 150px;
  position: relative;
  overflow: hidden;
}

.cert-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.certificate-frame:hover .cert-preview-img {
  transform: scale(1.05);
}

.cert-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: linear-gradient(135deg, #bdc3c7, #95a5a6);
  color: white;
}

.placeholder-cert-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.placeholder-text {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Certificate Info */
.cert-info-overlay {
  padding: 15px;
  background: white;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cert-recipient {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
  line-height: 1.2;
}

.cert-title {
  font-size: 0.9rem;
  color: #3498db;
  margin: 0;
  font-weight: 500;
}

.cert-description {
  font-size: 0.8rem;
  color: #666;
  margin: 0;
  line-height: 1.3;
}

.cert-formats {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.format-badge {
  background: #ecf0f1;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  color: #2c3e50;
}

/* Hanging System */
.cert-hanging {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

.hanging-wire {
  width: 2px;
  height: 20px;
  background: linear-gradient(to bottom, #7f8c8d, #95a5a6);
  margin: 0 auto;
}

.hanging-hook {
  width: 12px;
  height: 6px;
  background: #7f8c8d;
  border-radius: 0 0 6px 6px;
  margin: -2px auto 0;
}

/* Certificate Glow */
.cert-glow {
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  background: radial-gradient(circle, rgba(52, 152, 219, 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 12px;
}

.certificate-frame:hover .cert-glow {
  opacity: 1;
}

/* =====================================================
   EMPTY STATES
   ===================================================== */

.empty-hall,
.empty-event {
  text-align: center;
  padding: 80px 20px;
  color: #666;
}

.empty-icon,
.empty-event-icon {
  margin-bottom: 20px;
}

.empty-hall h3,
.empty-event h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #2c3e50;
}

.empty-hall p,
.empty-event p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* =====================================================
   FOOTER STYLES
   ===================================================== */

.hall-footer,
.event-footer {
  background: linear-gradient(135deg, #061a10 0%, #030d07 100%); /* Deep forest green matching headers */
  color: #d6f5e3; /* Fresh mint-green text */
  padding: 30px;
  margin-bottom: auto;
  border-top: 2px solid rgba(9, 78, 39, 0.4); /* Subtle green border */
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-links a {
  color: #a8d8b8; /* Soft green for links */
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-actions {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* =====================================================
   BUTTONS - Optimized with shared hover effects
   ===================================================== */

.btn-action,
.btn-secondary,
.btn-outline,
.back-btn,
.back-btn-modern {
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 800;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-action {
  background: linear-gradient(135deg, #094e27, #093a29);
  color: white;
}

.btn-action:hover {
  background: linear-gradient(135deg, #093a29, #024a10);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(9, 78, 39, 0.4);
}

.btn-contact {
  background: linear-gradient(135deg, #094e27 0%, #093a29 100%);
  color: #ffffff;
  max-height: 3.5rem;
  font-size: 1.1rem;
  border: 2px solid #ffffff;
  padding: 8px 22px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 12px;
  transition: all 0.4s ease;
  margin-left: 1rem;
  box-shadow: 0 4px 10px rgba(0, 41, 5, 0.3);
}

.btn-contact:hover {
  background: linear-gradient(135deg, #da7f0f 0%, #c16e03 100%);
  color: white;
  border-color: #c16e03;
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(218, 127, 15, 0.4);
}

.btn-directions {
  background: transparent;
  color: #ffffff;
  max-height: 3.5rem;
  font-size: 1.1rem;
  border: 2px solid #ffffff;
  padding: 8px 22px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 12px;
  transition: all 0.4s ease;
  margin-left: 0.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-directions:hover {
  background: linear-gradient(135deg, #da7f0f 0%, #c16e03 100%);
  color: white;
  border-color: #c16e03;
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(218, 127, 15, 0.4);
}

/* =====================================================
   MODAL STYLES
   ===================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  width: 90%;
  max-width: 500px;
  border-radius: 15px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  transform: translateY(20px);
  transition: all 0.3s ease;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  background: transparent;
  color: #0c4a25;
  width: 100%;
  padding: 25px 30px 15px;
  display: flex;
  margin-top: 0;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgba(9, 78, 39, 0.1);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.close-modal {
  background: none;
  border: none;
  color: #6c757d;
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s;
  margin-left: auto;
  flex-shrink: 0;
}

.close-modal:hover {
  transform: scale(1.1);
  color: #dc3545;
}

.modal-body {
  padding: 30px;
  background: #f8f9fa;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}

.contact-info-item:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contact-info-item i {
  font-size: 1.5rem;
  color: #094e27;
  margin-top: 3px;
  width: 30px;
  text-align: center;
}

.contact-info-item strong {
  display: block;
  color: #2c3e50;
  margin-bottom: 4px;
}

.contact-info-item p {
  margin: 0;
  color: #555;
  line-height: 1.4;
}

.contact-info-item a {
  color: #094e27;
  text-decoration: none;
  font-weight: 500;
}

.contact-info-item a:hover {
  text-decoration: underline;
}

/* Directions modal — wide 2-column layout */
.directions-modal-content {
  max-width: 860px !important;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.directions-modal-content .modal-body {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: flex-start;
  overflow-y: auto;
  padding: 24px;
  flex: 1;
}

.directions-steps-col {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center steps vertically */
  gap: 0;
}

.directions-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 48px; /* MUCHA mayor separación entre pasos */
}

.directions-steps li {
  color: #2c3e50;
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 18px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border: 2px solid #094e27; /* Borde de color en los 4 lados */
  counter-increment: step-counter;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.directions-steps li:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.directions-steps li::before {
  content: counter(step-counter);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #094e27;
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 10px;
  flex-shrink: 0;
  vertical-align: middle;
}

.directions-steps {
  counter-reset: step-counter;
}

.directions-steps li strong {
  color: #094e27;
}

.directions-map-col {
  flex: 1;
  min-width: 0;
}

.directions-map-col img {
  width: 100%;
  height: auto;
  max-height: 500px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  display: block;
  object-fit: contain;
}

/* Mobile: stack vertically with scroll */
@media (max-width: 640px) {
  .directions-modal-content .modal-body {
    flex-direction: column;
  }
  .directions-steps-col {
    flex: none;
    width: 100%;
  }
}

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background: #7f8c8d;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid #3498db;
  color: #3498db;
}

.btn-outline:hover {
  background: #3498db;
  color: white;
}

/* Back buttons with optimized styles */
.back-btn,
.back-btn-modern {
  border: 2px solid #d6f5e3;
  color: #d6f5e3;
  background: #1a3d24da; /* Deep forest green background */
  border-radius: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15); /* Added slight shadow to make it pop */
  /* margin-left removed to avoid breaking layout */
}

.back-btn:hover,
.back-btn-modern:hover {
  background: #093a29;
  color: white;
  transform: translateX(-5px);
  box-shadow: 0 4px 12px rgba(9, 58, 41, 0.3); /* Match shadow with hover state */
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 768px) {
  /* Main Hall Header - Mobile Fix */
  .header-content {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    padding: 0 15px;
  }

  .logo-section {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
    gap: 1rem;
    width: 100%;
  }

  .header-logo {
    max-width: 100px;
    max-height: 100px;
  }

  .header-text {
    align-items: center;
    text-align: center;
  }

  .header-text h1 {
    font-size: 1.8rem;
    text-align: center;
  }

  .header-text h2 {
    font-size: 1rem;
    text-align: center;
  }

  .hall-stats {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
    gap: 30px;
    width: 100%;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  .events-wall {
    grid-template-columns: 1fr;
    gap: 40px 20px;
  }

  .certificates-wall {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .event-hero {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .event-details h1 {
    font-size: 1.8rem;
    margin-left: 0;
    text-align: center;
  }

  .nav-section {
    flex-direction: column;
    gap: 15px;
  }

  .footer-content,
  .footer-actions {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  /* Event Header Mobile */
  .event-header-content {
    max-height: none;
  }

  .event-icon {
    width: 70px;
    height: 70px;
    font-size: 2.5rem;
  }
}

/* =====================================================
   EVENT HALL TECHNICAL CARD STYLES
   Moved from event_hall.html inline styles
   ===================================================== */

.technical-card {
  max-width: 900px;
  margin: 2rem auto;
  background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 2px solid #dee2e6;
}

.card-header {
  background: linear-gradient(
    135deg, 
    #0e3d22 0%, /* Deep forest green — matches navbar */
    #0a2918 50%, /* Dark pine */
    #042d17 100% /* Almost black green */
  );
  color: #ffffff; /* White text */
  padding: 2rem;
  text-align: center;
  position: relative;
  border-bottom: 3px solid rgba(26, 138, 74, 0.7); /* Green accent line */
  box-shadow: inset 0 1px 0 rgba(100, 200, 140, 0.1);
}

.card-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="white" opacity="0.03"/><circle cx="80" cy="40" r="1" fill="white" opacity="0.03"/><circle cx="40" cy="80" r="1" fill="white" opacity="0.03"/></svg>');
  border: 2px solid rgba(255, 255, 255, 0.03);
}

.card-title {
  font-size: 2.5rem;
  margin: 0;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.card-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  margin: 0.5rem 0 0 0;
  position: relative;
  z-index: 1;
}

.card-body {
  padding: 1rem;
  border: 3px ridge #cccccc;
}

.info-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.info-card {
  background: white;
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  flex: 1 1 300px;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.info-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 0.5rem;
}

.info-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.info-description {
  color: #718096;
  font-size: 0.9rem;
  line-height: 1.4;
}

.description-section {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
  margin-bottom: 2rem;
}

.description-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.description-text {
  color: #2d3748;
  line-height: 1.6;
  font-size: 1.1rem;
}

.back-section {
  display: flex;
  justify-content: center;
  padding-top: 1rem;
}

.security-notice {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 10px;
  padding: 1rem;
  margin-top: 1rem;
  text-align: center;
}

.security-notice-text {
  color: #c53030;
  font-size: 0.9rem;
  margin: 0;
}

@media (max-width: 480px) {
  /* Extra small screens - Main Hall Header */
  .hall-header {
    padding: 20px 0;
  }

  .header-content {
    padding: 0 10px;
  }

  .logo-section {
    gap: 0.75rem;
  }

  .header-logo {
    max-width: 80px;
    max-height: 80px;
  }

  .header-text h1 {
    font-size: 1.5rem;
  }

  .header-text h2 {
    font-size: 0.9rem;
  }

  .hall-stats {
    gap: 20px;
  }

  .stat-number {
    font-size: 1.3rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .hall-main,
  .certificates-main {
    padding: 30px 15px;
  }

  .hall-intro h3 {
    font-size: 1.3rem;
  }

  .hall-intro p {
    font-size: 0.95rem;
  }

  .events-wall,
  .certificates-wall {
    gap: 25px;
  }

  .diploma-frame,
  .certificate-frame {
    margin: 0 auto;
    max-width: 280px;
  }

  .event-details h1 {
    font-size: 1.5rem;
    margin-left: 0;
  }

  /* Technical card responsive */
  .technical-card {
    margin: 1rem;
    border-radius: 15px;
  }

  .card-header {
    padding: 1.5rem;
  }

  .card-title {
    font-size: 1.8rem;
  }

  .card-body {
    padding: 1.5rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* =====================================================
   EVENT HALL NAVBAR — FLEX LAYOUT (replaces position:absolute)
   ===================================================== */

.nav-section {
  justify-content: space-between;
}

.event-nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.event-nav-logo img {
  max-height: 90px;
  object-fit: contain;
}

.event-nav-spacer {
  /* Mirror the back-btn width so the logo stays truly centered */
  flex: 0 0 auto;
  min-width: 180px;
}

/* =====================================================
   RESPONSIVE — COMPREHENSIVE MEDIA QUERIES
   ===================================================== */

/* ── 768px — Tablet / Large phones ─────────────────── */
@media (max-width: 768px) {

  /* ─ Main Hall Navbar ─ */
  .hall-header {
    min-height: auto;
    padding: 20px 0;
  }

  .header-content {
    grid-template-columns: 1fr !important;
    justify-items: center;
    gap: 14px;
    padding: 0 20px !important;
  }

  .logo-section {
    justify-content: center;
  }

  .header-logo {
    max-width: 90px;
    max-height: 90px;
  }

  .header-text-navbar-main-hall h1 {
    font-size: 1.6rem;
    text-align: center;
  }

  .header-text-navbar-main-hall h2 {
    font-size: 0.95rem;
    text-align: center;
  }

  .hall-stats {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
  }

  .btn-contact,
  .btn-directions {
    font-size: 0.95rem;
    padding: 8px 16px;
    margin-left: 0;
  }

  /* ─ Event Hall Navbar ─ */
  .event-header {
    min-height: auto;
    padding: 14px 0;
  }

  .nav-section {
    padding: 0 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .event-nav-logo img {
    max-height: 64px;
  }

  .event-nav-spacer {
    min-width: 0;
    display: none; /* Not needed on mobile since logo auto-centers */
  }

  /* ─ Events grid (main hall) ─ */
  .events-wall {
    grid-template-columns: 1fr !important;
  }

  /* ─ Technical card ─ */
  .technical-card {
    margin: 0.5rem;
  }

  .card-title {
    font-size: 1.6rem;
  }

  .info-grid {
    flex-direction: column !important;
  }

  .info-card {
    flex: 1 1 100% !important;
  }

  /* ─ Footer ─ */
  .footer-content {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* ─ Security notice ─ */
  .security-notice-text {
    font-size: 0.85rem;
  }

  /* ─ Modal de Encuéntranos ─ */
  .directions-modal-content {
    width: 96% !important;
  }
}

/* ── 640px — Small phones ───────────────────────────── */
@media (max-width: 640px) {

  /* ─ Navbar event hall: stack vertically ─ */
  .nav-section {
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    gap: 8px;
  }

  .event-nav-logo img {
    max-height: 52px;
  }

  .back-btn {
    font-size: 0.85rem;
    padding: 8px 14px;
  }

  .back-text {
    display: inline; /* keep visible on phones */
  }

  /* ─ Main hall header: single column, centered ─ */
  .header-content {
    gap: 10px !important;
  }

  .header-text-navbar-main-hall h1 {
    font-size: 1.35rem;
  }

  /* ─ Card title ─ */
  .card-title {
    font-size: 1.3rem;
  }

  .card-subtitle {
    font-size: 1rem;
  }

  .card-body {
    padding: 0.75rem;
  }

  /* ─ Info cards stacked ─ */
  .info-value {
    font-size: 1.4rem;
  }

  /* ─ Custom blocks: single column (already in event_blocks.css but reinforce) ─ */
  .custom-blocks-grid {
    grid-template-columns: 1fr !important;
  }

  .custom-block:not(.timeline-block):not(.full-width) {
    grid-column: span 1 !important;
  }

  /* ─ Counter grid ─ */
  .counter-grid {
    grid-template-columns: 1fr !important;
  }

  /* ─ Back section button ─ */
  .back-section {
    padding: 0.5rem;
  }

  /* ─ Talleres: evitar overflow en tarjetas ─ */
  .deck-card-title {
    white-space: normal;
    word-break: break-word;
  }

  .deck-card-face {
    flex-wrap: wrap;
    gap: 10px;
  }

  .deck-body-info-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .deck-stage {
    max-width: 100%;
    overflow: hidden;
  }

  /* ─ back-btn-modern max-width ─ */
  .back-btn-modern {
    max-width: 90%;
  }

  /* ─ Modals ─ */
  .modal-content {
    width: 96% !important;
    max-width: 96% !important;
    border-radius: 10px;
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-header h2 {
    font-size: 1.1rem;
  }

  .modal-body {
    padding: 16px !important;
  }
}

/* ── 480px — Very small phones ──────────────────────── */
@media (max-width: 480px) {

  /* ─ Navbar ─ */
  .event-nav-logo img {
    max-height: 44px;
  }

  .back-btn {
    font-size: 0.8rem;
    padding: 7px 12px;
    border-radius: 12px;
  }

  .btn-contact,
  .btn-directions {
    font-size: 0.85rem;
    padding: 7px 12px;
  }

  /* ─ Technical card ─ */
  .card-title {
    font-size: 1.1rem;
  }

  .card-subtitle {
    font-size: 0.85rem;
  }

  /* ─ Info values ─ */
  .info-value {
    font-size: 1.2rem;
  }

  .info-title {
    font-size: 0.9rem;
  }

  /* ─ Talleres deck body info grid ─ */
  .deck-body-info-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* ─ Counter counters ─ */
  .counter-value {
    font-size: 1.8rem;
  }

  /* ─ Footer ─ */
  .hall-footer,
  .event-footer {
    padding: 20px 12px;
  }

  .footer-content p {
    font-size: 0.8rem;
  }

  /* ─ Security notice ─ */
  .security-notice {
    padding: 12px;
  }
}

