/* ============================================================
   SubastaFácil — Landing Page Redesign v2
   Design: Bold Conversion Machine
   Colors: #364230 (verde), #E6EB5D (lima), #FAFAF8 (fondo)
   ============================================================ */

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

:root {
  --green: #364230;
  --green-light: #4a5a3e;
  --lime: #E6EB5D;
  --lime-hover: #d4d94e;
  --white: #FFFFFF;
  --bg: #FAFAF8;
  --bg-alt: #F2F2F0;
  --text: #1A1A1A;
  --text-light: #555555;
  --text-muted: #888888;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.1);
  --transition: 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* HEADER */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 16px 24px; transition: background var(--transition), box-shadow var(--transition); background: transparent; }
.site-header.scrolled { background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); box-shadow: 0 1px 12px rgba(0,0,0,0.08); }
.header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.logo { height: 42px; width: auto; filter: brightness(0) invert(1); transition: filter var(--transition); }
.site-header.scrolled .logo { filter: none; }
.header-cta { background: var(--lime); color: var(--green); font-weight: 600; font-size: 14px; padding: 10px 20px; border-radius: 100px; transition: transform var(--transition), box-shadow var(--transition); }
.header-cta:hover { transform: scale(1.03); box-shadow: 0 4px 16px rgba(230,235,93,0.4); }

/* HERO */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg-img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(54,66,48,0.88) 0%, rgba(54,66,48,0.6) 100%); }
.hero-content { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; padding: 120px 24px 80px; }
.hero-text { max-width: 680px; }
.badge { display: inline-block; background: var(--lime); color: var(--green); font-size: 13px; font-weight: 700; padding: 6px 16px; border-radius: 100px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 24px; }
.badge-light { background: rgba(255,255,255,0.15); color: var(--white); border: 1px solid rgba(255,255,255,0.3); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; color: var(--white); line-height: 1.1; margin-bottom: 20px; }
.hero h1 .highlight { color: var(--lime); }
.hero-sub { font-size: 18px; color: rgba(255,255,255,0.85); line-height: 1.7; margin-bottom: 28px; max-width: 560px; }
.hero-checks { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; }
.check-item { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.9); font-size: 15px; }

/* BUTTONS */
.btn-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--lime); color: var(--green); font-weight: 700; font-size: 16px; padding: 16px 32px; border-radius: 100px; transition: transform var(--transition), box-shadow var(--transition); }
.btn-cta:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 32px rgba(230,235,93,0.35); }
.btn-cta:active { transform: scale(0.97); }
.btn-cta-large { font-size: 18px; padding: 18px 40px; }
.btn-cta-full { width: 100%; justify-content: center; }

/* TRUST BAR */
.trust-bar { background: var(--green); padding: 40px 24px; }
.trust-grid { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.trust-number { display: block; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: var(--lime); }
.trust-label { font-size: 14px; color: rgba(255,255,255,0.8); font-weight: 500; }

/* SECTIONS COMMON */
.section-container { max-width: 1100px; margin: 0 auto; padding: 80px 24px; }
.section-badge { display: inline-block; background: var(--lime); color: var(--green); font-size: 12px; font-weight: 700; padding: 5px 14px; border-radius: 100px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }
.section-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; color: var(--text); margin-bottom: 12px; }
.section-subtitle { font-size: 18px; color: var(--text-light); max-width: 600px; margin-bottom: 48px; }

