/*
Theme Name: TestOposita
Theme URI: https://testoposita.es
Author: TestOposita
Author URI: https://testoposita.es
Description: Tema oficial de TestOposita — Plataforma de tests para oposiciones con tutor IA. Diseño oscuro premium con paleta verde BCG.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: testoposita
Tags: dark, green, education, modern, responsive
*/

/* === VARIABLES === */
:root {
  --navy:    #0A1A0F;
  --navy2:   #0F2318;
  --card-bg: #102016;
  --green:   #006B3F;
  --green-lt:#00A651;
  --accent:  #5DD67A;
  --accent-lt:#A8F0BA;
  --white:   #F4FAF6;
  --gray:    #7FA98A;
  --border:  rgba(255,255,255,0.07);
  --radius:  14px;
  --radius-sm:10px;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 300;
  background: var(--navy);
  color: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-lt); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

h1,h2,h3,h4,h5,h6 {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--white);
}

/* === LAYOUT === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}
.section { padding: 90px 0; }
.section-alt { background: var(--navy2); }

/* === LABELS === */
.section-label {
  display: inline-block;
  font-family: 'Sora', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-lt);
  margin-bottom: 14px;
}

/* === BUTTONS === */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--green-lt), #005a30);
  color: #fff;
  padding: 14px 30px;
  border-radius: var(--radius-sm);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,166,81,0.3);
  transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0,166,81,0.45);
}
.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--white);
  padding: 14px 30px;
  border-radius: var(--radius-sm);
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.btn-ghost:hover {
  color: var(--white);
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.04);
}

/* === NAV === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10,26,15,0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  max-width: 1200px;
  margin: 0 auto;
}
.site-logo {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--white);
}
.site-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links a {
  color: var(--gray);
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: var(--white); }
.nav-cta {
  background: var(--green-lt) !important;
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 8px;
  font-family: 'Sora', sans-serif;
  font-weight: 700 !important;
  font-size: 14px !important;
  transition: background .2s !important;
}
.nav-cta:hover { background: #00c45f !important; color: #fff !important; }

/* === HERO === */
.hero {
  position: relative;
  padding: 110px 0 90px;
  overflow: hidden;
  min-height: 88vh;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 65% 40%, rgba(0,166,81,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 20% 80%, rgba(93,214,122,0.06) 0%, transparent 60%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}
.hero-content { position: relative; max-width: 620px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(93,214,122,0.1);
  border: 1px solid rgba(93,214,122,0.3);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(40px, 5vw, 62px);
  margin-bottom: 22px;
  letter-spacing: -1.5px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), var(--accent-lt));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 18px;
  color: var(--gray);
  max-width: 500px;
  margin-bottom: 38px;
  line-height: 1.75;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 52px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.stat-num {
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 800;
}
.stat-num span { color: var(--accent); }
.stat-lbl { font-size: 12px; color: var(--gray); margin-top: 2px; }

