/* ===== CSS Reset & Global ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Roboto, 'Noto Sans', Arial, sans-serif;
  background: #f4f7fc;
  color: #1e293b;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Selection ===== */
::selection {
  background: #2563eb;
  color: white;
}

::-moz-selection {
  background: #2563eb;
  color: white;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* ===== Blue Header - Fixed Single Row ===== */
.header {
  background: linear-gradient(135deg, #0f3b7a 0%, #1a4d8f 100%);
  color: white;
  padding: 0.8rem 1.5rem;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  text-decoration: none;
  color: white;
}

.logo-icon {
  font-size: 1.8rem;
  line-height: 1;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  transition: 0.2s;
  line-height: 1;
  flex-shrink: 0;
}

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-menu::-webkit-scrollbar {
  display: none;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: white;
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 70%;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: rgba(255,255,255,0.2);
}

.header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

.search-box {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 30px;
  padding: 0.25rem 0.25rem 0.25rem 1rem;
  width: 240px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s ease;
}

.search-box:focus-within {
  box-shadow: 0 4px 20px rgba(37,99,235,0.3);
}

.search-box input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.9rem;
  background: transparent;
  color: #0f172a;
  min-width: 0;
}

.search-box button {
  background: #2563eb;
  border: none;
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.search-box button:hover {
  background: #1d4ed8;
  transform: scale(1.05);
}

.search-box button:active {
  transform: scale(0.95);
}

/* ===== Main Layout ===== */
.main-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.5rem;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}

.emi-section {
  flex: 1 1 400px;
  background: white;
  border-radius: 20px;
  padding: 1.8rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-width: 0;
  transition: box-shadow 0.3s ease;
}

.emi-section:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f3b7a;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 3px solid #2563eb;
  padding-bottom: 0.5rem;
  flex-wrap: wrap;
}

.calculator-formula-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.calculator-box {
  flex: 1 1 280px;
  background: #f8fafd;
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  min-width: 250px;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.calculator-box:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  border-color: #cbd5e1;
}

.calculator-box select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
  transition: 0.2s;
  background: white;
  color: #1e293b;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.calculator-box select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.calculator-box textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
  transition: 0.2s;
  resize: vertical;
  font-family: inherit;
}

.calculator-box textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.calculator-box input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: #e2e8f0;
  border-radius: 10px;
  outline: none;
  cursor: pointer;
}

.calculator-box input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.calculator-box input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.calculator-box input[type="color"] {
  width: 100%;
  height: 45px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  cursor: pointer;
  padding: 4px;
}

.calculator-box input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  cursor: pointer;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.calculator-box small {
  display: block;
  margin-top: 0.2rem;
}

.calculator-box button:not(.calculate-btn) {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.calculator-box button:not(.calculate-btn):hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.calculator-box button:not(.calculate-btn):active {
  transform: scale(0.97);
}

.formula-box {
  flex: 1 1 280px;
  background: #fff7ed;
  border-left: 5px solid #ea580c;
  padding: 1.2rem;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #7c2d12;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid #fed7aa;
  border-left: 5px solid #ea580c;
  min-width: 250px;
  line-height: 1.7;
}

.formula-box strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: #9a3412;
}

.formula-box p {
  margin-bottom: 0.3rem;
}

.formula-box a {
  color: #ea580c;
  text-decoration: none;
  font-weight: 600;
}

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

.input-group {
  margin-bottom: 1rem;
}

.input-group label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.3rem;
  color: #1e3a5f;
  font-size: 0.9rem;
}