/* HOW IT WORKS */
.how-it-works { background: var(--bg-alt); }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-bottom: 40px; }
.step-card { background: var(--white); padding: 32px 28px; border-radius: var(--radius); box-shadow: var(--shadow); border-top: 4px solid var(--lime); transition: transform var(--transition), box-shadow var(--transition); }
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-number { width: 40px; height: 40px; background: var(--green); color: var(--lime); font-weight: 800; font-size: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.step-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.step-card p { font-size: 15px; color: var(--text-light); line-height: 1.6; }
.steps-cta { text-align: center; }

/* TESTIMONIALS */
.testimonials { background: var(--bg); }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.testimonial-card { background: var(--white); padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow); border-left: 4px solid var(--lime); }
.stars { color: #F5A623; font-size: 18px; margin-bottom: 12px; letter-spacing: 2px; }
.testimonial-card blockquote { font-size: 15px; color: var(--text); line-height: 1.7; font-style: italic; margin-bottom: 16px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.author-avatar { width: 44px; height: 44px; background: var(--green); color: var(--lime); font-weight: 700; font-size: 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.testimonial-author strong { font-size: 14px; }
.testimonial-author small { color: var(--text-muted); font-size: 13px; }

/* BENEFITS */
.benefits { background: var(--bg-alt); }
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.benefit-card { background: var(--white); padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; transition: transform var(--transition); }
.benefit-card:hover { transform: translateY(-4px); }
.benefit-icon { font-size: 36px; margin-bottom: 16px; }
.benefit-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.benefit-card p { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* EDUCATION */
.education { background: var(--bg); }
.education-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 24px; }
.edu-card { background: var(--white); border-radius: var(--radius-sm); box-shadow: var(--shadow); overflow: hidden; }
.edu-card summary { padding: 20px 24px; font-weight: 600; font-size: 15px; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.edu-card summary::after { content: '+'; font-size: 20px; font-weight: 300; color: var(--text-muted); transition: transform var(--transition); }
.edu-card[open] summary::after { transform: rotate(45deg); }
.edu-card summary::-webkit-details-marker { display: none; }
.edu-card p { padding: 0 24px 20px; font-size: 14px; color: var(--text-light); line-height: 1.7; }
.edu-disclaimer { font-size: 13px; color: var(--text-muted); font-style: italic; text-align: center; }

/* NPL */
.npl-section { position: relative; overflow: hidden; }
.npl-inner { position: relative; min-height: 420px; display: flex; align-items: center; }
.npl-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.npl-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(54,66,48,0.92) 0%, rgba(54,66,48,0.7) 100%); }
.npl-content { position: relative; z-index: 2; max-width: 650px; padding: 60px 24px; margin: 0 auto; }
.npl-content h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: var(--white); margin: 16px 0; }
.npl-content p { font-size: 16px; color: rgba(255,255,255,0.85); line-height: 1.7; margin-bottom: 24px; }

/* FAQ */
.faq { background: var(--bg-alt); }
.faq-list { max-width: 750px; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--white); border-radius: var(--radius-sm); box-shadow: var(--shadow); overflow: hidden; }
.faq-item summary { padding: 20px 24px; font-weight: 600; font-size: 15px; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.faq-item summary::after { content: '+'; font-size: 22px; font-weight: 300; color: var(--lime); transition: transform var(--transition); }
.faq-item[open] summary::after { transform: rotate(45deg); color: var(--green); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { padding: 0 24px 20px; font-size: 14px; color: var(--text-light); line-height: 1.7; }

/* FORM SECTION */
.form-section { background: var(--green); padding: 80px 24px; }
.form-container { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.form-text h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; color: var(--white); margin-bottom: 12px; }
.form-text p { font-size: 16px; color: rgba(255,255,255,0.8); margin-bottom: 28px; }
.form-guarantees { display: flex; flex-direction: column; gap: 12px; }
.guarantee-item { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.9); font-size: 14px; }
.form-embed { background: var(--white); border-radius: var(--radius); padding: 24px; min-height: 400px; box-shadow: var(--shadow-lg); }

/* FOOTER */
.site-footer { background: var(--text); padding: 48px 24px; text-align: center; }
.footer-inner { max-width: 600px; margin: 0 auto; }
.footer-logo { margin: 0 auto 16px; filter: brightness(0) invert(1); }
.site-footer p { color: rgba(255,255,255,0.6); font-size: 14px; margin-bottom: 16px; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }
.footer-link { color: rgba(255,255,255,0.5); font-size: 13px; transition: color var(--transition); }
.footer-link:hover { color: var(--lime); }
.footer-copy { color: rgba(255,255,255,0.3); font-size: 12px; }

/* STICKY CTA MOBILE */
.sticky-cta-mobile { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 999; padding: 12px 16px; background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); box-shadow: 0 -2px 16px rgba(0,0,0,0.1); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-content { padding: 100px 20px 60px; }
  .hero h1 { font-size: 2rem; }
  .hero-sub { font-size: 16px; }
  .trust-grid { grid-template-columns: 1fr; gap: 16px; }
  .form-container { grid-template-columns: 1fr; gap: 32px; }
  .steps-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr; }
  .education-grid { grid-template-columns: 1fr; }
  .sticky-cta-mobile { display: block; }
  .section-container { padding: 60px 20px; }
  .header-cta { display: none; }
  body { padding-bottom: 70px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.7rem; }
  .btn-cta-large { font-size: 16px; padding: 16px 28px; }
}

