/* Temperature Converter – Page Styles
 * Path: /assets/css/temperature-converter.css
 */

html, body {
  height: 100%;
}

body {
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  min-height: 100%;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* HEADER & NAV */

.header {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.15);
}

/* Desktop nav links */
.nav-link-desktop {
  color: #ffffff;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  display: inline-block;
}

.nav-link-desktop:hover {
  color: #e5e7eb;
  transform: scale(1.08);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #ffffff;
  min-width: 220px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  border-radius: 12px;
  margin-top: 8px;
  overflow: hidden;
  z-index: 1100;
}

.dropdown-content.show {
  display: block;
}

.dropdown-content a {
  color: #4a5568;
  padding: 12px 20px;
  text-decoration: none;
  display: block;
  transition: all 0.25s ease;
  font-size: 14px;
}

.dropdown-content a:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  padding-left: 28px;
}

/* Mobile hamburger */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 26px;
  cursor: pointer;
}

/* Mobile slide-down menu */
.mobile-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #16a34a;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  z-index: 1050;
}

.mobile-menu.open {
  max-height: 420px;
}

.mobile-menu-inner {
  padding: 14px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu-inner a {
  color: #ecfdf5;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 6px 0;
}

.mobile-menu-inner a:hover {
  color: #bbf7d0;
}

.mobile-menu-divider {
  border: none;
  border-top: 1px solid rgba(229, 231, 235, 0.4);
  margin: 8px 0 4px;
}

/* PAGE HERO */

.page-header {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'><path d='M0,0 Q300,60 600,30 T1200,0 L1200,120 L0,120 Z' fill='rgba(255,255,255,0.05)'/></svg>") repeat-x bottom;
  background-size: 1200px 120px;
  opacity: 0.3;
}

.page-header h1 {
  font-size: 56px;
  font-weight: 900;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  animation: slideInDown 0.6s ease;
}

.page-header p {
  font-size: 22px;
  opacity: 0.95;
  position: relative;
  z-index: 1;
  animation: slideInUp 0.6s ease;
}

/* ANIMATIONS */

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-20px) rotate(5deg); }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

/* CALCULATOR LAYOUT */

.calculator-container {
  max-width: 1400px;
  margin: -60px auto 60px;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

.calculator-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: slideUp 0.6s ease;
  margin-bottom: 24px;
}

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

.card-title {
  font-size: 28px;
  font-weight: 800;
  color: #f59e0b;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.converter-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.input-group {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  padding: 24px;
  border-radius: 16px;
  border: 2px solid #f59e0b;
}

.input-label {
  font-weight: 700;
  color: #92400e;
  margin-bottom: 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-field {
  width: 100%;
  padding: 14px;
  border: 2px solid #f59e0b;
  border-radius: 10px;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  transition: all 0.3s ease;
  color: #1e293b;
  margin-bottom: 12px;
}

.input-field:focus {
  outline: none;
  border-color: #d97706;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
  transform: scale(1.02);
}

.unit-select {
  width: 100%;
  padding: 12px;
  border: 2px solid #f59e0b;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #92400e;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.unit-select:focus {
  outline: none;
  border-color: #d97706;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

/* Result cards */

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.result-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #10b981;
  text-align: center;
}

.result-label {
  font-weight: 600;
  color: #065f46;
  font-size: 12px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-value {
  font-weight: 900;
  color: #1e293b;
  font-size: 20px;
}

/* Tables */

.conversion-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 14px;
}

.conversion-table th {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  padding: 12px;
  text-align: left;
  font-weight: 600;
}

.conversion-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.conversion-table tr:hover {
  background: #f8fafc;
}

/* History */

.history-item {
  background: #f8fafc;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 4px solid #f59e0b;
}

/* Downloads */

.download-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.download-btn {
  flex: 1;
  padding: 14px 24px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* BLOG CONTENT */

.blog-section {
  max-width: 900px;
  margin: 80px auto;
  padding: 0 20px;
}

.blog-content {
  background: #ffffff;
  border-radius: 24px;
  padding: 60px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  line-height: 1.8;
}

.blog-content h2 {
  font-size: 42px;
  font-weight: 900;
  color: #1a202c;
  margin-bottom: 32px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-content h3 {
  font-size: 28px;
  font-weight: 700;
  color: #2d3748;
  margin-top: 40px;
  margin-bottom: 20px;
}

.blog-content h4 {
  font-size: 22px;
  font-weight: 600;
  color: #4a5568;
  margin-top: 32px;
  margin-bottom: 16px;
}

.blog-content p {
  color: #4a5568;
  font-size: 17px;
  margin-bottom: 24px;
  line-height: 1.9;
}

.blog-content ul,
.blog-content ol {
  color: #4a5568;
  margin-left: 32px;
  margin-bottom: 24px;
}

.blog-content li {
  margin-bottom: 12px;
  line-height: 1.8;
}

.blog-content strong {
  color: #f59e0b;
  font-weight: 700;
}

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

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

.highlight-box {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  padding: 24px;
  border-radius: 12px;
  border-left: 4px solid #f59e0b;
  margin: 32px 0;
}

.example-box {
  background: #fffbeb;
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #f59e0b;
  margin: 24px 0;
}

/* SMALL HEADERS INSIDE CARDS */

.subheading {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
}

/* FOOTER */

.footer {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  color: #ffffff;
  padding: 60px 0 20px;
  margin-top: 80px;
}

.footer-column h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.footer-column ul li {
  margin-bottom: 12px;
}

.footer-column ul li a {
  color: #cbd5e0;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-column ul li a:hover {
  color: #f59e0b;
  transform: translateX(5px);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 40px;
  padding-top: 30px;
  text-align: center;
  color: #a0aec0;
}

/* RESPONSIVE */

@media (max-width: 1024px) {
  .calculator-card {
    padding: 32px;
  }
}

@media (max-width: 768px) {
  header .desktop-nav {
    display: none !important;
  }

  .mobile-menu-btn {
    display: block;
  }

  .page-header {
    padding: 64px 16px 54px;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .page-header p {
    font-size: 0.98rem;
  }

  .calculator-card {
    padding: 26px 20px 24px;
  }

  .converter-section {
    grid-template-columns: 1fr;
  }

  .download-buttons {
    flex-direction: column;
  }

  .blog-content {
    padding: 32px 20px 34px;
  }

  .blog-content h2 {
    font-size: 32px;
  }

  .blog-content h3 {
    font-size: 24px;
  }

  .download-buttons {
    flex-direction: column;
  }
}
