/* CSS Reset & Variables */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --secondary: #10B981;
  --dark: #111827;
  --text-main: #374151;
  --text-light: #6B7280;
  --bg-main: #F3F4F6;
  --bg-card: #FFFFFF;
  --border: #E5E7EB;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 0.75rem;
  --radius-lg: 1rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* Header & Navigation */
header {
  background-color: var(--bg-card);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo svg {
  width: 28px;
  height: 28px;
  fill: var(--primary);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--dark);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--dark);
}

/* Main Layout */
main {
  flex-grow: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  width: 100%;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 3rem;
}

h1 {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
}

/* Calculator Card */
.calculator-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  max-width: 650px;
  margin: 0 auto 4rem;
  border: 1px solid var(--border);
}

.input-group label {
  display: block;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

.input-row {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.input-row input {
  flex-grow: 1;
  padding: 0.875rem 1.25rem;
  font-size: 1.125rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: all 0.2s;
  font-weight: 500;
  color: var(--dark);
}

.input-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.btn {
  padding: 0.875rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #F3F4F6;
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: #E5E7EB;
}

.validation-msg {
  color: #EF4444;
  font-size: 0.9rem;
  margin-top: 0.75rem;
  display: none;
  font-weight: 500;
}

/* Results Section */
.result-section {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.result-section h2 {
  margin: 0;
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
}

.main-result {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--secondary);
  margin: 0.75rem 0 2rem;
}

.date-comparison {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.date-box {
  background-color: #F8FAFC;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  min-width: 220px;
}

.date-box span {
  display: block;
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
  font-weight: 600;
  text-transform: uppercase;
}

.date-box strong {
  font-size: 1.125rem;
  color: var(--dark);
}

/* Content Area */
.content-area {
  background-color: var(--bg-card);
  padding: 3rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 3rem;
}

.content-area p {
  margin-bottom: 1.25rem;
}

.content-area ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.content-area li {
  margin-bottom: 0.5rem;
}

/* FAQs */
.faq-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.faq-question {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}
.faq-answer {
  color: var(--text-main);
}

/* Formats Section */
.formats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.format-card {
  background-color: var(--bg-card);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.format-info span {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.format-info strong {
  font-size: 1.125rem;
  color: var(--dark);
}

.btn-copy {
  background-color: #F3F4F6;
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy:hover {
  background-color: #E5E7EB;
}

/* Relative Table */
.table-container {
  overflow-x: auto;
  margin-bottom: 3rem;
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
}

th {
  background-color: #F8FAFC;
  font-weight: 700;
  color: var(--dark);
}

tr:last-child td {
  border-bottom: none;
}

tr.highlight {
  background-color: #ECFDF5;
}

/* Popular Days */
.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.popular-card {
  background-color: var(--bg-card);
  padding: 1.25rem 1rem;
  text-align: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: block;
  font-weight: 600;
  color: var(--dark);
}

.popular-card:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 600px;
  margin-top: 1.5rem;
}

.contact-form label {
  font-weight: 600;
  color: var(--dark);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.875rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
}

.contact-form textarea {
  resize: vertical;
  min-height: 150px;
}

/* Footer */
footer {
  background-color: var(--dark);
  color: #fff;
  padding: 4rem 1.5rem 1.5rem;
  margin-top: auto;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h4 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: #fff;
}

.footer-section p {
  color: #9CA3AF;
  font-size: 0.95rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.75rem;
}

.footer-section a {
  color: #9CA3AF;
  font-size: 0.95rem;
}

.footer-section a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #374151;
  color: #9CA3AF;
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    gap: 1.5rem;
    border-top: 1px solid var(--border);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  h1 {
    font-size: 2.25rem;
  }
  
  .input-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .date-comparison {
    flex-direction: column;
    gap: 1rem;
  }
  
  .content-area {
    padding: 2rem 1.5rem;
  }
}