.input-group input:not([type="checkbox"]):not([type="range"]):not([type="color"]) {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
  transition: 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.input-group input:not([type="checkbox"]):not([type="range"]):not([type="color"]):focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.input-group input[readonly] {
  background: #e9ecef;
  color: #495057;
  cursor: default;
  font-weight: 600;
}

.calculate-btn {
  background: linear-gradient(135deg, #0f3b7a 0%, #1a4d8f 100%);
  color: white;
  font-weight: 700;
  padding: 0.9rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.calculate-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.calculate-btn:active::after {
  width: 300px;
  height: 300px;
}

.calculate-btn:hover {
  background: linear-gradient(135deg, #0b2c5c 0%, #153d75 100%);
  box-shadow: 0 6px 20px rgba(15,59,122,0.3);
  transform: translateY(-1px);
}

.calculate-btn:active {
  transform: scale(0.97);
}

.emi-result {
  background: #e6f0ff;
  padding: 0.9rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  color: #0f3b7a;
  margin-top: 0.8rem;
  border: 1px solid #bfdbfe;
  word-break: break-word;
  transition: all 0.3s ease;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.ad-space {
  background: #ffffff;
  border: 2px dashed #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #475569;
  font-weight: 500;
  border-radius: 16px;
  background: #f1f5f9;
  transition: 0.2s;
  overflow: hidden;
  padding: 1rem;
}

.side-ad {
  flex: 0 0 250px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #eef2ff;
  border: 2px dashed #6366f1;
  border-radius: 20px;
}

.content-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  max-width: 1300px;
  margin: 0 auto 1.5rem;
  padding: 0 1.5rem;
  width: 100%;
}

.content-text {
  flex: 1 1 55%;
  background: white;
  padding: 1.8rem;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.04);
  border: 1px solid #e2e8f0;
  min-width: 280px;
}

.content-text h3 {
  color: #0f3b7a;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.content-text p {
  margin-bottom: 0.8rem;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.8;
}

.content-text ul,
.content-text ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.content-text ul li,
.content-text ol li {
  margin-bottom: 0.4rem;
  color: #334155;
}

.content-text a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.content-text a:hover {
  text-decoration: underline;
}

.ad-300x600 {
  flex: 0 0 300px;
  min-height: 600px;
  background: #fef9c3;
  border: 2px dashed #ca8a04;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  font-weight: 600;
}

.tools-section {
  max-width: 1300px;
  margin: 0 auto 1.8rem;
  padding: 0 1.5rem;
  width: 100%;
}

.tools-outer-box {
  background: white;
  border-radius: 20px;
  padding: 1.8rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.04);
  border: 1px solid #e2e8f0;
}

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

.tool-card {
  background: #f8fafd;
  padding: 1rem 0.6rem;
  text-align: center;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  font-weight: 600;
  font-size: 0.85rem;
  color: #1e3a5f;
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 70px;
  word-break: break-word;
  touch-action: manipulation;
  text-decoration: none;
}

.tool-card:hover {
  background: #2563eb;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(37,99,235,0.25);
  border-color: #2563eb;
}

.tool-card:hover .tool-name {
  color: white;
}

.tool-card:active {
  transform: scale(0.95);
}

.tool-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.tool-name {
  font-size: 0.8rem;
  line-height: 1.3;
  color: #1e3a5f;
}

.horizontal-ad-wrapper {
  max-width: 1300px;
  margin: 0 auto 1.8rem;
  padding: 0 1.5rem;
  width: 100%;
}

.horizontal-ad {
  min-height: 120px;
  background: #e0f2fe;
  border: 2px dashed #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-weight: 500;
  color: #475569;
  padding: 1rem;
  text-align: center;
}

.faq-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  max-width: 1300px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
  width: 100%;
}

.faq-box {
  flex: 1 1 60%;
  background: white;
  padding: 1.8rem;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.04);
  border: 1px solid #e2e8f0;
  min-width: 280px;
}

.faq-item {
  margin-bottom: 1.2rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.8rem;
}

.faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.faq-question {
  font-weight: 700;
  color: #0f3b7a;
  margin-bottom: 0.3rem;
  font-size: 1rem;
  cursor: default;
}

.faq-item p {
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.7;
}

.ad-300x250 {
  flex: 0 0 300px;
  min-height: 250px;
  background: #ede9fe;
  border: 2px dashed #7c3aed;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  font-weight: 600;
}

