/* Análisis Claro - Custom Styles */
/* Inspired by the provided design mockup with clean lines, borders, and structured layout */

:root {
  /* Color Palette */
  --bg-primary: #fbfffc;
  --bg-header-footer: #1a1a1a;
  --accent-primary: #1d5d41;
  --accent-secondary: #198754;
  --accent-tertiary: #dc8b35;
  --color-light-gray: #dee2e6;
  --color-lighter-gray: #f8f9fa;
  --color-dark-green: #1d4136;
  
  /* Typography */
  --font-family: "Nunito", sans-serif;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  
  /* Spacing */
  --section-padding: 4rem 0;
  --container-max-width: 1200px;
  
  /* Borders & Shadows */
  --border-radius-sm: 0.375rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-width: 1px;
  --border-color: var(--color-light-gray);
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Global Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family) !important;
  font-weight: var(--font-weight-regular);
  background-color: var(--bg-primary);
  color: #333;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family) !important;
  font-weight: var(--font-weight-bold);
  color: var(--color-dark-green);
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: var(--font-weight-extrabold);
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
}

h3 {
  font-size: 1.5rem;
  font-weight: var(--font-weight-semibold);
}

p {
  margin-bottom: 1rem;
  color: #555;
}

/* Header Styles */
.navbar {
  background-color: var(--bg-header-footer) !important;
  padding: 1rem 0;
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-size: 1.75rem;
  font-weight: var(--font-weight-extrabold);
  color: white !important;
  text-decoration: none;
}

.navbar-nav .nav-link {
  color: #ccc !important;
  font-weight: var(--font-weight-medium);
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--accent-secondary) !important;
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, rgba(29, 93, 65, 0.8), rgba(29, 65, 54, 0.9));
  color: white;
  padding: 10rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3rem;
  font-weight: var(--font-weight-extrabold);
  color: white;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: var(--font-weight-regular);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  max-width: 600px;
}

/* Buttons */
.btn-primary-custom {
  background-color: var(--accent-secondary);
  border: 2px solid var(--accent-secondary);
  color: white;
  font-weight: var(--font-weight-semibold);
  padding: 0.75rem 2rem;
  border-radius: var(--border-radius-md);
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary-custom:hover {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline-custom {
  background-color: transparent;
  border: 2px solid var(--accent-secondary);
  color: var(--accent-secondary);
  font-weight: var(--font-weight-semibold);
  padding: 0.75rem 2rem;
  border-radius: var(--border-radius-md);
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-outline-custom:hover {
  background-color: var(--accent-secondary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Section Styles */
.section {
  padding: var(--section-padding);
  position: relative;
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
  margin: 2rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 2px;
}

/* Card Styles - Inspired by the mockup */
.card-custom {
  background: white;
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.card-custom:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.card-custom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
}

.card-custom .card-body {
  padding: 2rem;
}

.card-custom .card-title {
  font-size: 1.25rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-dark-green);
  margin-bottom: 1rem;
}

.card-custom .card-text {
  color: #666;
  line-height: 1.6;
}

/* Data Cards - Like in the mockup */
.data-card {
  background: white;
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.data-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.data-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.data-card .icon {
  font-size: 2.5rem;
  color: var(--accent-secondary);
  margin-bottom: 1rem;
}

.data-card .title {
  font-size: 1.1rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-dark-green);
  margin-bottom: 0.5rem;
}

.data-card .value {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--accent-primary);
  margin-bottom: 0.25rem;
}

.data-card .change {
  font-size: 0.9rem;
  font-weight: var(--font-weight-medium);
}

.data-card .change.positive {
  color: var(--accent-secondary);
}

.data-card .change.negative {
  color: #dc3545;
}

/* News Cards */
.news-card {
  background: white;
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.news-card img {
  width: 100%;
  height: 290px;
  object-fit: cover;
}

.news-card .card-body {
  padding: 1.5rem;
}

.news-card .date {
  font-size: 0.85rem;
  color: var(--accent-secondary);
  font-weight: var(--font-weight-medium);
  margin-bottom: 0.5rem;
}

.news-card .title {
  font-size: 1.1rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-dark-green);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.news-card .excerpt {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Chart Section */
.chart-section {
  background: var(--color-lighter-gray);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  margin: 2rem 0;
  border: var(--border-width) solid var(--border-color);
}

.chart-container {
  position: relative;
  text-align: center;
}

.chart-container img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
}

.chart-description {
  margin-top: 1.5rem;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Pattern Analysis Section - Like mockup image 1 */
.pattern-analysis {
  background: white;
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  margin: 2rem 0;
}

.pattern-item {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-light-gray);
}

.pattern-item:last-child {
  border-bottom: none;
}

.pattern-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-secondary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-weight: var(--font-weight-bold);
}

.pattern-content {
  flex: 1;
}

.pattern-title {
  font-weight: var(--font-weight-semibold);
  color: var(--color-dark-green);
  margin-bottom: 0.25rem;
}

.pattern-subtitle {
  font-size: 0.9rem;
  color: #666;
}

.pattern-value {
  font-size: 1.1rem;
  font-weight: var(--font-weight-bold);
  color: var(--accent-primary);
  margin-left: auto;
}

/* Footer */
.footer {
  background-color: var(--bg-header-footer);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer h5 {
  color: white;
  font-weight: var(--font-weight-semibold);
  margin-bottom: 1rem;
}

.footer a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer p {
  color: #ccc;
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer a:hover {
  color: var(--accent-secondary);
}

.footer .list-unstyled li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 1rem;
  margin-top: 2rem;
  text-align: center;
  color: #999;
  font-size: 0.9rem;
}

.risk-disclaimer {
  background: var(--color-dark-green);
  color: #ccc;
  padding: 1rem;
  border-radius: var(--border-radius-md);
  margin-top: 2rem;
  font-size: 0.85rem;
  line-height: 1.5;
  border-left: 4px solid var(--accent-tertiary);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-header-footer);
  color: white;
  padding: 1rem;
  z-index: 1050;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner .btn {
  margin: 0 0.5rem;
}

/* Form Styles */
.form-control {
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 0.75rem 1rem;
  font-family: var(--font-family);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.form-label {
  font-weight: var(--font-weight-medium);
  color: var(--color-dark-green);
  margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .card-custom .card-body {
    padding: 1.5rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .btn-primary-custom,
  .btn-outline-custom {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Utility Classes */
.text-accent-primary {
  color: var(--accent-primary) !important;
}

.text-accent-secondary {
  color: var(--accent-secondary) !important;
}

.bg-accent-primary {
  background-color: var(--accent-primary) !important;
}

.bg-accent-secondary {
  background-color: var(--accent-secondary) !important;
}

.border-accent {
  border-color: var(--accent-secondary) !important;
}

.border-left-accent {
  border-left: 4px solid var(--accent-secondary) !important;
}

.border-top-accent {
  border-top: 3px solid var(--accent-secondary) !important;
}
