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

:root {
  font-family: 'Inter', system-ui, Avenir, Helvetica, Arial, sans-serif;
  --blue: #3b82f6;
  --green: #10b981;
  --purple: #8b5cf6;
  --amber: #f59e0b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: #f8fafc;
  color: #334155;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

h1, h2, h3 {
  margin-top: 0;
}

a {
  text-decoration: none;
  color: var(--blue);
  transition: color 0.2s ease;
}

a:hover {
  color: #2563eb;
}

button {
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: none;
  font-family: inherit;
}

button:active {
  transform: scale(0.98);
}

/* Navbar */
.navbar {
  background-color: #1f2937;
  color: white;
  padding: 16px 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-icon {
  height: 40px;
  width: 40px;
  background: white;
  color: #2563eb;
  font-weight: 700;
  font-size: 24px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 8px;
}

.logo-text {
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.25rem;
}

.logo-subtext {
  margin-top: 6px;          /* add space below main logo text */
  color: var(--blue);       /* use your defined blue color */
  font-size: 1rem;          /* bigger font size than before */
  line-height: 1.2rem;      /* adjust line height nicely */
  font-weight: 600;         /* slightly bolder for better readability */
}


.nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: white;
  font-weight: 600;
  font-size: 1rem;
}

.nav-links li a:hover {
  color: #60a5fa;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 80px 16px;
  text-align: center;
  color: white;
  background-image: url('images/indian-flag.jpg'); /* <-- Replace with your image path */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4); /* dark overlay for text readability */
  z-index: 0;
}

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

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-content p {
  font-size: 1.125rem;
  margin-bottom: 32px;
}

/* Updated to replace 'Reliable' with 'Foreign' in the hero paragraph */
/* You can also update the HTML text directly */

.btn-primary {
  background-color: white;
  color: #3b82f6;
  padding: 12px 28px;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
  transition: background-color 0.2s ease;
}

.btn-primary:hover {
  background-color: #dbeafe;
}

/* Calculator Section */
/* Calculator container flex: arrange inputs horizontally with gap */
.calculator-box {
  background-color: white;
  padding: 32px 48px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-width: 900px;
  margin: 0 auto 48px auto;
  overflow: hidden;         /* <-- Add this */
  box-sizing: border-box;   /* <-- Ensures proper sizing */
}


.calculator {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap; /* allow wrap on smaller screens */
  width: 100%;
  max-width: 860px;
}


.currency-select, .amount-input {
  flex: 1 1 280px; /* flex-grow, flex-shrink, flex-basis */
  display: flex;
  flex-direction: column;
  min-width: 0; /* let container control actual width */
  max-width: 100%;
}



.currency-select label, .amount-input label {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 6px;
}

.currency-select select, .amount-input input[type="number"] {
  padding: 10px 14px;
  font-size: 1.1rem;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  appearance: none; /* remove default styling for dropdown */
  background-color: white;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  font-family: inherit;
}

.currency-select select:focus, .amount-input input[type="number"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
  border-color: #3b82f6;
}

/* For better dropdown arrow - keep default but consistent */
.currency-select select {
  background-image: url("data:image/svg+xml;charset=...");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 10px 5px;
  padding: 10px 48px 10px 12px;
  font-size: 1rem;
  white-space: normal;
}


/* Swap button */
#swap-btn {
  font-size: 2rem;
  background: var(--blue);
  color: white;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
  margin-top: 24px;
}

#swap-btn:hover {
  background-color: #2563eb;
}

/* Converted amount centered */
.converted-result {
  flex-basis: 100%;
  margin-top: 24px;
  text-align: center;
}

.converted-result p:first-child {
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 1.125rem;
  color: #64748b;
}

#converted-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .calculator {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .currency-select,
  .amount-input {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }

  .calculator-box {
    padding: 24px;
  }

  #swap-btn {
    align-self: center;
    margin: 16px 0;
  }
}





/* Rates Section */
#rates {
  margin: 32px 0 64px 0;
  overflow-x: auto;
}

/* Removed old table styles, replaced with cards below */

/* New: Rates cards container */
.rates-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Individual rate card */
.rate-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgb(0 0 0 / 0.1);
  padding: 16px;
  text-align: center;
  transition: transform 0.2s ease;
  cursor: default;
}

.rate-card:hover {
  transform: translateY(-4px);
}

/* Flag icon styling for rate cards */
.rate-card .flag-icon {
  width: 48px;
  height: 36px;
  border-radius: 4px;
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
  margin: 0 auto 12px auto;
  box-shadow: 0 0 6px rgb(0 0 0 / 0.1);
  display: inline-block;
}

.rate-card .currency-code {
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 6px;
  color: var(--blue);
}

.rate-card .currency-name {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 10px;
}

.rate-card .currency-rate {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--green);
}

/* FAQ Section */
.faq-section {
  margin-bottom: 80px;
  text-align: center;
}

.faq-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.faq-section p {
  max-width: 600px;
  margin: 0 auto 24px auto;
  color: #64748b;
  font-size: 1rem;
}

.faq-list {
  max-width: 700px;
  margin: 0 auto 40px auto;
  text-align: left;
}

.faq-item {
  margin-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 12px;
}

.faq-question {
  font-weight: 600;
  cursor: pointer;
  position: relative;
  padding-right: 24px;
  outline: none;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-weight: 700;
  font-size: 18px;
  transition: transform 0.3s ease;
}

.faq-item.open .faq-question::after {
  content: "-";
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  color: #475569;
  margin-top: 8px;
}

.faq-item.open .faq-answer {
  max-height: 500px; /* enough to show content */
}

.contact-support {
  margin-top: 24px;
}

.btn-secondary {
  display: inline-block;
  background-color: var(--blue);
  color: white;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  transition: background-color 0.2s ease;
}

.btn-secondary:hover {
  background-color: #2563eb;
}

/* Footer */
.footer-section {
  background-color: #111827;
  color: #cbd5e1;
  padding: 60px 16px 24px 16px;
}

.footer-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 40px;
  margin-bottom: 24px;
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.footer-logo .logo-icon {
  background: white;
  color: #3b82f6;
  font-weight: 700;
  font-size: 28px;
  height: 48px;
  width: 48px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
}

.footer-logo .logo-text {
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.25rem;
  color: white;
}

.footer-logo .logo-subtext {
  font-size: 0.75rem;
  color: #3b82f6;
  line-height: 1rem;
  margin-top: 4px;
}

.footer-description {
  color: #94a3b8;
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.social-icons {
  display: flex;
  gap: 12px;
}

.social-link {
  color: #94a3b8;
  transition: color 0.3s ease;
}

.social-link:hover {
  color: white;
}

.social-link .icon {
  width: 24px;
  height: 24px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
  color: #94a3b8;
  font-weight: 400;
}

.footer-links li a {
  color: #94a3b8;
  font-weight: 400;
}

.footer-links li a:hover {
  color: white;
}

.contact-info {
  list-style: none;
  padding: 0;
  margin: 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

.contact-info li {
  margin-bottom: 10px;
  display: flex;
  align-items: start;
  gap: 6px;
}

.contact-info .icon {
  font-size: 1.2rem;
  margin-top: 2px;
}

/* Footer bottom */
.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 16px;
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
}

.footer-bottom a {
  color: #64748b;
  margin: 0 6px;
}

.footer-bottom a:hover {
  color: white;
}

