@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --success-color: #10b981;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}

/* Navbar */
.navbar {
  background-color: var(--card-bg);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.logo img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* Main Layout */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.hero {
  text-align: center;
  margin-bottom: 4rem;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Grid layout for categories */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.category-card {
  background: var(--card-bg);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  border: 1px solid var(--border-color);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: inline-block;
  background: #eff6ff;
  width: 80px;
  height: 80px;
  line-height: 80px;
  border-radius: 50%;
  color: var(--primary-color);
}

.category-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.category-card p {
  color: var(--text-muted);
}

/* Converter Tool Styles */
.converter-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.converter-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .converter-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}

.form-control {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
  background-color: var(--bg-color);
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.swap-btn {
  background: #eff6ff;
  color: var(--primary-color);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  margin-bottom: 2px;
}

.swap-btn:hover {
  background: #dbeafe;
  transform: rotate(180deg);
}

.result-box {
  margin-top: 2rem;
  padding: 2rem;
  background: #eff6ff;
  border-radius: 1rem;
  text-align: center;
  border: 2px dashed #bfdbfe;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s;
}

.result-box:hover {
  background: #dbeafe;
}

.result-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  word-break: break-all;
}

.result-equation {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.copy-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.copy-toast {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--success-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}

.result-box.copied .copy-toast {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

/* SEO Content Section */
.seo-content {
  max-width: 800px;
  margin: 4rem auto;
}

.seo-content h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.seo-content h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.seo-content p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.faq-section {
  margin-top: 3rem;
}

.faq-item {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.faq-item h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

/* Footer */
footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
  margin-top: auto;
}

/* Quick links pill tags */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  justify-content: center;
}

.pill {
  background: #f1f5f9;
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}

.pill:hover {
  background: var(--primary-color);
  color: white;
}

/* Internal Links Grid */
.internal-links-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.5rem 0;
  padding: 0;
}

.internal-links-list li a {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.internal-links-list li a::before {
  content: "🔗";
  margin-right: 0.5rem;
  font-size: 0.9em;
}

.internal-links-list li a:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.secondary-links-box {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 0.75rem;
  border-left: 4px solid var(--primary-color);
  margin-top: 2rem;
}

.secondary-links-box a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.secondary-links-box a:hover {
  text-decoration: underline;
}

/* Tarjetas Financieras */
.finance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .finance-grid {
        grid-template-columns: 1fr;
    }
}

.finance-card {
    background: var(--card-bg);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.finance-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.finance-card-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.finance-card:hover .finance-card-img {
    transform: scale(1.05);
}

.finance-card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.finance-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    font-weight: 800;
    line-height: 1.3;
}

.finance-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.badge {
    display: inline-block;
    align-self: flex-start;
    background: var(--primary-color);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* Legal Footer Links */
.footer-links {
    margin-top: 1rem;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 10px;
}
.footer-links a:hover {
    color: var(--primary-color);
}

/* Breadcrumbs Yoast Style */
.breadcrumbs {
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.85rem;
  color: #718096;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
  content: "»";
  margin: 0 0.75rem;
  color: #cbd5e0;
  font-size: 1rem;
}

.breadcrumbs a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 500;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: var(--text-main);
  text-decoration: underline;
}

.breadcrumbs li:last-child {
  color: #4a5568;
  font-weight: 400;
}