/* ANIMATIONS */
@media (prefers-reduced-motion: no-preference) {
  .step-card, .testimonial-card, .benefit-card {
    opacity: 0; transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
  }
  @keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
  .step-card:nth-child(1) { animation-delay: 0.1s; }
  .step-card:nth-child(2) { animation-delay: 0.2s; }
  .step-card:nth-child(3) { animation-delay: 0.3s; }
  .testimonial-card:nth-child(1) { animation-delay: 0.1s; }
  .testimonial-card:nth-child(2) { animation-delay: 0.2s; }
  .testimonial-card:nth-child(3) { animation-delay: 0.3s; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   MODAL & EXIT-INTENT POPUP
   ============================================================ */

/* Form CTA Container (replaces inline form) */
.form-cta-container { max-width: 700px; margin: 0 auto; text-align: center; }
.form-cta-container h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; color: var(--white); margin-bottom: 12px; }
.form-cta-container p { font-size: 16px; color: rgba(255,255,255,0.8); margin-bottom: 28px; }
.form-guarantees-center { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 32px; }
.form-guarantees-center .guarantee-item { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.9); font-size: 14px; }

/* Modal Overlay */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); align-items: center; justify-content: center; padding: 20px; opacity: 0; transition: opacity 0.25s ease-out; }
.modal-overlay.active { display: flex; opacity: 1; }

/* Modal Content */
.modal-content { background: var(--white); border-radius: 16px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 24px 80px rgba(0,0,0,0.25); animation: modalSlideIn 0.3s ease-out; }
@keyframes modalSlideIn { from { transform: translateY(20px) scale(0.96); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

/* Modal Close */
.modal-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border: none; background: var(--bg-alt); border-radius: 50%; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--transition); z-index: 10; }
.modal-close:hover { background: #ddd; }

/* Modal Header */
.modal-header { padding: 28px 28px 0; text-align: center; }
.modal-header h3 { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.modal-header p { font-size: 14px; color: var(--text-light); }

/* Modal Body (iframe) */
.modal-body { padding: 16px 20px 20px; min-height: 450px; }
.modal-body iframe { width: 100%; min-height: 430px; border: none; border-radius: 8px; }

/* Exit-Intent Modal */
.exit-modal-content { max-width: 460px; padding: 40px 32px; text-align: center; }
.exit-modal-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.exit-icon { font-size: 48px; }
.exit-modal-content h3 { font-size: 24px; font-weight: 800; color: var(--text); }
.exit-modal-content p { font-size: 15px; color: var(--text-light); line-height: 1.6; }
.exit-form { width: 100%; display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.exit-input { width: 100%; padding: 14px 18px; border: 2px solid #e0e0e0; border-radius: 100px; font-size: 16px; font-family: inherit; outline: none; transition: border-color var(--transition); }
.exit-input:focus { border-color: var(--lime); }
.exit-disclaimer { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.exit-success { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 0; }
.exit-success-icon { font-size: 48px; }
.exit-success h4 { font-size: 20px; font-weight: 700; color: var(--green); }
.exit-success p { font-size: 14px; color: var(--text-light); }

/* Also update all CTA links that pointed to #formulario-final to open modal */