/* === MOCK CARD === */
.hero-visual {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  width: 360px;
}
.mock-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
.mock-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.mock-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 13px; }
.mock-timer {
  background: rgba(93,214,122,0.15);
  color: var(--accent);
  font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: 6px;
}
.mock-progress { height: 4px; background: rgba(255,255,255,0.08); border-radius: 4px; margin-bottom: 20px; overflow: hidden; }
.mock-progress-fill { height: 100%; width: 40%; background: linear-gradient(90deg, var(--green-lt), var(--accent)); border-radius: 4px; }
.mock-qnum { color: var(--gray); font-size: 11px; margin-bottom: 8px; letter-spacing: 0.05em; }
.mock-question { font-size: 13px; line-height: 1.6; margin-bottom: 16px; }
.mock-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 7px; font-size: 12.5px;
  color: var(--gray);
}
.mock-option.correct { border-color: #22c55e; background: rgba(34,197,94,0.1); color: #86efac; }
.mock-option.selected { border-color: var(--green-lt); background: rgba(0,166,81,0.12); color: var(--white); }
.mock-dot { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid currentColor; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; }
.mock-ai {
  margin-top: 14px;
  background: rgba(93,214,122,0.07);
  border: 1px solid rgba(93,214,122,0.2);
  border-radius: 10px; padding: 12px 13px;
  font-size: 12px; color: var(--accent-lt); line-height: 1.5;
}
.mock-ai strong { color: var(--accent); display: block; margin-bottom: 4px; font-size: 11px; letter-spacing: 0.05em; }

/* === FEATURES === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 52px;
}
.feat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .2s, transform .2s;
}
.feat-card:hover { border-color: rgba(0,166,81,0.35); transform: translateY(-3px); }
.feat-icon { font-size: 26px; margin-bottom: 16px; }
.feat-card h3 { font-family: 'Sora', sans-serif; font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.feat-card p { color: var(--gray); font-size: 14px; line-height: 1.65; }

/* === STEPS === */
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 30px; margin-top: 52px; text-align: center; }
.step-num {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(0,166,81,0.15);
  border: 2px solid var(--green-lt);
  color: var(--green-lt);
  font-family: 'Sora', sans-serif;
  font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.step-card h3 { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 17px; margin-bottom: 10px; }
.step-card p { color: var(--gray); font-size: 14px; }

/* === CTA BAND === */
.cta-band {
  background: var(--navy2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 80px 40px;
}
.cta-band h2 { font-size: clamp(28px, 3.5vw, 44px); margin-bottom: 16px; }
.cta-band p { color: var(--gray); font-size: 17px; margin-bottom: 36px; }

/* === PRICING === */
.pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 52px; }
.price-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 34px;
  position: relative;
}
.price-card.featured { border-color: var(--green-lt); background: linear-gradient(160deg, rgba(0,166,81,0.1), var(--card-bg)); }
.price-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--navy);
  font-family: 'Sora', sans-serif; font-size: 11px; font-weight: 800;
  letter-spacing: 0.06em; padding: 4px 14px; border-radius: 100px;
}
.price-plan { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.price-amount { font-family: 'Sora', sans-serif; font-size: 42px; font-weight: 800; letter-spacing: -1px; margin-bottom: 4px; }
.price-amount sup { font-size: 20px; vertical-align: super; }
.price-amount sub { font-size: 14px; color: var(--gray); font-weight: 400; }
.price-desc { color: var(--gray); font-size: 13px; margin-bottom: 24px; }
.price-features { list-style: none; margin-bottom: 28px; }
.price-features li { font-size: 13.5px; color: var(--gray); padding: 7px 0; border-bottom: 1px solid var(--border); display: flex; gap: 10px; }
.price-features li::before { content: '✓'; color: #22c55e; font-weight: 700; flex-shrink: 0; }
.price-features li.muted { color: rgba(127,169,138,0.4); }
.price-features li.muted::before { content: '—'; color: rgba(127,169,138,0.3); }

/* === FAQ === */
.faq-list { margin-top: 48px; max-width: 700px; margin-left: auto; margin-right: auto; }
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; cursor: pointer; }
.faq-q { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.faq-q span { color: var(--green-lt); font-size: 20px; transition: transform .2s; }
.faq-a { color: var(--gray); font-size: 14px; line-height: 1.7; margin-top: 12px; display: none; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-q span { transform: rotate(45deg); }

/* === AUTH PAGE === */
.auth-page { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 60px 20px; }
.auth-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 44px; width: 100%; max-width: 420px; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 32px; border-bottom: 1px solid var(--border); }
.auth-tab {
  flex: 1; text-align: center; padding: 12px;
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 14px;
  color: var(--gray); cursor: pointer; border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.auth-tab.active { color: var(--green-lt); border-bottom-color: var(--green-lt); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--gray); margin-bottom: 7px; }
.form-group input {
  width: 100%; padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px; color: var(--white);
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  transition: border-color .2s;
  outline: none;
}
.form-group input:focus { border-color: var(--green-lt); }
.form-group input::placeholder { color: var(--gray); }
.form-submit { width: 100%; margin-top: 8px; }
.forgot-link { text-align: center; margin-top: 16px; font-size: 13px; color: var(--gray); }
.forgot-link a { color: var(--green-lt); }
.legal-text { text-align: center; margin-top: 20px; font-size: 11px; color: var(--gray); line-height: 1.6; }

/* === FOOTER === */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  color: var(--gray); font-size: 13px;
  max-width: 1200px; margin: 0 auto; padding: 0 40px;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--gray); font-size: 13px; }
.footer-links a:hover { color: var(--white); }

/* === RESPONSIVE === */
@media (max-width: 1100px) { .hero-visual { display: none; } }
@media (max-width: 900px) {
  .features-grid, .pricing-grid, .steps-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .container, .nav-inner, .footer-inner { padding: 0 20px; }
  .features-grid, .pricing-grid, .steps-grid { grid-template-columns: 1fr; }
  .hero { padding: 70px 0 60px; }
  .section { padding: 60px 0; }
  .hero-stats { flex-direction: column; gap: 20px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* === ANIMATIONS === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease both; }
.fade-up:nth-child(2) { animation-delay: .1s; }
.fade-up:nth-child(3) { animation-delay: .2s; }
.fade-up:nth-child(4) { animation-delay: .3s; }
.fade-up:nth-child(5) { animation-delay: .4s; }
