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

/* Stop Yahoo!Mail from automatically creating hyperlinks on certain keywords */
span.yshortcuts {
    color: #F4F1EE;
    background-color: none;
    border: none;
}
span.yshortcuts:hover,span.yshortcuts:active,span.yshortcuts:focus {
    color: #F4F1EE;
    background-color: none;
    border: none;
}
/* Stop Wekbit and Windows Phone changing the font size */
body {
    -webkit-text-size-adjust: none;
    -mais-text-size-adjust: none;
    margin: 0 !important;
    padding: 0;
}

body, #body_style {
    background: #F4F1EE;
    /* min-height: 1000px; */
    color: #002D24;
    font-size: 12px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
p {
    margin: 0;
    padding: 0;
    margin-bottom: 0;
}
h1,h2,h3,h4,h5,h6 {
    color: #18B466;
    line-height: 100%;
}
p,a,li,strong,span,div,i,h2,h3,body,#body_style,table,td,tr {
    font-family: "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
}

h1 {
    display: block;
    font-size: 27px;
    font-weight: 300;
    margin: 0 0;
    text-align: center;
}
h2 {
    display: block;
    font-size: 19px;
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 10px;
    margin-left: 0;
    text-align: center;
    padding-left: 45px;
    padding-right: 45px;
}

table {
    border-collapse: collapse;
    margin-left: auto;
    margin-right: auto;
}

th {
    font-weight: bold;
}

table td {
    border-collapse: collapse;
    padding: 5px;
    text-align: center;
    vertical-align: middle;
    font-size: 13px;
}
caption {
    font-size: 15px;
    line-height: 23px;
    padding: 5px 40px 5px 0px;
    margin: 0px;
    caption-side: top;
}

/* Mandated logo space */
table td.logo {
    padding: 50px;
}

/* right-align number columns, left-align text */
th.numbers, td.numbers {
    text-align: right;
}

th.text, td.text {
    text-align: left;
}

/* Zebra striping for tables */
tbody tr:nth-child(odd) {
    background-color: #FFF;
}

tbody tr:nth-child(even) {
    background-color: #F4F1EE;
}

/* Prevent zebra-striping for tables that are being used for layout */
tbody tr.layout {
    background-color: #F4F1EE;
}

a {
    text-decoration: none;
}
a:focus, a:hover {
    text-decoration: underline;
}
a.rss {
  background-color: #f26522; /* Classic RSS Orange */
  color: #fff;
  padding: 12px 20px;
  border-radius: 5px;
  font-weight: bold;
  display: inline-block;
  transition: background-color 0.3s ease;
}
a.rss:hover {
  background-color: #d85011;
}

header {
  background: #002D24;
  color: #fff;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
header img { height: 1.75rem; width: auto; object-fit: contain; flex-shrink: 0; }
header h1  { font-size: 1.4rem; font-weight: 600; color: #fff; }
h1.headline {
    font: bold 35px/40px "Open Sans", Helvetica, Arial, Tahoma, sans-serif;;
    margin: 50px 0 40px;
    text-transform: uppercase;
    text-align: center;
}


#filters {
  background: #fff;
  border-bottom: 1px solid #dde1e7;
  padding: 0.75rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

#filters label { font-size: 0.8rem; color: #555; display: flex; flex-direction: column; gap: 2px; }
#filters select {
  font-size: 0.85rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid #c0c7d0;
  border-radius: 4px;
  background: #fff;
  min-width: 160px;
}

#reset-filters {
  font-size: 0.8rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid #c0c7d0;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  align-self: flex-end;
}
#reset-filters:hover { background: #f0f2f5; }

#result-count {
  margin-left: auto;
  align-self: flex-end;
  font-size: 0.8rem;
  color: #666;
}

main {
  flex: 1;
  padding: 1.5rem 2rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

#promotions-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.promo-card {
  background: #fff;
  border: 1px solid #dde1e7;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.flag       { font-size: 1.4rem; line-height: 1; }
.country    { font-weight: 600; font-size: 0.9rem; }
.operator   { font-size: 0.8rem; color: #555; }

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-bonus   { background: #d4edda; color: #155724; }
.badge-balance { background: #cce5ff; color: #004085; }

.card-title {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.3;
}
.denom { font-size: 0.85rem; color: #444; }

.dates {
  font-size: 0.78rem;
  color: #666;
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}
.dates .arrow { color: #aaa; }

.promo-img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 4px;
}

.card-footer { margin-top: auto; }
.detail-link {
  font-size: 0.8rem;
  color: #0066cc;
  text-decoration: none;
}
.detail-link:hover { text-decoration: underline; }

/* Detail view */
#promotion-detail { display: none; }
.detail-view {
  background: #fff;
  border: 1px solid #dde1e7;
  border-radius: 8px;
  padding: 1.5rem 2rem;
  max-width: 760px;
}
.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: #0066cc;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.back-link:hover { text-decoration: underline; }
.detail-view h2 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.detail-view h3 { font-size: 1rem; margin: 0.75rem 0 0.4rem; }
.detail-view .dates { margin: 0.5rem 0; }
.detail-view .description {
  margin-top: 1rem;
  padding-left: 1.4rem;
  line-height: 1.7;
  font-size: 0.9rem;
}

.empty, .error { color: #666; font-size: 0.9rem; padding: 1rem 0; }
.error { color: #c0392b; }

/* Detail two-column layout */
.detail-headline { font-size: 1.2rem; margin: 0.75rem 0 1rem; }
.detail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}
@media (max-width: 700px) { .detail-columns { grid-template-columns: 1fr; } }
.promo-country { font-weight: 600; margin-bottom: 0.6rem; }
.detail-table { list-style: none; padding: 0; font-size: 0.85rem; }
.detail-table li {
  display: flex;
  gap: 0.5rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid #eee;
}
.detail-label { font-weight: 600; min-width: 130px; color: #444; flex-shrink: 0; }
.terms-list { list-style: disc; padding-left: 1.4rem; font-size: 0.85rem; line-height: 1.7; }
.promo-img-wrap { margin-top: 0.75rem; }

/* Language tabs */
.lang-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.lang-tab {
  padding: 0.3rem 0.8rem;
  border: 1px solid #c0c7d0;
  border-radius: 4px;
  background: #fff;
  font-size: 0.8rem;
  cursor: pointer;
}
.lang-tab.active { background: #003057; color: #fff; border-color: #003057; }
.lang-pane { display: none; }
.lang-pane.active { display: block; }

footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.75rem;
  background: #002D24;
  color: #fff;
  border-top: 1px solid #dde1e7;
}

@media (max-width: 600px) {
  header, #filters, main { padding-left: 1rem; padding-right: 1rem; }
  #filters select { min-width: 130px; }
}
