/* ==========================================================================
   HoumTV - Cozy/Home IPTV Theme
   Fonts: Bitter (headings) + Karla (body)
   Prefix: hm-*
   ========================================================================== */

/* ---------- CSS Variables ---------- */
:root {
  --hm-bg: #ffffff;
  --hm-bg-alt: #f8f6f3;
  --hm-bg-dark: #32373c;
  --hm-primary: #40a2e3;
  --hm-primary-hover: #2e8fd0;
  --hm-accent: #ff6900;
  --hm-accent-hover: #e55d00;
  --hm-red: #cf2e2e;
  --hm-text: #32373c;
  --hm-text-light: #6b7280;
  --hm-text-inv: #ffffff;
  --hm-border: #e5e5e5;
  --hm-card-bg: #ffffff;
  --hm-card-shadow: 0 4px 24px rgba(0,0,0,.08);
  --hm-radius: 14px;
  --hm-nav-bg: #ffffff;
  --hm-footer-bg: #1e2328;
  --hm-footer-text: #cbd5e1;
  --hm-gradient: linear-gradient(135deg, #40a2e3 0%, #ff6900 100%);
  --hm-font-heading: 'Bitter', Georgia, serif;
  --hm-font-body: 'Karla', 'Segoe UI', sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--hm-font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--hm-text);
  background: var(--hm-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--hm-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--hm-primary-hover); }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--hm-font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--hm-text);
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }

/* ---------- Utility ---------- */
.hm-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.hm-section { padding: 80px 0; }
.hm-section--alt { background: var(--hm-bg-alt); }
.hm-section--dark { background: var(--hm-bg-dark); color: var(--hm-text-inv); }
.hm-section--dark h2, .hm-section--dark h3 { color: var(--hm-text-inv); }
.hm-text-center { text-align: center; }
.hm-text-muted { color: var(--hm-text-light); }
.hm-mb-8 { margin-bottom: 8px; }
.hm-mb-16 { margin-bottom: 16px; }
.hm-mb-24 { margin-bottom: 24px; }
.hm-mb-40 { margin-bottom: 40px; }
.hm-mb-60 { margin-bottom: 60px; }
.hm-badge {
  display: inline-block;
  background: var(--hm-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.hm-subheading {
  color: var(--hm-primary);
  font-family: var(--hm-font-body);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* ---------- Buttons ---------- */
.hm-btn {
  display: inline-block;
  font-family: var(--hm-font-body);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 32px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all .25s ease;
  text-align: center;
  line-height: 1.4;
}
.hm-btn--primary {
  background: var(--hm-primary);
  color: #fff;
}
.hm-btn--primary:hover {
  background: var(--hm-primary-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(64,162,227,.35);
}
.hm-btn--accent {
  background: var(--hm-accent);
  color: #fff;
}
.hm-btn--accent:hover {
  background: var(--hm-accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,105,0,.35);
}
.hm-btn--outline {
  background: transparent;
  color: var(--hm-primary);
  border: 2px solid var(--hm-primary);
}
.hm-btn--outline:hover {
  background: var(--hm-primary);
  color: #fff;
}
.hm-btn--white {
  background: #fff;
  color: var(--hm-primary);
}
.hm-btn--white:hover {
  background: var(--hm-bg-alt);
  color: var(--hm-primary-hover);
}
.hm-btn--block { display: block; width: 100%; }
.hm-btn--sm { font-size: 14px; padding: 10px 24px; }

/* ---------- Navigation ---------- */
.hm-nav {
  background: var(--hm-nav-bg);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  border-bottom: 1px solid var(--hm-border);
}
.hm-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
  height: 70px;
}
.hm-logo {
  font-family: var(--hm-font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--hm-text);
  text-decoration: none;
}
.hm-logo span { color: var(--hm-primary); }
.hm-nav__links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.hm-nav__links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--hm-text);
  transition: color .2s;
  white-space: nowrap;
}
.hm-nav__links a:hover { color: var(--hm-primary); }
.hm-nav__cta {
  background: var(--hm-accent);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 14px;
}
.hm-nav__cta:hover {
  background: var(--hm-accent-hover);
  color: #fff !important;
}
.hm-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.hm-hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--hm-text);
  border-radius: 2px;
  transition: .3s;
}

/* ---------- Hero ---------- */
.hm-hero {
  background: var(--hm-gradient);
  padding: 100px 0 80px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hm-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,160L48,144C96,128,192,96,288,101.3C384,107,480,149,576,165.3C672,181,768,171,864,149.3C960,128,1056,96,1152,96C1248,96,1344,128,1392,144L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom / cover;
}
.hm-hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 16px; position: relative; }
.hm-hero p { font-size: 18px; opacity: .95; max-width: 640px; margin: 0 auto 32px; position: relative; }
.hm-hero .hm-btn { position: relative; }

