
/* DenmarkProTips - Professional Sports Betting & Predictions Theme (Inspired by EagleFixed structure) */
:root {
  --bg-main: #EDE8E0;
  --bg-card: #FFFFFF;
  --bg-card-hover: #EFEAE2;
  --accent: #C60C30;
  --accent-hover: #A30927;
  --text-main: #1C1B1A;
  --text-muted: #6B6660;
  --border: #E4DED4;
  --gold: #B8862B;
  --red: #C60C30;
  --blue: #2F6FA8;

  /* DESIGN ELEMENTS defaults - overridden at runtime by saved admin settings */
  --design-button: var(--accent);
  --design-content-width: 1200px;
  --design-section-gap: 20px;
  --design-section-padding: 20px;
  --design-radius: 12px;
  --design-footer-spacing: 40px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: var(--design-content-width, 1200px);
  margin: 0 auto;
  padding: 0 16px;
}

/* Header & Navigation */
header {
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.5px;
}
.logo span { color: #fff; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-menu a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-menu a:hover, .nav-menu a.active {
  color: var(--accent);
}

.vip-badge {
  background: linear-gradient(135deg, #B8862B, #8A6220);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section — text on the left, large image card on the right */
.hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 0;
  padding: 70px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #FFFFFF 0%, #F5F3EE 70%);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero.has-hero-background {
  background-size: cover;
  background-position: center center;
}
.hero .container.hero-flex {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  text-align: left;
}
.hero-flex .hero-text {
  flex: 1 1 auto;
  max-width: 640px;
  margin: 0;
  text-align: left;
  text-shadow: 0 2px 12px rgba(0,0,0,0.8);
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.12;
  margin-bottom: 18px;
  font-weight: 900;
  color: #fff;
}
.hero p {
  color: #4A4640;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  max-width: 560px;
  margin: 0 0 25px 0;
}
.hero-upload-ctrl { justify-content: flex-start; }

/* Main Layout & Sidebar */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
  padding: 40px 0;
}
.main-layout > * { min-width: 0; }

@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #FFFFFF;
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border);
  }
  .nav-menu.active {
    display: flex;
  }
  .mobile-menu-btn {
    display: block;
  }
}

/* Cards & Tables */
.section-title {
  font-size: 1.4rem;
  margin-bottom: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--accent);
  padding-left: 10px;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--design-radius, 12px);
  padding: var(--design-section-padding, 20px);
  margin-bottom: var(--design-section-gap, 20px);
  transition: border-color .2s, box-shadow .2s;
}
.card:hover {
  border-color: rgba(198, 12, 48, .28);
  box-shadow: 0 3px 14px rgba(28, 27, 26, .06);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  text-align: left;
}
.card > table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

th, td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

th {
  background-color: rgba(198, 12, 48, 0.08);
  color: var(--accent);
  font-weight: 700;
}

tr:hover {
  background-color: var(--bg-card-hover);
}

.badge-won { color: #C60C30; font-weight: 700; background: rgba(198,12,48,0.1); padding: 4px 8px; border-radius: 4px; }
.badge-lost { color: #C60C30; font-weight: 700; background: rgba(198,12,48,0.1); padding: 4px 8px; border-radius: 4px; }
.badge-pending { color: #B8862B; font-weight: 700; background: rgba(245,158,11,0.1); padding: 4px 8px; border-radius: 4px; }

/* Sidebar Widgets */
.sidebar-widget {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
}

.sidebar-widget h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.sidebar-widget ul li {
  padding: 8px 0;
  border-bottom: 1px dashed rgba(28,27,26,0.07);
  font-size: 0.9rem;
}

.sidebar-widget ul li a:hover {
  color: var(--accent);
}

/* Footer */
footer {
  background-color: #FFFFFF;
  border-top: 1px solid var(--border);
  padding: var(--design-footer-spacing, 40px) 0 20px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
  text-align: left;
}

.footer-content h4 {
  color: #fff;
  margin-bottom: 15px;
}

/* Banner strips: independent frames */
.banner-wrap {
  padding-top: 30px;
}

.banner-grid.banner-columns {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: stretch;
}

.banner-grid:empty {
  display: none;
}

.banner-strip {
  display: grid;
  grid-template-columns: repeat(var(--per-row, 3), minmax(0, 1fr));
  gap: 14px;
  row-gap: 16px;
  align-items: stretch;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.banner-item {
  display: block;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 7;
  transition: transform 0.2s, border-color 0.2s;
}

.banner-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.banner-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Banner strips stay on one horizontal row on all screen sizes. */


/* Hero section layout & upload */
.hero-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  text-align: left;
}
.hero-flex .hero-text {
  flex: 1 1 auto;
  max-width: 640px;
}
.hero-flex .hero-image-wrap {
  flex: 0 0 560px;
  width: 560px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hero-img-box {
  width: 100%;
  height: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.hero-img-box img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  display: block;
}
.hero-upload-ctrl {
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.choose-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(198, 12, 48, 0.25);
}
.choose-file-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.choose-file-btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(198, 12, 48, 0.15);
  color: var(--accent);
  border: 1px solid var(--accent);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}
.choose-file-btn-sm:hover {
  background: var(--accent);
  color: #fff;
}

@media (max-width: 1150px) and (min-width: 901px) {
  .hero-flex { gap: 28px; }
  .hero-flex .hero-image-wrap {
    flex: 0 0 440px;
    width: 440px;
  }
  .hero-img-box { height: 300px; }
}

@media (max-width: 900px) {
  .hero-flex {
    flex-direction: column;
    text-align: center;
  }
  .hero-flex .hero-text {
    max-width: 100%;
    text-align: center;
  }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-flex .hero-image-wrap {
    flex: 1 1 auto;
    width: 100%;
    max-width: 560px;
  }
  .hero-img-box {
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .hero-upload-ctrl {
    justify-content: center;
  }
}

/* Section Header Bar with UP / DOWN controls */
.section-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.section-header-bar .section-title {
  margin-bottom: 0;
}
.section-order-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.order-btn {
  background: #F0ECE4;
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease-in-out;
  user-select: none;
}
.order-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}
.order-btn:active {
  transform: translateY(1px);
}

/* Main menu position controls (admin only) */
.menu-bar-order-controls {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
}
.menu-bar-order-controls .order-btn {
  padding: 4px 9px;
  font-size: 0.7rem;
}
#sec_offers .offers-header-bar {
  margin-bottom: 8px;
}

/* Custom Personal Banner Widget in Sidebar */
.custom-banner-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--design-radius, 12px);
  padding: 16px;
  margin-bottom: var(--design-section-gap, 20px);
}
.custom-banner-box {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  margin-bottom: 10px;
}
.custom-banner-box img {
  display: block;
  max-width: 100%;
}

