/* Banco BPI Design System & Styles */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

:root {
  --bpi-orange: #ea580c;
  --bpi-orange-hover: #c2410c;
  --bpi-orange-light: #fff7ed;
  --bpi-dark: #1e293b;
  --bpi-gray-bg: #f8fafc;
  --bpi-gray-card: #f1f5f9;
  --bpi-gray-border: #e2e8f0;
  --bpi-text-muted: #64748b;
  --bpi-text-main: #334155;
  --bpi-font-size-base: 14px;
  --bpi-radius: 8px;
  --bpi-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  --bpi-shadow-hover: 0 10px 25px rgba(234, 88, 12, 0.12);
}

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

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--bpi-font-size-base);
  color: var(--bpi-text-main);
  background-color: #ffffff;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ----------------------------------
   1. TOP BAR & NAVIGATION
----------------------------------- */
.top-bar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--bpi-gray-border);
  font-size: 12px;
}

.top-bar-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-segments {
  display: flex;
  list-style: none;
  overflow-x: auto;
}

.top-segments li a {
  display: block;
  padding: 8px 12px;
  color: var(--bpi-text-muted);
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
}

.top-segments li.active a,
.top-segments li a:hover {
  color: var(--bpi-orange);
}

.top-segments li.active a {
  border-bottom-color: var(--bpi-orange);
}

.top-utils {
  display: flex;
  align-items: center;
  gap: 15px;
  list-style: none;
}

.top-utils a {
  color: var(--bpi-text-muted);
  font-weight: 600;
  transition: color 0.2s;
}

.top-utils a:hover {
  color: var(--bpi-orange);
}

.lang-selector {
  color: var(--bpi-orange);
  font-weight: 700;
}

/* MAIN HEADER */
.main-header {
  background: #ffffff;
  padding: 16px 0;
  border-bottom: 1px solid var(--bpi-gray-border);
}

.main-header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-bpi {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 26px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.5px;
}

.bpi-flower-icon {
  width: 32px;
  height: 32px;
}

.brand-divider {
  height: 24px;
  width: 1px;
  background-color: var(--bpi-gray-border);
  margin: 0 4px;
}

.caixabank-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #475569;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-open-account {
  padding: 10px 22px;
  border: 1.5px solid var(--bpi-orange);
  color: var(--bpi-orange);
  background: #ffffff;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-open-account:hover {
  background-color: var(--bpi-orange-light);
}

.btn-login {
  padding: 10px 26px;
  background-color: var(--bpi-orange);
  color: #ffffff;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3);
}

.btn-login:hover {
  background-color: var(--bpi-orange-hover);
}

/* SECONDARY NAV */
.secondary-nav {
  background: #ffffff;
  padding: 12px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.secondary-nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cat-menu {
  display: flex;
  gap: 28px;
  list-style: none;
}

.cat-menu a {
  font-weight: 600;
  color: var(--bpi-text-main);
  font-size: 14px;
  transition: color 0.2s;
}

.cat-menu a:hover {
  color: var(--bpi-orange);
}

.font-size-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--bpi-text-muted);
  font-size: 13px;
}

.font-btn {
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--bpi-text-muted);
  font-weight: 600;
}

.font-btn:hover, .font-btn.active {
  color: var(--bpi-orange);
}

.font-btn-sm { font-size: 11px; }
.font-btn-md { font-size: 13px; }
.font-btn-lg { font-size: 16px; }

/* ----------------------------------
   2. HERO CAROUSEL BANNER
----------------------------------- */
.hero-section {
  max-width: 1240px;
  margin: 20px auto;
  padding: 0 20px;
}

.hero-banner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  color: #ffffff;
}

.hero-slide {
  display: none;
  width: 100%;
  padding: 40px;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 30px;
}

.hero-slide.active {
  display: grid;
}

.hero-badge {
  display: inline-block;
  background-color: var(--bpi-orange);
  color: #ffffff;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 14px;
  line-height: 1.2;
}

.hero-description {
  font-size: 14px;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 24px;
  max-width: 500px;
}

.btn-cta {
  display: inline-block;
  background-color: var(--bpi-orange);
  color: #ffffff;
  padding: 10px 28px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.4);
}

.btn-cta:hover {
  background-color: var(--bpi-orange-hover);
  transform: translateY(-1px);
}

.hero-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image-wrapper img, .hero-image-wrapper svg {
  max-width: 100%;
  max-height: 260px;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

.hero-pagination {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.dot {
  width: 24px;
  height: 4px;
  background-color: rgba(255,255,255,0.3);
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.dot.active {
  background-color: var(--bpi-orange);
  width: 32px;
}

/* ----------------------------------
   3. SIMULATION CAROUSEL SECTION
----------------------------------- */
.simulation-section {
  max-width: 1240px;
  margin: 40px auto;
  padding: 0 20px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--bpi-orange);
  margin-bottom: 20px;
}

.sim-slider-container {
  position: relative;
  display: flex;
  align-items: center;
}

.sim-slider {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px 4px;
  width: 100%;
  scrollbar-width: none;
}

.sim-slider::-webkit-scrollbar {
  display: none;
}

.sim-card {
  min-width: 220px;
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--bpi-gray-border);
  border-radius: 10px;
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.sim-card:hover {
  border-color: var(--bpi-orange);
  box-shadow: var(--bpi-shadow-hover);
  transform: translateY(-3px);
}

.sim-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  color: var(--bpi-orange);
}

.sim-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--bpi-text-main);
}

