/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #1a7a4a;
  --green-light: #25a063;
  --green-pale: #e8f5ee;
  --dark: #1a1a2e;
  --gray: #6b7280;
  --gray-light: #f3f4f6;
  --white: #ffffff;
  --font: 'Inter', sans-serif;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
}

body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ========== HEADER ========== */
header {
  background: var(--white);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--green);
}

.logo span { color: var(--dark); }

nav { display: flex; gap: 28px; }

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray);
  transition: color 0.2s;
}

nav a:hover, nav a.active { color: var(--green); }

.btn {
  background: var(--green);
  color: var(--white);
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

.btn:hover { background: var(--green-light); }

.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--dark); background: none; border: none; }

/* ========== HERO ========== */
.hero {
  background: linear-gradient(135deg, var(--green) 0%, #0f4c2a 100%);
  color: var(--white);
  padding: 80px 20px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto 36px;
}

.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.6);
  color: var(--white);
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline:hover { background: rgba(255,255,255,0.15); }

.btn-white {
  background: var(--white);
  color: var(--green);
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-white:hover { background: #f0f0f0; }

/* ========== ADSENSE SLOTS ========== */
.ad-slot {
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  gap: 6px;
  min-height: 100px;
}

.ad-slot-leaderboard { width: 100%; max-width: 728px; height: 90px; margin: 0 auto; }
.ad-slot-rectangle { width: 100%; max-width: 336px; height: 280px; }
.ad-slot-banner { width: 100%; height: 90px; }

.ad-wrapper {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
  display: flex;
  justify-content: center;
}

/* ========== MAIN LAYOUT ========== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding: 50px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

/* ========== SECTION TITLES ========== */
.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background: var(--green);
  border-radius: 2px;
  margin-top: 8px;
}

.section-subtitle { color: var(--gray); margin-bottom: 28px; }

/* ========== CARDS ========== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--green-pale), #c8e6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.card-body { padding: 20px; }

.tag {
  display: inline-block;
  background: var(--green-pale);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.card p { font-size: 0.88rem; color: var(--gray); margin-bottom: 16px; }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--gray);
  border-top: 1px solid #f0f0f0;
  padding-top: 12px;
}

.card-footer .read-more { color: var(--green); font-weight: 600; }

/* ========== FEATURED ========== */
.featured-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 40px;
}

.featured-img {
  background: linear-gradient(135deg, var(--green) 0%, #0f4c2a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  min-height: 250px;
}

.featured-body { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.featured-body .tag { margin-bottom: 12px; }
.featured-body h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 12px; line-height: 1.3; }
.featured-body p { color: var(--gray); font-size: 0.92rem; margin-bottom: 20px; }

/* ========== SIDEBAR ========== */
.sidebar { display: flex; flex-direction: column; gap: 28px; }

.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--green-pale);
  color: var(--dark);
}

.popular-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }

.popular-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.popular-num {
  width: 28px;
  height: 28px;
  background: var(--green-pale);
  color: var(--green);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.popular-list a { font-size: 0.88rem; font-weight: 600; color: var(--dark); line-height: 1.4; }
.popular-list a:hover { color: var(--green); }

/* Newsletter widget */
.newsletter-widget { background: linear-gradient(135deg, var(--green), #0f4c2a); color: var(--white); }
.newsletter-widget .widget-title { color: var(--white); border-color: rgba(255,255,255,0.2); }
.newsletter-widget p { font-size: 0.88rem; opacity: 0.85; margin-bottom: 14px; }
.newsletter-widget input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  border: none;
  font-size: 0.9rem;
  margin-bottom: 10px;
  outline: none;
}
.newsletter-widget .btn { width: 100%; }

/* Tags cloud */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tags-cloud a {
  background: var(--gray-light);
  color: var(--dark);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
}
.tags-cloud a:hover { background: var(--green); color: var(--white); }

/* ========== CALCULADORAS SECTION ========== */
.tools-section {
  background: var(--green-pale);
  padding: 60px 20px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.tool-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s;
}

.tool-card:hover { transform: translateY(-3px); }
.tool-icon { font-size: 2.5rem; margin-bottom: 12px; }
.tool-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.tool-card p { font-size: 0.85rem; color: var(--gray); }

/* ========== CALCULATOR MODAL ========== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px;
  width: 100%;
  max-width: 480px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray);
}

.modal h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 20px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border 0.2s;
}
.form-group input:focus { border-color: var(--green); }

.calc-result {
  background: var(--green-pale);
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
  display: none;
}

.calc-result h4 { font-size: 0.85rem; color: var(--gray); margin-bottom: 6px; }
.calc-result .result-value { font-size: 1.8rem; font-weight: 800; color: var(--green); }

/* ========== FOOTER ========== */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 20px 30px;
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo { color: var(--white); margin-bottom: 14px; font-size: 1.2rem; }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; }

.footer-col h4 { color: var(--white); font-size: 0.95rem; font-weight: 700; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { font-size: 0.88rem; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--white); }

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 10px;
}

.disclaimer {
  background: #fff8e1;
  border-left: 4px solid #fbbf24;
  padding: 14px 20px;
  border-radius: 0 8px 8px 0;
  font-size: 0.82rem;
  color: #78350f;
  max-width: 1100px;
  margin: 0 auto 30px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-img { min-height: 160px; font-size: 3.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  nav { display: none; }
  .menu-toggle { display: block; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
}

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid #e5e7eb;
  padding: 16px 20px;
  gap: 14px;
}

.mobile-nav.open { display: flex; }
.mobile-nav a { font-size: 1rem; font-weight: 500; color: var(--dark); padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
