/* CastNova — Global Stylesheet
   Color palette derived from espanaiptv.com
   Primary: #112164 (dark navy), Secondary: #4ddffd (cyan)
   Accent: #0d99e5 (blue), Button: #1f3bb1 (royal blue)
   Text: #73729a (muted purple-gray)
*/
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #112164;
  --primary-hover: #1a2f80;
  --secondary: #4ddffd;
  --accent: #0d99e5;
  --btn-bg: #1f3bb1;
  --btn-hover: #2a4cd0;
  --dark: #0a0e2a;
  --dark-alt: #141a42;
  --text: #73729a;
  --mid: #52556d;
  --muted: #9b9bc0;
  --light: #f2f4fa;
  --lighter: #f8f9fd;
  --white: #ffffff;
  --font: 'Manrope', sans-serif;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow: 0 4px 24px rgba(17,33,100,.08);
  --shadow-lg: 0 10px 40px rgba(17,33,100,.14);
  --max-w: 1200px;
  --transition: .25s ease;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--dark);
  background: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--secondary); }
ul, ol { list-style: none; }

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

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 2rem; border: none; border-radius: 100px;
  font-family: var(--font); font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition); text-decoration: none;
}
.btn-primary { background: var(--btn-bg); color: var(--white); }
.btn-primary:hover { background: var(--btn-hover); color: var(--white); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(31,59,177,.35); }
.btn-secondary { background: var(--secondary); color: var(--primary); font-weight: 700; }
.btn-secondary:hover { background: #38d0f0; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--secondary); }
.btn-outline:hover { background: var(--secondary); color: var(--primary); }
.btn-white { background: var(--white); color: var(--primary); }
.btn-white:hover { background: var(--light); }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.1rem; }

/* Header */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--dark); border-bottom: 1px solid rgba(77,223,253,.1);
  transition: background var(--transition), box-shadow var(--transition);
}
.header.scrolled { background: rgba(10,14,42,.97); box-shadow: var(--shadow-lg); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-w); margin: 0 auto; padding: .75rem 1.5rem;
  min-height: 72px;
}
.logo { font-size: 1.6rem; font-weight: 700; color: var(--white); text-decoration: none; }
.logo span { color: var(--secondary); }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a { color: rgba(255,255,255,.85); font-weight: 600; font-size: .95rem; transition: color var(--transition); }
.nav a:hover, .nav a.active { color: var(--secondary); }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; padding: .4rem .6rem; cursor: pointer; color: var(--white); font-size: 1.4rem; }
.nav-toggle:hover { color: var(--secondary); border-color: var(--secondary); }