.slider-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--bpi-gray-border);
  color: var(--bpi-orange);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 2;
  transition: all 0.2s;
  flex-shrink: 0;
}

.slider-nav-btn:hover {
  background: var(--bpi-orange);
  color: #ffffff;
  border-color: var(--bpi-orange);
}

.slider-nav-btn.prev { margin-right: 8px; }
.slider-nav-btn.next { margin-left: 8px; }

/* ----------------------------------
   4. FEATURED CARDS GRID
----------------------------------- */
.grid-section {
  max-width: 1240px;
  margin: 40px auto;
  padding: 0 20px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
}

.feature-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid var(--bpi-gray-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--bpi-shadow);
  transition: all 0.3s ease;
}

.feature-card:hover {
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.card-img-wrapper {
  height: 180px;
  overflow: hidden;
  background-color: var(--bpi-gray-card);
  position: relative;
}

.card-img-wrapper img, .card-img-wrapper svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--bpi-orange);
  margin-bottom: 8px;
}

.card-desc {
  font-size: 13px;
  color: var(--bpi-text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-footer {
  margin-top: auto;
}

.btn-card {
  display: inline-block;
  padding: 8px 18px;
  background-color: var(--bpi-orange);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.btn-card:hover {
  background-color: var(--bpi-orange-hover);
}

/* ----------------------------------
   5. USEFUL INFO & NEWS SECTION
----------------------------------- */
.info-news-section {
  max-width: 1240px;
  margin: 40px auto;
  padding: 0 20px;
}

.info-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.info-card {
  background: #ffffff;
  border: 1px solid var(--bpi-gray-border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
  transition: border-color 0.2s;
}

.info-card:hover {
  border-color: var(--bpi-orange);
}

.info-card-icon {
  width: 44px;
  height: 44px;
  color: var(--bpi-orange);
  flex-shrink: 0;
}

.info-card-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--bpi-text-main);
  line-height: 1.4;
}

/* NEWS LIST */
.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.sub-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--bpi-orange);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.news-card {
  background: #ffffff;
  border: 1px solid var(--bpi-gray-border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  transition: all 0.2s;
}

.news-card:hover {
  border-color: var(--bpi-orange);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.news-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--bpi-text-main);
  line-height: 1.5;
}

.news-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 12px;
  color: var(--bpi-text-muted);
}

.news-arrow {
  color: var(--bpi-orange);
  font-weight: 700;
  font-size: 16px;
}

.view-all-link {
  color: var(--bpi-orange);
  font-weight: 700;
  font-size: 13px;
}

/* ----------------------------------
   6. QUICK ACTIONS ("EU QUERO / EU SOU")
----------------------------------- */
.quick-actions-section {
  max-width: 1240px;
  margin: 50px auto;
  padding: 0 20px;
}

.action-tabs {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--bpi-gray-border);
}

.tab-btn {
  font-size: 22px;
  font-weight: 800;
  color: var(--bpi-text-muted);
  padding-bottom: 10px;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--bpi-orange);
  border-bottom-color: var(--bpi-orange);
}

.action-items-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px 0;
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  width: 180px;
  text-align: center;
  transition: transform 0.2s;
}

.action-item:hover {
  transform: translateY(-4px);
}

.action-illustration {
  width: 90px;
  height: 90px;
  background-color: var(--bpi-orange-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bpi-orange);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.1);
}

.action-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--bpi-text-main);
}

/* ----------------------------------
   7. FOOTER
----------------------------------- */
.main-footer {
  background-color: #f1f5f9;
  border-top: 1px solid var(--bpi-gray-border);
  padding: 50px 0 30px;
  margin-top: 60px;
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
}

.footer-col-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--bpi-orange);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #475569;
  font-size: 13px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--bpi-orange);
}

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.social-icon {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background-color: var(--bpi-orange);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

/* FLOATING BTN */
.floating-top-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--bpi-orange);
  color: var(--bpi-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  cursor: pointer;
  z-index: 99;
  transition: all 0.2s;
}

.floating-top-btn:hover {
  background: var(--bpi-orange);
  color: #ffffff;
}

/* ----------------------------------
   MODAL DIALOGS
----------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

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

.modal-card {
  background: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 480px;
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  position: relative;
  animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 22px;
  color: var(--bpi-text-muted);
  cursor: pointer;
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--bpi-orange);
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--bpi-text-main);
}

.form-group input, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--bpi-gray-border);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}

.form-group input:focus {
  border-color: var(--bpi-orange);
}

.range-val {
  font-weight: 700;
  color: var(--bpi-orange);
  font-size: 16px;
  float: right;
}

.sim-result-box {
  background: var(--bpi-orange-light);
  border: 1px solid var(--bpi-orange);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  margin: 20px 0;
}

.sim-result-amount {
  font-size: 24px;
  font-weight: 800;
  color: var(--bpi-orange);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-slide { grid-template-columns: 1fr; text-align: center; }
  .hero-description { margin: 0 auto 20px; }
  .secondary-nav-container { flex-direction: column; gap: 10px; }
  .top-bar-container { overflow-x: auto; }
}