/* ===== Footer ===== */
.footer {
  background: linear-gradient(135deg, #0f3b7a 0%, #0d3568 100%);
  color: #e0e7ff;
  padding: 2.5rem 1.5rem 1.5rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-col h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: #2563eb;
  border-radius: 2px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-col ul li a:hover {
  color: white;
  transform: translateX(5px);
}

.footer-col p {
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.footer-social a {
  background: rgba(255,255,255,0.1);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: #2563eb;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(37,99,235,0.4);
}

.footer-bottom {
  max-width: 1300px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* ===== Table Styles (for calculator tables) ===== */
.loan-comparison {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 10px;
}

.loan-comparison h3 {
  color: #0f3b7a;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.loan-comparison table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.loan-comparison table thead tr {
  color: white;
}

.loan-comparison table th {
  padding: 10px;
  border: 1px solid #ddd;
  font-weight: 600;
}

.loan-comparison table td {
  padding: 8px;
  border: 1px solid #ddd;
}

.loan-comparison table tbody tr {
  transition: background 0.2s;
}

.loan-comparison table tbody tr:hover {
  background: #e8f5e9 !important;
}

/* ===== Print Styles ===== */
@media print {
  .header,
  .footer,
  .ad-space,
  .side-ad,
  .ad-300x600,
  .ad-300x250,
  .horizontal-ad-wrapper,
  .tools-section,
  .search-box {
    display: none !important;
  }
  
  body {
    background: white;
  }
  
  .main-container,
  .content-row,
  .faq-row {
    padding: 0;
    margin: 0;
  }
}

/* ===== Focus Visible for Accessibility ===== */
:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Loading Skeleton Animation ===== */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1024px) {
  .header {
    padding: 0.7rem 1rem;
    gap: 0.8rem;
  }
  .nav-menu a {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
  }
  .search-box {
    width: 200px;
  }
  .main-container {
    gap: 1.2rem;
    padding: 1.2rem;
  }
  .emi-section {
    padding: 1.5rem;
  }
  .section-title {
    font-size: 1.4rem;
  }
  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.7rem;
  }
  .tool-icon {
    font-size: 1.3rem;
  }
  .tool-name {
    font-size: 0.75rem;
  }
  .content-row,
  .faq-row {
    padding: 0 1.2rem;
    gap: 1.2rem;
  }
  .tools-section,
  .horizontal-ad-wrapper {
    padding: 0 1.2rem;
  }
}

@media (max-width: 900px) {
  .calculator-formula-row {
    flex-direction: column;
  }
  .formula-box {
    border-left: none;
    border-top: 5px solid #ea580c;
  }
  .side-ad,
  .ad-300x600,
  .ad-300x250 {
    flex: 1 1 100%;
  }
  .side-ad {
    min-height: 200px;
  }
  .ad-300x600 {
    min-height: 350px;
  }
  .ad-300x250 {
    min-height: 200px;
  }
  .content-text,
  .faq-box {
    flex: 1 1 100%;
  }
}

@media (max-width: 768px) {
  .header {
    flex-wrap: wrap;
    padding: 0.7rem 1rem;
    gap: 0.6rem;
  }
  .header-left {
    flex: 1;
    justify-content: space-between;
  }
  .logo-text {
    font-size: 1.2rem;
  }
  .logo-icon {
    font-size: 1.4rem;
  }
  .mobile-menu-btn {
    display: block;
  }
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #0d3568;
    border-radius: 10px;
    padding: 0.4rem;
    gap: 0.15rem;
    order: 3;
    flex-basis: 100%;
    overflow-x: visible;
  }
  .nav-menu.active {
    display: flex;
  }
  .nav-menu a {
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    width: 100%;
  }
  .header-right {
    order: 2;
    flex: 1 1 auto;
    margin-left: 0;
    min-width: 0;
  }
  .search-box {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0.2rem 0.2rem 0.2rem 0.8rem;
  }
  .search-box input {
    font-size: 0.85rem;
  }
  .search-box button {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  .main-container {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  .emi-section {
    padding: 1.2rem;
    border-radius: 16px;
  }
  .section-title {
    font-size: 1.3rem;
  }
  .calculator-box,
  .formula-box {
    min-width: 100%;
    padding: 1rem;
  }
  .formula-box strong {
    font-size: 0.95rem;
  }
  .formula-box {
    font-size: 0.85rem;
  }
  .input-group input:not([type="checkbox"]):not([type="range"]):not([type="color"]) {
    padding: 0.7rem;
    font-size: 16px;
    border-radius: 10px;
  }
  .calculate-btn {
    padding: 0.85rem;
    font-size: 1rem;
  }
  .emi-result {
    font-size: 1rem;
    padding: 0.8rem;
  }
  .side-ad {
    min-height: 180px;
    border-radius: 16px;
  }
  .content-row {
    flex-direction: column;
    padding: 0 1rem;
    gap: 1rem;
  }
  .content-text {
    padding: 1.2rem;
    border-radius: 16px;
  }
  .content-text h3 {
    font-size: 1.2rem;
  }
  .content-text p {
    font-size: 0.9rem;
  }
  .ad-300x600 {
    min-height: 300px;
    border-radius: 16px;
  }
  .tools-section {
    padding: 0 1rem;
    margin: 0 auto 1.2rem;
  }
  .tools-outer-box {
    padding: 1.2rem;
    border-radius: 16px;
  }
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  .tool-card {
    font-size: 0.75rem;
    padding: 0.7rem 0.3rem;
    min-height: 55px;
    border-radius: 10px;
    gap: 0.3rem;
  }
  .tool-icon {
    font-size: 1.2rem;
  }
  .tool-name {
    font-size: 0.7rem;
  }
  .horizontal-ad-wrapper {
    padding: 0 1rem;
    margin: 0 auto 1.2rem;
  }
  .horizontal-ad {
    min-height: 100px;
    border-radius: 12px;
    font-size: 0.85rem;
  }
  .faq-row {
    flex-direction: column;
    padding: 0 1rem;
    gap: 1rem;
    margin: 0 auto 1.5rem;
  }
  .faq-box {
    padding: 1.2rem;
    border-radius: 16px;
  }
  .faq-question {
    font-size: 0.95rem;
  }
  .faq-item p {
    font-size: 0.85rem;
  }
  .ad-300x250 {
    min-height: 200px;
    border-radius: 16px;
  }
  .footer {
    padding: 2rem 1rem 1.2rem;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .footer-bottom-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0.6rem 0.8rem;
    gap: 0.5rem;
  }
  .logo-text {
    font-size: 1.1rem;
  }
  .logo-icon {
    font-size: 1.3rem;
  }
  .mobile-menu-btn {
    font-size: 1.4rem;
  }
  .search-box {
    padding: 0.15rem 0.15rem 0.15rem 0.7rem;
  }
  .search-box input {
    font-size: 0.8rem;
  }
  .search-box button {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
  }
  .main-container {
    padding: 0.8rem;
    gap: 0.8rem;
  }
  .emi-section {
    padding: 1rem;
    gap: 0.8rem;
  }
  .section-title {
    font-size: 1.2rem;
  }
  .calculator-box {
    padding: 1rem;
  }
  .formula-box {
    padding: 0.8rem;
    font-size: 0.8rem;
  }
  .formula-box strong {
    font-size: 0.9rem;
  }
  .input-group {
    margin-bottom: 0.8rem;
  }
  .input-group label {
    font-size: 0.8rem;
  }
  .input-group input:not([type="checkbox"]):not([type="range"]):not([type="color"]) {
    padding: 0.6rem;
    font-size: 16px;
  }
  .calculate-btn {
    padding: 0.75rem;
    font-size: 0.95rem;
  }
  .emi-result {
    font-size: 0.95rem;
    padding: 0.7rem;
  }
  .content-text {
    padding: 1rem;
  }
  .content-text h3 {
    font-size: 1.1rem;
  }
  .content-text p {
    font-size: 0.85rem;
  }
  .tools-outer-box {
    padding: 1rem;
  }
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }
  .tool-card {
    font-size: 0.7rem;
    padding: 0.6rem 0.2rem;
    min-height: 50px;
    border-radius: 8px;
    gap: 0.25rem;
  }
  .tool-icon {
    font-size: 1.1rem;
  }
  .tool-name {
    font-size: 0.65rem;
  }
  .faq-box {
    padding: 1rem;
  }
  .faq-question {
    font-size: 0.9rem;
  }
  .faq-item p {
    font-size: 0.8rem;
  }
}

@media (max-width: 350px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem;
  }
  .tool-card {
    font-size: 0.65rem;
    padding: 0.5rem 0.15rem;
    min-height: 44px;
  }
  .tool-icon {
    font-size: 1rem;
  }
  .tool-name {
    font-size: 0.6rem;
  }
  .section-title {
    font-size: 1.1rem;
  }
}