/* Email Contact Widget in Sidebar */
.email-contact-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--design-radius, 12px);
  padding: var(--design-section-padding, 20px);
  margin-bottom: var(--design-section-gap, 20px);
}
.email-link-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(198, 12, 48, 0.1);
  border: 1px solid rgba(198, 12, 48, 0.3);
  padding: 12px 14px;
  border-radius: 8px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  word-break: break-all;
  margin-bottom: 15px;
  transition: all 0.2s;
}
.email-link-badge:hover {
  background: var(--accent);
  color: #fff;
}
.contact-mini-form input,
.contact-mini-form textarea {
  width: 100%;
  background: #F5F3EE;
  border: 1px solid var(--border);
  color: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.85rem;
  margin-bottom: 8px;
  font-family: inherit;
}
.contact-mini-form input:focus,
.contact-mini-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-mini-form textarea {
  resize: vertical;
  min-height: 60px;
}
.contact-submit-btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 9px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.contact-submit-btn:hover {
  background: var(--accent-hover);
}

/* VIP and Correct Score custom styling */
.badge-vip {
  background: linear-gradient(135deg, #B8862B, #8A6220);
  color: #fff;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}
.badge-correct-score {
  background: rgba(47, 111, 168, 0.15);
  color: #2F6FA8;
  border: 1px solid rgba(47, 111, 168, 0.4);
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}
.score-highlight {
  font-size: 1.1rem;
  font-weight: 800;
  color: #B8862B;
}

/* Blog post cards */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 10px;
}
.blog-card {
  background: #FAF8F4;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  transition: border-color 0.2s;
}
.blog-card:hover {
  border-color: var(--accent);
}
.blog-card h4 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.blog-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Toast notification */
.toast-notify {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #F0ECE4;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.toast-notify.show {
  transform: translateY(0);
  opacity: 1;
}

/* Monthly subscription offer section */
.subscription-section { text-align: center; }
.subscription-section .section-title { text-align: left; }
.subscription-subtitle { color: var(--text-muted); margin: -4px 0 18px; }
.subscription-offer-link { display: block; max-width: 900px; margin: 0 auto 20px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.subscription-offer-link img { display: block; width: 100%; max-height: 360px; object-fit: contain; background: #F5F3EE; }
.subscription-empty { color: var(--text-muted); padding: 18px 8px; }

/* Free Tips Drag & Drop Banner Strip */
.free-tips-banner-dropzone {
  transition: all 0.2s ease;
}

.free-tips-banner-dropzone.drag-over {
  outline: 2px dashed var(--accent) !important;
  outline-offset: 4px;
  background: rgba(198, 12, 48, 0.08) !important;
  border-radius: 12px;
}

.ft-size-btn {
  padding: 3px 10px;
  font-size: 0.8rem;
  background: #F0ECE4;
  border: 1px solid var(--border);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.ft-size-btn:hover {
  border-color: var(--accent);
}

.ft-size-btn.active {
  background: var(--accent);
  color: #F5F3EE;
  font-weight: 700;
  border-color: var(--accent);
}

.banner-item {
  position: relative;
}

.ftb-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(220, 38, 38, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 11px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
  line-height: 1;
  transition: transform 0.15s, background 0.15s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.ftb-remove-btn:hover {
  transform: scale(1.15);
  background: #C60C30;
}

body.is-admin .ftb-remove-btn {
  display: flex !important;
}

.ftb-link-btn {
  position: absolute;
  top: 6px;
  right: 34px;
  background: rgba(47, 111, 168, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 11px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
  line-height: 1;
  transition: transform 0.15s, background 0.15s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.ftb-link-btn:hover {
  transform: scale(1.15);
  background: #2F6FA8;
}

body.is-admin .ftb-link-btn {
  display: flex !important;
}

body.is-admin .ftb-admin-controls {
  display: flex !important;
}

.ft-action-btn {
  padding: 3px 10px;
  font-size: 0.8rem;
  background: #E8F0F7;
  border: 1px solid #2F6FA8;
  color: #2F6FA8;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ft-action-btn:hover {
  background: #2F6FA8;
  color: #fff;
}

.ftb-copy-btn {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(232, 240, 247, 0.9);
  color: #2F6FA8;
  border: 1px solid #2F6FA8;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 11px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
  line-height: 1;
  transition: transform 0.15s, background 0.15s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.ftb-copy-btn:hover {
  transform: scale(1.15);
  background: #2F6FA8;
  color: #fff;
}

body.is-admin .ftb-copy-btn {
  display: flex !important;
}

/* Custom Sidebar Content Blocks */
.custom-sidebar-content-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 25px;
  color: var(--text-color, #fff);
  overflow-wrap: anywhere;
}
.custom-sidebar-content-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: var(--accent);
  overflow-wrap: anywhere;
}
.custom-sidebar-content-card .custom-sidebar-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

/* ============================================================
   DESIGN ELEMENTS
   Settings are injected as CSS variables / body classes by app.js.
   Defaults above match the original theme, so nothing changes
   until an administrator saves a design.
   ============================================================ */
.sidebar-widget,
.custom-sidebar-content-card {
  border-radius: var(--design-radius, 12px);
  margin-bottom: var(--design-section-gap, 20px);
}

/* Button colour (does not touch secondary/danger buttons) */
.btn:not(.btn-secondary):not(.btn-danger),
.contact-submit-btn,
.home-offer-link,
.subscription-offer-link {
  background-color: var(--design-button, var(--accent));
}

/* ELEMENT VISIBILITY - hide only, content/data stays intact */
body.hide-custom-banner #sec_custom_banner { display: none !important; }
body.hide-email-contact #sec_email_contact { display: none !important; }
body.hide-visitors-counter .gt-visitors-counter { display: none !important; }

/* PAGE LAYOUT - SEPARATE SECTION (default look) */
body.design-mode-separate #sidebarSectionsContainer {
  border-top: 2px solid var(--border);
  padding-top: 18px;
  margin-top: 8px;
}

/* PAGE LAYOUT - FULL WIDTH (main expands, side elements move below) */
body.design-mode-fullwidth .main-layout {
  grid-template-columns: 1fr;
}
body.design-mode-fullwidth #sidebarSectionsContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--design-section-gap, 20px);
  border-top: 2px solid var(--border);
  padding-top: 20px;
  margin-top: 8px;
}
body.design-mode-fullwidth #sidebarSectionsContainer > * {
  margin-bottom: 0;
}

/* PAGE LAYOUT - INTEGRATED LAYOUT (no extra blocks/spacing) */
body.design-mode-integrated #sidebarSectionsContainer {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}
body.design-mode-integrated #sidebarSectionsContainer .custom-banner-card,
body.design-mode-integrated #sidebarSectionsContainer .email-contact-card,
body.design-mode-integrated #sidebarSectionsContainer .sidebar-widget,
body.design-mode-integrated #sidebarSectionsContainer .custom-sidebar-content-card,
body.design-mode-integrated #sidebarSectionsContainer .gt-visitors-counter {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 10px 0;
  margin-bottom: 8px;
}

@media (max-width: 900px) {
  body.design-mode-separate #sidebarSectionsContainer {
    padding-top: 14px;
  }
  body.design-mode-integrated #sidebarSectionsContainer .custom-banner-card,
  body.design-mode-integrated #sidebarSectionsContainer .email-contact-card,
  body.design-mode-integrated #sidebarSectionsContainer .sidebar-widget,
  body.design-mode-integrated #sidebarSectionsContainer .custom-sidebar-content-card {
    padding: 8px 0;
    margin-bottom: 6px;
  }
}

/* Slightly transparent white surfaces — lets the saved background image show through.
   Falls back to solid var(--bg-card) in browsers without color-mix(). */
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  .card,
  .sidebar-widget,
  .custom-banner-card,
  .email-contact-card,
  .custom-sidebar-content-card {
    background-color: color-mix(in srgb, var(--bg-card) 88%, transparent);
  }
}