/* ============================================
   ТЁПЛОЕ МЕСТО — Custom CSS for Tilda
   ============================================ */

/* CSS Variables */
:root {
  --color-coral: #D96846;
  --color-coral-hover: #c55a3b;
  --color-olive: #596235;
  --color-dark-green: #2F3020;
  --color-lavender: #CDCBD6;
  --color-soft-white: #F7F7F5;
  --font-serif: 'Labor Union', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .t-title, .t-heading { font-family: var(--font-serif) !important; }
body, .t-text, .t-descr, .t-paragraph { font-family: var(--font-sans) !important; }

/* Buttons */
.t-btn-primary, .btn-coral {
  background-color: var(--color-coral) !important;
  color: white !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  padding: 16px 32px !important;
  border: none !important;
  transition: all 0.3s ease !important;
}
.t-btn-primary:hover, .btn-coral:hover {
  background-color: var(--color-coral-hover) !important;
  transform: translateY(-2px);
}

/* Cards */
.event-card, .t-card {
  background: white;
  border-radius: 16px;
  border: 1px solid rgba(205, 203, 214, 0.5);
  overflow: hidden;
  transition: all 0.3s ease;
}
.event-card:hover, .t-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Header */
.t-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(205, 203, 214, 0.5);
}

/* Utility */
.text-coral { color: var(--color-coral) !important; }
.text-olive { color: var(--color-olive) !important; }
.bg-coral { background-color: var(--color-coral) !important; }
.bg-dark-green { background-color: var(--color-dark-green) !important; }
.rounded-2xl { border-radius: 16px !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-soft-white); }
::-webkit-scrollbar-thumb { background: var(--color-lavender); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-coral); }

/* Sticky footer to bottom of viewport */
html, body {
  height: 100%;
}
#allrecords {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#allrecords > .t-rec:last-child {
  margin-top: auto;
}

/* Footer mobile fix */
@media (max-width: 768px) {
  .t-footer .t-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .t-footer .footer-top,
  .t-footer .footer-bottom {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 16px !important;
  }

  .t-footer .footer-brand {
    text-align: center !important;
  }

  .t-footer .footer-social {
    justify-content: center !important;
  }

  .t-footer .footer-legal {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
  }
}

/* Fix clipped HTML footer in T123 on mobile */
.t-rec,
.t123,
.t123__centeredContainer,
.t123__html {
  overflow: visible !important;
}

.t123__centeredContainer {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

@media (max-width: 768px) {
  .t-footer {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* T123 wrapper: prevent clipping of custom footer/header */
.t123,
.t123__centeredContainer,
.t123__html {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

/* Force last block (footer T123) to expand and not clip */
#allrecords .t-rec:last-child,
#allrecords .t-rec:last-child .t123,
#allrecords .t-rec:last-child .t123__centeredContainer,
#allrecords .t-rec:last-child .t123__html {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

#allrecords .t-rec:last-child .t123__html {
  display: block !important;
}
