:root {
  --primary-color: #FFB7B2;
  /* Pastel Pink */
  --primary-dark: #FF9E99;
  --secondary-color: #FFDAC1;
  /* Peach */
  --accent-color: #E2F0CB;
  /* Pastel Green */
  --bg-color: #FFF5F5;
  /* Very light pink background */
  --text-color: #4A4A4A;
  --text-light: #666;
  --white: #FFFFFF;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  --card-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* Header */
header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links a {
  margin-left: 20px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* Hero & Calculator Section */
.hero {
  text-align: center;
  padding: 4rem 0;
  background: white;
  border-bottom: 1px solid #f0f0f0;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.hero p {
  color: #666;
  margin-bottom: 2rem;
}

.calculator-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  margin: 0 auto;
  border: 2px solid var(--primary-color);
  /* Ensure card is above ads */
  position: relative;
  z-index: 100;
  /* Increased to definitely be on top */
}

.input-group {

  margin-bottom: 1.5rem;
  text-align: left;
}

/* ... existing code ... */

/* AdSense Placeholders & Containers */
.ad-container {
  margin: 2rem auto;
  text-align: center;
  max-width: 100%;
  min-height: 100px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  /* Lower than card */
}



.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-color);
}

.input-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.calc-btn {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 12px 24px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  transition: transform 0.2s, background-color 0.3s;
  touch-action: manipulation;
  /* Improves touch response on mobile */
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.calc-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

.calc-btn:active {
  transform: translateY(0);
}

/* Result Section */
#result {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--bg-color);
  border-radius: 8px;
  display: none;
  animation: fadeIn 0.5s ease;
  position: relative;
  /* Context for z-index */
  z-index: 9;
}

.result-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed #ddd;
}

.result-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.result-label {
  font-size: 0.9rem;
  color: #666;
}

.result-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-color);
}

.highlight {
  color: var(--primary-color);
  font-size: 1.5rem;
}

/* Alarm Button */
.result-actions {
  margin-top: 1.5rem;
  text-align: center;
}

.alarm-btn {
  background-color: #fff;
  color: var(--text-color);
  border: 2px solid var(--primary-color);
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 25px;
  cursor: pointer;
  width: 100%;
  max-width: 300px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s;
  touch-action: manipulation;
}

.alarm-btn:hover {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 4px 10px rgba(255, 183, 178, 0.4);
}

.alarm-note {
  font-size: 0.8rem;
  color: #999;
  margin-top: 5px;
}

/* Use Cases Section (New) */
.use-cases-section {
  padding: 4rem 0;
  background-color: #f8f9fa;
  /* Matches reference light gray bg */
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.badge {
  background-color: #eef2ff;
  color: var(--primary-color);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
  display: inline-block;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #222;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease;
  border: 1px solid #e1e4e8;
  /* Slightly darker border for 'frame' feel */
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 15px;
  align-items: start;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.icon {
  grid-column: 1;
  grid-row: 1;
  font-size: 1.5rem;
  background: #fff5f5;
  color: var(--primary-color);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 0;
}

.card h3 {
  grid-column: 2;
  grid-row: 1;
  font-size: 1.1rem;
  color: #333;
  align-self: center;
  margin-bottom: 0;
  font-weight: 700;
}

.card p {
  grid-column: 1 / -1;
  /* Span full width */
  grid-row: 2;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: 1rem;
}


/* Content Section (SEO) */
.content-section {
  padding: 3rem 0;
  background-color: var(--white);
}

.article {
  max-width: 800px;
  margin: 0 auto;
  border-top: 1px solid #eee;
  padding-top: 3rem;
}

.article h2 {
  color: var(--text-color);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.article p {
  margin-bottom: 1rem;
  color: #555;
  line-height: 1.8;
}

.article ul {
  padding-left: 20px;
  margin-bottom: 1rem;
  color: #555;
}

.article li {
  margin-bottom: 0.5rem;
}

/* FAQ Accordion */
.faq-container {
  margin-top: 4rem;
  border-top: 1px solid #eee;
  padding-top: 2rem;
}

.faq-header {
  margin-bottom: 2rem;
}

.faq-header h2 {
  font-size: 2rem;
  color: #111;
  margin-bottom: 0.5rem;
}

.faq-header p {
  color: #666;
}

.faq-item {
  border-bottom: 1px solid #eee;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1.5rem 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.3s;
}

.faq-question:hover {
  color: var(--primary-color);
}

.faq-icon {
  font-size: 1.5rem;
  color: #999;
  transition: transform 0.3s;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-answer p {
  padding-bottom: 1.5rem;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* Active State */
.faq-item.active .faq-icon {
  transform: rotate(45deg);
  /* Turns + into x, nicely */
}

.faq-item.active .faq-answer {
  max-height: 200px;
  /* Arbitrary large height */
}

/* AdSense Placeholders & Containers */
.ad-container {
  margin: 2rem auto;
  text-align: center;
  max-width: 100%;
  min-height: 100px;
  /* Prevent layout shift and ensure visibility */
  overflow: hidden;
  /* Prevent spillover */
  position: relative;
  z-index: 1;
  /* Ensure strictly lower than card */
}

/* Footer Extended */
footer {
  background: transparent;
  padding: 0;
  margin: 0;
}

.footer-extended {
  background-color: #fff !important;
  border-top: 1px solid #eee;
  padding: 4rem 0 2rem;
  color: #333 !important;
  margin-top: auto;
  text-align: left;
  /* Ensure left alignment */
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: #111;
}

.footer-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1rem;
}

.footer-desc {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.copyright {
  font-size: 0.85rem;
  color: #999;
  line-height: 1.5;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  text-decoration: none;
  color: #555;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.language-selector {
  border: 1px solid #ddd;
  padding: 8px 12px;
  border-radius: 4px;
  display: inline-block;
  font-size: 0.9rem;
  color: #555;
  cursor: pointer;
  background: #f9f9f9;
}

.social-icons {
  display: flex;
  gap: 10px;
}

.social-icon {
  background: #f0f0f0;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  text-decoration: none;
  color: #555;
  transition: background 0.2s;
}

.social-icon:hover {
  background: #e0e0e0;
}

/* Responsive Footer */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    /* 2 columns on tablet */
    gap: 30px;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    /* 1 column on mobile */
    gap: 40px;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 992px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .grid-container {
    grid-template-columns: 1fr;
    /* Single column for mobile */
  }

  .card {
    padding: 1.5rem;
  }

  .section-header h2 {
    font-size: 1.7rem;
  }
}