/* Hero */
.hero {
  padding: 8rem 0 5rem;
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
  color: var(--white); text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -40%; right: -15%; width: 600px; height: 600px;
  border-radius: 50%; background: radial-gradient(circle, rgba(77,223,253,.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: -30%; left: -10%; width: 500px; height: 500px;
  border-radius: 50%; background: radial-gradient(circle, rgba(31,59,177,.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 { font-size: 3rem; font-weight: 700; margin-bottom: 1.25rem; line-height: 1.15; }
.hero h1 span { color: var(--secondary); }
.hero p { font-size: 1.15rem; color: rgba(255,255,255,.78); max-width: 680px; margin: 0 auto 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 3rem; justify-content: center; margin-top: 3rem; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 2rem; color: var(--secondary); font-weight: 700; }
.hero-stat span { font-size: .9rem; color: rgba(255,255,255,.65); }

/* Section */
.section { padding: 5rem 0; }
.section-alt { background: var(--light); }
.section-dark { background: var(--dark); color: var(--white); }
.section-primary { background: var(--primary); color: var(--white); }
.section-title { font-size: 2.2rem; font-weight: 700; text-align: center; margin-bottom: .75rem; }
.section-title span { color: var(--secondary); }
.section-subtitle { text-align: center; color: var(--text); max-width: 650px; margin: 0 auto 3rem; font-size: 1.05rem; }
.section-dark .section-subtitle { color: rgba(255,255,255,.7); }

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* Cards */
.card {
  background: var(--white); border-radius: var(--radius-lg); padding: 2rem;
  box-shadow: var(--shadow); transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-icon {
  width: 56px; height: 56px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--btn-bg));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--secondary); margin-bottom: 1.25rem;
}
.card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .75rem; }
.card p { color: var(--text); font-size: .95rem; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; align-items: start; }
.pricing-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 2.5rem 1.75rem;
  text-align: center; border: 2px solid transparent; position: relative;
  box-shadow: var(--shadow); transition: all var(--transition);
}
.pricing-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.pricing-card.popular { border-color: var(--secondary); }
.pricing-card .badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--secondary); color: var(--primary); font-weight: 700;
  padding: .3rem 1.2rem; border-radius: 100px; font-size: .8rem;
}
.pricing-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: .5rem; color: var(--primary); }
.pricing-card .price { font-size: 2.8rem; font-weight: 700; color: var(--primary); margin: .75rem 0; }
.pricing-card .price small { font-size: .9rem; color: var(--text); font-weight: 400; }
.pricing-card ul { text-align: left; margin: 1.5rem 0; }
.pricing-card li { padding: .4rem 0; color: var(--mid); font-size: .92rem; display: flex; align-items: center; gap: .5rem; }
.pricing-card li::before { content: '\2713'; color: var(--secondary); font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.pricing-card .btn { width: 100%; }

/* Testimonials */
.testimonial-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 2rem;
  box-shadow: var(--shadow); position: relative;
}
.testimonial-card::before {
  content: '\201C'; position: absolute; top: 12px; left: 20px;
  font-size: 4rem; color: rgba(77,223,253,.2); font-family: serif; line-height: 1;
}
.testimonial-card p { font-size: .95rem; color: var(--mid); margin-bottom: 1.25rem; font-style: italic; padding-top: .5rem; }
.testimonial-card .author { display: flex; align-items: center; gap: .75rem; }
.testimonial-card .author img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.testimonial-card .author strong { font-size: .9rem; color: var(--primary); }
.testimonial-card .stars { color: #f5a623; font-size: .85rem; }

/* FAQ */
.faq-item { border-bottom: 1px solid rgba(17,33,100,.08); }
.faq-question {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 0; cursor: pointer; font-weight: 600; font-size: 1.05rem;
  color: var(--primary);
}
.faq-question::after { content: '+'; font-size: 1.5rem; color: var(--secondary); transition: transform var(--transition); }
.faq-item.open .faq-question::after { content: '\2212'; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-answer p { padding: 0 0 1.25rem; color: var(--text); line-height: 1.7; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .95rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: .8rem 1rem; border: 2px solid rgba(17,33,100,.12);
  border-radius: var(--radius); font-family: var(--font); font-size: .95rem;
  transition: border-color var(--transition); background: var(--white);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--secondary); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-message { padding: .75rem 1rem; border-radius: var(--radius); margin-top: 1rem; font-size: .9rem; }
.form-message--success { background: #e6f9ed; color: #177a3a; }
.form-message--error { background: #fde8e8; color: #c0392b; }

/* Channels grid */
.channels-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.channel-item {
  background: var(--white); border-radius: var(--radius); padding: 1rem;
  text-align: center; box-shadow: var(--shadow); font-weight: 600;
  font-size: .9rem; color: var(--primary); transition: transform var(--transition);
}
.channel-item:hover { transform: translateY(-2px); }

/* Steps */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; counter-reset: step; }
.step-card { text-align: center; position: relative; }
.step-card::before {
  counter-increment: step; content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, var(--primary), var(--btn-bg));
  color: var(--secondary); font-weight: 700; font-size: 1.2rem;
}
.step-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.step-card p { color: var(--text); font-size: .9rem; }

/* Guide */
.guide-content { max-width: 800px; margin: 0 auto; }
.guide-content h2 { font-size: 1.6rem; font-weight: 700; color: var(--primary); margin: 2.5rem 0 1rem; }
.guide-content h3 { font-size: 1.25rem; font-weight: 700; color: var(--primary); margin: 2rem 0 .75rem; }
.guide-content p { color: var(--text); margin-bottom: 1rem; line-height: 1.8; }
.guide-content ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.guide-content ol li { color: var(--mid); margin-bottom: .5rem; list-style: decimal; }
.guide-content .tip {
  background: linear-gradient(135deg, rgba(77,223,253,.08), rgba(17,33,100,.06));
  border-left: 4px solid var(--secondary); padding: 1rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0;
}
.guide-content .tip strong { color: var(--primary); }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.about-grid img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.about-text h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 1rem; }
.about-text p { color: var(--text); margin-bottom: 1rem; }

/* Reseller */
.reseller-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }

