/* ============================================================
   ciaonlinebuyntx.com — Best Online Casino Texas
   Mobile-first responsive design
   Color palette: Deep teal + Burnt orange + Cream/White
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal-deep: #0B4D5C;
  --teal-mid: #0E6B7F;
  --teal-light: #E8F4F6;
  --orange-burnt: #D4622B;
  --orange-hover: #B8511F;
  --cream: #FFF8F0;
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-500: #6B7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 780px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-card-hover: 0 4px 16px rgba(0,0,0,0.12);
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-mid); text-decoration: none; }
a:hover { color: var(--teal-deep); }

/* ---------- Container ---------- */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--teal-deep);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-logo {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.site-logo span { color: var(--orange-burnt); }

/* ---------- Hero / H1 Section ---------- */
.hero {
  background: var(--white);
  padding: 28px 0 12px;
  text-align: center;
}
.hero h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--teal-deep);
  letter-spacing: -0.5px;
  line-height: 1.25;
  margin-bottom: 10px;
}
.hero-subtitle {
  font-size: 0.95rem;
  color: var(--gray-500);
  max-width: 560px;
  margin: 0 auto 14px;
  line-height: 1.5;
}

/* ---------- Author Byline (under H1) ---------- */
.author-byline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}
.author-byline img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--teal-light);
}
.author-byline-text {
  font-size: 0.82rem;
  color: var(--gray-500);
}
.author-byline-text strong {
  color: var(--gray-700);
  font-weight: 600;
}

/* ---------- H2 Section ---------- */
.section-heading {
  padding: 16px 0 8px;
}
.section-heading h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal-deep);
  letter-spacing: -0.3px;
  line-height: 1.3;
  margin-bottom: 6px;
}

/* ---------- Toplist ---------- */
.toplist { padding: 0 0 20px; }

.casino-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: auto auto auto;
  gap: 0 12px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
  position: relative;
}
.casino-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

/* Position number badge */
.casino-rank {
  grid-row: 1 / 4;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 4px;
}
.casino-rank span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--teal-deep);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}
/* Gold for #1 */
.casino-card:first-child .casino-rank span {
  background: var(--orange-burnt);
}

/* Casino header row: logo + name */
.casino-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.casino-logo {
  width: 80px;
  height: 40px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.casino-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
}

/* Bonus text */
.casino-bonus {
  font-size: 1rem;
  font-weight: 700;
  color: var(--orange-burnt);
  margin-bottom: 8px;
  line-height: 1.3;
}

/* CTA button */
.casino-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange-burnt);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.2s ease, transform 0.1s ease;
  width: 100%;
  text-align: center;
}
.casino-cta:hover {
  background: var(--orange-hover);
  color: var(--white);
  transform: scale(1.02);
}

/* ---------- Content Sections ---------- */
.content-section {
  padding: 24px 0;
}
.content-section:nth-child(even) {
  background: var(--gray-50);
}
.content-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--teal-deep);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}
.content-section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 16px 0 8px;
}
.content-section p {
  font-size: 0.95rem;
  color: var(--gray-700);
  margin-bottom: 12px;
  line-height: 1.7;
}
.content-section ul, .content-section ol {
  padding-left: 20px;
  margin-bottom: 12px;
}
.content-section li {
  font-size: 0.95rem;
  color: var(--gray-700);
  margin-bottom: 6px;
  line-height: 1.6;
}

/* ---------- How We Rate Section ---------- */
.rating-criteria {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}
.rating-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 14px;
}
.rating-item h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--teal-deep);
  margin-bottom: 4px;
}
.rating-item p {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin: 0;
  line-height: 1.5;
}

/* ---------- FAQ ---------- */
.faq-section { padding: 24px 0; }
.faq-item {
  border-bottom: 1px solid var(--gray-200);
  padding: 14px 0;
}
.faq-item:first-child { border-top: 1px solid var(--gray-200); }
.faq-question {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-900);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-question::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--gray-500);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item.open .faq-question::after {
  content: '−';
}
.faq-answer {
  display: none;
  padding-top: 8px;
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.6;
}
.faq-item.open .faq-answer { display: block; }

/* ---------- Author Box (bottom of page) ---------- */
.author-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  gap: 16px;
  margin: 24px 0;
}
.author-box img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--teal-light);
}
.author-box-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 2px;
}
.author-box-text .author-role {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 6px;
}
.author-box-text p {
  font-size: 0.85rem;
  color: var(--gray-700);
  line-height: 1.55;
  margin: 0;
}