/* ---------- Stats Bar ---------- */
.hm-stats {
  background: var(--hm-bg-dark);
  padding: 40px 0;
}
.hm-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
  color: #fff;
}
.hm-stats__item strong {
  font-family: var(--hm-font-heading);
  font-size: 2rem;
  display: block;
  color: var(--hm-accent);
}
.hm-stats__item span { font-size: 14px; opacity: .8; }

/* ---------- Pricing Cards ---------- */
.hm-pricing__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.hm-pricing-card {
  background: var(--hm-card-bg);
  border-radius: var(--hm-radius);
  box-shadow: var(--hm-card-shadow);
  padding: 36px 28px;
  text-align: center;
  position: relative;
  transition: transform .25s, box-shadow .25s;
  border: 2px solid transparent;
}
.hm-pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,.12);
}
.hm-pricing-card--featured {
  border-color: var(--hm-accent);
}
.hm-pricing-card__name {
  font-family: var(--hm-font-heading);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.hm-pricing-card__price {
  font-family: var(--hm-font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--hm-primary);
  margin-bottom: 4px;
}
.hm-pricing-card__price small { font-size: 16px; font-weight: 400; color: var(--hm-text-light); }
.hm-pricing-card__period {
  font-size: 14px;
  color: var(--hm-text-light);
  margin-bottom: 20px;
}
.hm-pricing-card__features {
  text-align: left;
  margin-bottom: 24px;
}
.hm-pricing-card__features li {
  padding: 6px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hm-pricing-card__features li::before {
  content: '\2713';
  color: var(--hm-primary);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

/* ---------- Features Grid ---------- */
.hm-features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.hm-feature-card {
  background: var(--hm-card-bg);
  padding: 32px 24px;
  border-radius: var(--hm-radius);
  box-shadow: var(--hm-card-shadow);
  text-align: center;
  transition: transform .2s;
}
.hm-feature-card:hover { transform: translateY(-4px); }
.hm-feature-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: var(--hm-bg-alt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.hm-feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.hm-feature-card p { font-size: 14px; color: var(--hm-text-light); }

/* ---------- Testimonials ---------- */
.hm-testimonials__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.hm-testimonial {
  background: var(--hm-card-bg);
  padding: 28px;
  border-radius: var(--hm-radius);
  box-shadow: var(--hm-card-shadow);
  border-left: 4px solid var(--hm-primary);
}
.hm-testimonial__text {
  font-style: italic;
  font-size: 15px;
  margin-bottom: 16px;
  line-height: 1.7;
}
.hm-testimonial__author {
  font-weight: 700;
  font-size: 14px;
}
.hm-testimonial__location {
  font-size: 13px;
  color: var(--hm-text-light);
}
.hm-testimonial__stars {
  color: var(--hm-accent);
  font-size: 16px;
  margin-bottom: 12px;
}

/* ---------- Forms ---------- */
.hm-form {
  max-width: 520px;
  margin: 0 auto;
}
.hm-form--wide { max-width: 640px; }
.hm-form__group {
  margin-bottom: 20px;
}
.hm-form__group label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
}
.hm-form__group input,
.hm-form__group select,
.hm-form__group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--hm-border);
  border-radius: 10px;
  font-family: var(--hm-font-body);
  font-size: 15px;
  background: #fff;
  transition: border-color .2s;
  color: var(--hm-text);
  min-height: 48px;
}
.hm-form__group input:focus,
.hm-form__group select:focus,
.hm-form__group textarea:focus {
  outline: none;
  border-color: var(--hm-primary);
}
.hm-form__group textarea { resize: vertical; min-height: 120px; }
.hm-form__honeypot { position: absolute; left: -9999px; }
.hm-form__trust {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--hm-text-light);
  margin-top: 12px;
  justify-content: center;
}

/* Form messages */
.form-message {
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
}
.form-message--success {
  background: #dcfce7;
  color: #166534;
}
.form-message--error {
  background: #fef2f2;
  color: #991b1b;
}

/* ---------- Channel Categories ---------- */
.hm-channels__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.hm-channel-cat {
  background: var(--hm-card-bg);
  padding: 20px;
  border-radius: var(--hm-radius);
  box-shadow: var(--hm-card-shadow);
  text-align: center;
  transition: transform .2s;
}
.hm-channel-cat:hover { transform: translateY(-3px); }
.hm-channel-cat__icon { font-size: 32px; margin-bottom: 8px; }
.hm-channel-cat h3 { font-size: 16px; margin-bottom: 4px; }
.hm-channel-cat p { font-size: 13px; color: var(--hm-text-light); }