/* CTA */
.cta-section {
  padding: 4rem 0; text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--btn-bg));
  color: var(--white);
}
.cta-section h2 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; }
.cta-section p { color: rgba(255,255,255,.8); margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Footer */
.footer { background: var(--dark); color: rgba(255,255,255,.7); padding: 4rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.footer h4 { color: var(--white); font-weight: 700; margin-bottom: 1.25rem; font-size: 1.05rem; }
.footer a { color: rgba(255,255,255,.6); display: block; padding: .3rem 0; transition: color var(--transition); font-size: .9rem; }
.footer a:hover { color: var(--secondary); }
.footer p { font-size: .9rem; line-height: 1.7; }
.footer-logo { font-size: 1.5rem; font-weight: 700; color: var(--white); margin-bottom: 1rem; }
.footer-logo span { color: var(--secondary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding: 1.5rem 0;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  font-size: .85rem;
}
.footer-bottom a { display: inline; padding: 0; }

/* Legal pages */
.legal-content { max-width: 800px; margin: 0 auto; }
.legal-content h1 { font-size: 2rem; font-weight: 700; margin-bottom: 1.5rem; color: var(--primary); }
.legal-content h2 { font-size: 1.4rem; font-weight: 700; margin: 2rem 0 .75rem; color: var(--primary); }
.legal-content p { color: var(--text); margin-bottom: 1rem; }
.legal-content ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.legal-content ul li { color: var(--text); margin-bottom: .4rem; list-style: disc; }

/* Checkout */
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.checkout-summary {
  background: var(--light); border-radius: var(--radius-lg); padding: 2rem;
  position: sticky; top: 100px;
}
.checkout-summary h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem; color: var(--primary); }
.checkout-summary .line { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid rgba(17,33,100,.08); }
.checkout-summary .total { font-weight: 700; font-size: 1.2rem; border-bottom: none; color: var(--primary); }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-info-card {
  background: var(--light); border-radius: var(--radius-lg); padding: 2rem;
  display: flex; gap: 1rem; align-items: flex-start;
}
.contact-info-card .icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--btn-bg));
  display: flex; align-items: center; justify-content: center;
  color: var(--secondary); font-size: 1.3rem; flex-shrink: 0;
}
.contact-info-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: .25rem; }
.contact-info-card p { font-size: .9rem; color: var(--text); }

/* Page header */
.page-header {
  padding: 8rem 0 3rem;
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
  color: var(--white); text-align: center;
}
.page-header h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: .75rem; }
.page-header p { color: rgba(255,255,255,.75); max-width: 600px; margin: 0 auto; }

/* Honeypot */
.ohnohoney { position: absolute !important; left: -9999px; opacity: 0; height: 0; width: 0; }

/* Responsive */
@media(max-width:1024px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4, .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }

  .container { padding: 0 24px; }
}

@media(max-width:768px) {
  .nav { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background: var(--dark); flex-direction: column; justify-content: center; gap: 1.5rem; transition: right .3s ease; z-index: 1001; }
  .nav.open { right: 0; }
  .nav a { font-size: 1.1rem; }
  .nav-toggle { display: block; }
  .nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 7rem 0 3.5rem; }
  .page-header { padding: 7rem 0 2.5rem; }
  .page-header h1 { font-size: 1.8rem; }
  .section-title { font-size: 1.6rem; }
  .section { padding: 3.5rem 0; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .grid-2, .grid-3, .about-grid, .contact-grid, .checkout-grid { grid-template-columns: 1fr; }
  .reseller-benefits { grid-template-columns: 1fr; }
  .steps-grid, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero-stats { gap: 1.5rem; }
  .hero-stat strong { font-size: 1.5rem; }

  .hero { padding: 60px 0 40px; }
}

/* Skip Link */
.skip-link { position: absolute; top: -100%; left: 16px; z-index: 9999; background: var(--accent, #00E5B9); color: var(--primary, #000); padding: 8px 16px; border-radius: 4px; font-weight: 600; font-size: .9rem; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 8px; }

@media (max-width: 640px) {
  .container { padding: 0 16px; }
@media (max-width: 480px) {
  .hero h1 { font-size: 1.4rem; }
@media (max-width: 360px) {
  .hero h1 { font-size: 1.25rem; }

/* ─── TOUCH & INTERACTION ─── */
@media (hover: none) and (pointer: coarse) {
  .btn, .nav-cta, a, button { min-height: 44px; min-width: 44px; }
  .nav-links a { padding: 12px 8px; }
  .faq-question { padding: 16px; }
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ─── PRINT ─── */
@media print {
  .site-header, .site-footer, .nav-toggle, .whatsapp-btn, .skip-link, footer, header, nav { display: none !important; }
  body { color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
  .hero { background: none; padding: 20px 0; }
}