/* ---------- Trust Footer ---------- */
.trust-strip {
  background: var(--gray-100);
  padding: 16px 0;
  text-align: center;
}
.trust-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--gray-500);
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--teal-deep);
  color: var(--gray-300);
  padding: 24px 0;
  text-align: center;
}
.site-footer p {
  font-size: 0.78rem;
  line-height: 1.5;
  margin-bottom: 8px;
}
.site-footer a {
  color: var(--gray-300);
  text-decoration: underline;
}
.site-footer a:hover { color: var(--white); }
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.footer-links a {
  font-size: 0.78rem;
  text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }
.age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--orange-burnt);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--orange-burnt);
  margin: 0 auto 8px;
}
.responsible-gambling-text {
  font-size: 0.72rem;
  color: var(--gray-300);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ---------- Content Tables ---------- */
.content-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 12px 0;
  overflow-x: auto;
  display: block;
}
.content-table thead th {
  background: var(--teal-deep);
  color: var(--white);
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  font-size: 0.8rem;
  white-space: nowrap;
}
.content-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-700);
  vertical-align: top;
}
.content-table tbody tr:nth-child(even) { background: var(--gray-50); }
.content-table a {
  color: var(--orange-burnt);
  font-weight: 600;
}
.content-table a:hover { color: var(--orange-hover); }

/* ---------- Casino Reviews ---------- */
.casino-review {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}
.casino-review h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--teal-deep);
  margin-bottom: 10px;
}
.casino-review h3 a {
  color: var(--orange-burnt);
}
.casino-review h3 a:hover { color: var(--orange-hover); }
.casino-review blockquote {
  border-left: 3px solid var(--orange-burnt);
  padding: 10px 14px;
  margin: 12px 0;
  background: var(--cream);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.casino-review blockquote p {
  font-style: italic;
  color: var(--gray-700);
  margin: 0;
  font-size: 0.9rem;
}

/* ============================================================
   Desktop styles (768px+)
   ============================================================ */
@media (min-width: 768px) {
  .container { padding: 0 24px; }
  .hero { padding: 36px 0 16px; }
  .hero h1 { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }

  .casino-card {
    grid-template-columns: 44px 1fr 1fr auto;
    grid-template-rows: auto;
    align-items: center;
    padding: 16px 20px;
    gap: 0 16px;
  }
  .casino-rank { grid-row: 1; padding-top: 0; }
  .casino-rank span { width: 34px; height: 34px; font-size: 0.85rem; }
  .casino-header { margin-bottom: 0; }
  .casino-logo { width: 100px; height: 48px; }
  .casino-bonus { margin-bottom: 0; font-size: 0.95rem; text-align: center; }
  .casino-cta { width: auto; padding: 10px 28px; }

  .rating-criteria { grid-template-columns: 1fr 1fr; }

  .content-section h2 { font-size: 1.35rem; }
  .content-section p { font-size: 1rem; }

  .author-box img { width: 80px; height: 80px; }
}

@media (min-width: 1024px) {
  .hero h1 { font-size: 2.2rem; }
}

/* ============================================================
   Mobile Sticky Bar
   ============================================================ */
.mobile-sticky-bar {
  position: fixed;
  bottom: -80px;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--teal-deep);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.2);
  transition: bottom 0.3s ease;
}
.mobile-sticky-bar.visible { bottom: 0; }
.sticky-bar-text {
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  flex: 1;
}
.sticky-bar-cta {
  background: var(--orange-burnt);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.sticky-bar-cta:hover {
  background: var(--orange-hover);
  color: var(--white);
}

/* Hide sticky bar on desktop */
@media (min-width: 768px) {
  .mobile-sticky-bar { display: none; }
}

/* Extra bottom padding on mobile so sticky bar doesn't cover footer */
.site-footer { padding-bottom: 24px; transition: padding-bottom 0.3s ease; }
@media (max-width: 767px) {
  .site-footer { padding-bottom: 72px; }
}

/* ============================================================
   Exit Intent Popup
   ============================================================ */
.exit-popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.65);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.exit-popup {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  animation: popupSlideIn 0.3s ease;
}
@keyframes popupSlideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.exit-popup-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-500);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.exit-popup-close:hover { color: var(--gray-900); }
.exit-popup-badge {
  display: inline-block;
  background: var(--orange-burnt);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.exit-popup h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--teal-deep);
  margin-bottom: 8px;
}
.exit-popup p {
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.55;
  margin-bottom: 16px;
}
.exit-popup-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange-burnt);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.2s ease, transform 0.1s ease;
  margin-bottom: 10px;
}
.exit-popup-cta:hover {
  background: var(--orange-hover);
  color: var(--white);
  transform: scale(1.03);
}
.exit-popup-disclaimer {
  font-size: 0.7rem;
  color: var(--gray-500);
}