/* ---------- FAQ Accordion ---------- */
.hm-faq__list { max-width: 800px; margin: 0 auto; }
.hm-faq-item {
  border-bottom: 1px solid var(--hm-border);
}
.hm-faq-item__q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 20px 0;
  font-family: var(--hm-font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--hm-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.hm-faq-item__q::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--hm-primary);
  transition: transform .3s;
  flex-shrink: 0;
}
.hm-faq-item__q.active::after {
  content: '\2212';
}
.hm-faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  font-size: 15px;
  line-height: 1.7;
  color: var(--hm-text-light);
}
.hm-faq-item__a.open {
  max-height: 500px;
  padding-bottom: 20px;
}

/* ---------- Page Header ---------- */
.hm-page-header {
  background: var(--hm-primary);
  padding: 60px 0;
  text-align: center;
  color: #fff;
}
.hm-page-header h1 { color: #fff; margin-bottom: 8px; }
.hm-page-header p { opacity: .9; }

/* ---------- Breadcrumb ---------- */
.hm-breadcrumb {
  font-size: 14px;
  color: rgba(255,255,255,.8);
  margin-bottom: 8px;
}
.hm-breadcrumb a { color: rgba(255,255,255,.9); }
.hm-breadcrumb a:hover { color: #fff; }

/* ---------- Content ---------- */
.hm-content { padding: 60px 0; }
.hm-content h2 { margin-top: 36px; margin-bottom: 16px; }
.hm-content h3 { margin-top: 28px; margin-bottom: 12px; }
.hm-content p { margin-bottom: 16px; }
.hm-content ul, .hm-content ol { margin: 16px 0; padding-left: 24px; }
.hm-content ul { list-style: disc; }
.hm-content ol { list-style: decimal; }
.hm-content li { margin-bottom: 8px; }
.hm-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}
.hm-content table th,
.hm-content table td {
  padding: 12px 16px;
  border: 1px solid var(--hm-border);
  text-align: left;
}
.hm-content table th {
  background: var(--hm-bg-alt);
  font-weight: 700;
}

/* ---------- Setup Guide ---------- */
.hm-guide__toc {
  background: var(--hm-bg-alt);
  padding: 24px;
  border-radius: var(--hm-radius);
  margin-bottom: 32px;
}
.hm-guide__toc h3 { margin-bottom: 12px; }
.hm-guide__toc ul { list-style: decimal; padding-left: 20px; }
.hm-guide__toc li { margin-bottom: 6px; }
.hm-guide__toc a { font-size: 14px; }
.hm-guide-step {
  background: var(--hm-bg-alt);
  padding: 20px;
  border-radius: 10px;
  margin: 16px 0;
  border-left: 4px solid var(--hm-primary);
}

/* ---------- Footer ---------- */
.hm-footer {
  background: var(--hm-footer-bg);
  color: var(--hm-footer-text);
  padding: 60px 0 0;
}
.hm-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.hm-footer__brand p { font-size: 14px; line-height: 1.7; opacity: .8; margin-top: 12px; }
.hm-footer h4 {
  font-family: var(--hm-font-heading);
  color: #fff;
  font-size: 16px;
  margin-bottom: 16px;
}
.hm-footer ul li { margin-bottom: 8px; }
.hm-footer ul a {
  color: var(--hm-footer-text);
  font-size: 14px;
  transition: color .2s;
}
.hm-footer ul a:hover { color: var(--hm-primary); }
.hm-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  opacity: .7;
}
.hm-footer__address { font-size: 13px; opacity: .7; margin-top: 8px; font-style: normal; }

/* ---------- Reseller ---------- */
.hm-reseller-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.hm-reseller-step {
  text-align: center;
  padding: 28px 20px;
  background: var(--hm-card-bg);
  border-radius: var(--hm-radius);
  box-shadow: var(--hm-card-shadow);
}
.hm-reseller-step__num {
  width: 48px;
  height: 48px;
  background: var(--hm-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--hm-font-heading);
  font-size: 20px;
  font-weight: 700;
  margin: 0 auto 12px;
}

/* ---------- Image Gallery ---------- */
.hm-img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.hm-img-grid img {
  border-radius: var(--hm-radius);
  width: 100%;
  object-fit: cover;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hm-nav__links { display: none; }
  .hm-nav__links.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 70px 0 0;
    background: var(--hm-nav-bg);
    padding: 24px;
    gap: 16px;
    z-index: 999;
    overflow-y: auto;
    box-shadow: 0 4px 24px rgba(0,0,0,.1);
  }
  .hm-hamburger { display: flex; }
  .hm-footer__grid { grid-template-columns: 1fr 1fr; }
  .hm-stats__grid { grid-template-columns: repeat(2, 1fr); }
  .hm-hero { padding: 60px 0 50px; }
}
@media (max-width: 600px) {
  .hm-footer__grid { grid-template-columns: 1fr; }
  .hm-stats__grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .hm-section { padding: 50px 0; }
  .hm-pricing__grid { grid-template-columns: 1fr; }
}
