:root {
  --primary-color: #1a237e;
  --secondary-color: #3949ab;
  --accent-color: #5c6bc0;
  --text-color: #333;
  --background-color: #f5f7ff;
  --card-background: #fff;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --modal-overlay: rgba(0, 0, 0, 0.5);
}

.dark-mode {
  --primary-color: #121858;
  --secondary-color: #283593;
  --accent-color: #3949ab;
  --text-color: #e1e1e1;
  --background-color: #0a0c1d;
  --card-background: #1a1c2d;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --modal-overlay: rgba(0, 0, 0, 0.7);
}

* {
  margin: 0;
  padding: 0;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  min-height: 100vh;
  transition: background-color 0.3s, color 0.3s;
}

/* Header Styles */
header {
  background: var(--card-background);
  box-shadow: 0 2px 8px var(--shadow-color);
  padding: 1rem 0;
  width: 100%;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.logo i {
  font-size: 2rem;
  color: var(--accent-color);
  animation: float 3s ease-in-out infinite;
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-color);
}

.logo img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.main-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.main-nav a i {
  font-size: 1.1rem;
  color: var(--accent-color);
}

.main-nav a:hover {
  background: rgba(92, 107, 192, 0.1);
  transform: translateY(-2px);
}

.main-nav a.active {
  background: var(--accent-color);
  color: white;
}

.main-nav a.active i {
  color: white;
}

.mode-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mode-toggle i {
  color: var(--text-color);
  font-size: 1.2rem;
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
}

/* Calculator Section */
.calculator-section {
  background: var(--card-background);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px var(--shadow-color);
  position: sticky;
  top: 100px;
  height: fit-content;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.calculator-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

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

.input-group h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
  font-weight: 600;
}

.time-picker {
  display: grid;
  grid-template-columns: 65px 65px 65px;
  gap: 0.6rem;
  margin: 0.8rem 0;
  justify-content: start;
}

.time-picker select {
  padding: 0.4rem;
  border: 1.5px solid var(--secondary-color);
  border-radius: 0.4rem;
  background: var(--card-background);
  color: var(--text-color);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8.825L1.175 4 2.238 2.938 6 6.7l3.763-3.762L10.825 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  background-size: 8px;
  text-align: center;
  text-align-last: center;
}

.time-picker select:hover {
  border-color: var(--accent-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.time-picker select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(92, 107, 192, 0.15);
  outline: none;
}

/* Specific styling for each select */
.time-picker select#hour {
  min-width: 60px;
}

.time-picker select#minute {
  min-width: 60px;
}

.time-picker select#ampm {
  min-width: 60px;
  background-color: var(--card-background);
}

/* For Firefox */
.time-picker select option {
  text-align: center;
  padding: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
}

/* For Webkit browsers */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  .time-picker select {
    padding-right: 1.5rem;
  }

  .time-picker select option {
    padding: 0.4rem;
  }
}

/* For Firefox */
@-moz-document url-prefix() {
  .time-picker select {
    padding-right: 1.5rem;
    text-align-last: center;
  }
}

/* Dark mode support */
.dark-mode .time-picker select {
  background-color: var(--card-background);
  color: var(--text-color);
  border-color: var(--secondary-color);
}

.dark-mode .time-picker select option {
  background-color: var(--card-background);
  color: var(--text-color);
}

.age-group {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.age-group select {
  transition: all 0.3s ease;
}

.age-group select:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.age-group select:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Results Section */
.results-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: fadeIn 0.5s ease-out;
}

.results-container {
  background: var(--card-background);
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: 0 8px 20px var(--shadow-color);
  transition: transform 0.3s ease;
  animation: fadeIn 0.8s ease-out;
}

.results-container:hover {
  transform: translateY(-5px);
}

.results-container h3 {
  color: var(--accent-color);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.results-container h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--secondary-color),
    var(--accent-color)
  );
  border-radius: 2px;
}

.recommendation-text {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  padding: 1.2rem;
  border-radius: 1rem;
  text-align: center;
  font-size: 1.1rem;
  margin: 1.5rem 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.bedtime-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.bedtime-card {
  background: var(--card-background);
  border: 2px solid var(--secondary-color);
  border-radius: 1.2rem;
  padding: 1.8rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  animation: pulse 2s infinite;
}

.bedtime-card.recommended {
  border: none;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
  color: white;
  transform: scale(1.05);
  animation: pulse 2.5s infinite;
}

.bedtime-card.recommended:hover {
  transform: scale(1.08) translateY(-8px);
}

.bedtime-time {
  font-size: 2.2rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bedtime-details {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.bedtime-details span {
  font-size: 1.1rem;
}

.recommended-badge {
  background: white;
  color: var(--accent-color);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.9rem;
  font-weight: bold;
  display: inline-block;
  margin-top: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.sleep-info {
  background: var(--card-background);
  border-radius: 1.2rem;
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: 0 6px 15px var(--shadow-color);
  border-left: 5px solid var(--accent-color);
}

.sleep-info h3 {
  color: var(--accent-color);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.sleep-info p {
  line-height: 1.6;
  font-size: 1.1rem;
  color: var(--text-color);
}

/* Button Styles */
.primary-btn,
.secondary-btn {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.primary-btn {
  background: var(--accent-color);
  color: white;
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.primary-btn:active,
.secondary-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.secondary-btn {
  background: var(--secondary-color);
  color: white;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.quick-actions .secondary-btn {
  width: 100%;
}

/* Switch Styles */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--secondary-color);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Nap Timer */
.nap-timer {
  background: var(--card-background);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  margin-top: 2.5rem;
  box-shadow: 0 4px 12px var(--shadow-color);
  border: 1px solid rgba(92, 107, 192, 0.1);
  animation: fadeIn 0.3s ease-out;
}

.timer-circle {
  width: 180px;
  height: 180px;
  border: 6px solid var(--secondary-color);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  animation: float 3s ease-in-out infinite;
  box-shadow: 0 6px 15px var(--shadow-color);
}

.timer-display {
  font-size: 2.2rem;
  font-weight: bold;
  color: var(--accent-color);
  transition: all 0.3s ease;
}

.nap-timer .primary-btn {
  margin-top: 1.5rem;
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--modal-overlay);
  display: -webkit-flex;
  display: -moz-flex;
  display: flex;
  -webkit-align-items: center;
  -moz-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  -moz-justify-content: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  -webkit-transition: opacity 0.3s ease, visibility 0.3s ease;
  -moz-transition: opacity 0.3s ease, visibility 0.3s ease;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--card-background);
  padding: 2.5rem;
  border-radius: 1.2rem;
  max-width: 400px;
  width: 90%;
  animation: slideIn 0.4s ease-out;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(92, 107, 192, 0.1);
}

.modal-content h3 {
  color: var(--text-color);
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.modal-content p {
  color: var(--text-color);
  opacity: 0.8;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.reminder-options {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.reminder-options label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1rem;
  color: var(--text-color);
  cursor: pointer;
}

.reminder-options select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid rgba(92, 107, 192, 0.2);
  border-radius: 0.8rem;
  background: var(--card-background);
  color: var(--text-color);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.reminder-options select:hover {
  border-color: var(--accent-color);
}

.reminder-options select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.1);
  outline: none;
}

.modal-content .primary-btn {
  margin-bottom: 1rem;
}

.modal-content .secondary-btn {
  background: transparent;
  color: var(--text-color);
  border: 2px solid var(--secondary-color);
}

.modal-content .secondary-btn:hover {
  background: var(--secondary-color);
  color: white;
}

/* Checkbox styles */
.reminder-options input[type="checkbox"] {
  width: 20px;
  height: 20px;
  border: 2px solid var(--secondary-color);
  border-radius: 4px;
  cursor: pointer;
  margin: 0;
}

/* Utility Classes */
.hidden {
  display: none;
}

/* Sleep Tips Section */
.sleep-tips {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--card-background);
  border-radius: 1rem;
  box-shadow: 0 4px 6px var(--shadow-color);
}

.sleep-tips h4 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.sleep-tips ul {
  list-style: none;
  padding: 0;
}

.sleep-tips li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--shadow-color);
  display: flex;
  align-items: center;
}

.sleep-tips li:before {
  content: "💤";
  margin-right: 0.5rem;
}

/* Sleep Tracking Section */
.sleep-tracking {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--card-background);
  border-radius: 1rem;
  box-shadow: 0 4px 6px var(--shadow-color);
}

.sleep-tracking h4 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.rating-input {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rating-input label {
  font-weight: 500;
}

.rating-input select {
  width: 100%;
  max-width: 200px;
}

/* Additional Styles */
select {
  padding: 0.75rem;
  border: 2px solid var(--secondary-color);
  border-radius: 0.5rem;
  background: var(--card-background);
  color: var(--text-color);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.3s;
  width: 100%;
}

select:hover {
  border-color: var(--accent-color);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Base Responsive Design */
@media (min-width: 1441px) {
  .container {
    max-width: 1400px;
  }

  main {
    max-width: 1400px;
    grid-template-columns: 350px 1fr;
  }

  .calculator-section {
    padding: 2.5rem;
  }

  .results-container {
    padding: 3rem;
  }
}

@media (max-width: 1440px) {
  .container {
    max-width: 1200px;
  }

  main {
    max-width: 1200px;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
  }
}

@media (max-width: 1200px) {
  .container {
    max-width: 960px;
    padding: 0 20px;
  }

  main {
    max-width: 960px;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    margin: 90px auto 2rem;
  }

  .bedtime-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-hero {
    width: 100%;
  }
}

@media (max-width: 992px) {
  .container {
    max-width: 720px;
  }

  main {
    grid-template-columns: 1fr;
    max-width: 600px;
  }

  .calculator-section {
    position: relative;
    top: 0;
    margin-bottom: 1.5rem;
    padding: 1.2rem;
  }

  .results-container {
    padding: 1.5rem;
  }

  .bedtime-options {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .service-items {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .hero-image img {
    max-width: 200px;
  }

  .menu-toggle {
    display: -webkit-flex;
    display: -moz-flex;
    display: flex;
    -webkit-align-items: center;
    -moz-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    -moz-justify-content: center;
    justify-content: center;
    z-index: 1001;
  }

  .main-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card-background);
    padding: 1.5rem;
    -webkit-flex-direction: column;
    -moz-flex-direction: column;
    flex-direction: column;
    -webkit-box-shadow: 0 4px 6px var(--shadow-color);
    -moz-box-shadow: 0 4px 6px var(--shadow-color);
    box-shadow: 0 4px 6px var(--shadow-color);
    z-index: 999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav.active {
    display: -webkit-flex;
    display: -moz-flex;
    display: flex;
    -webkit-animation: slideDown 0.3s ease-out forwards;
    -moz-animation: slideDown 0.3s ease-out forwards;
    animation: slideDown 0.3s ease-out forwards;
  }

  .main-nav a {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    margin: 0.5rem 0;
    transition: all 0.3s ease;
  }

  .main-nav a:hover {
    background: rgba(92, 107, 192, 0.1);
  }

  .main-nav a.active {
    background: var(--accent-color);
    color: white;
  }

  .main-nav a i {
    font-size: 1.2rem;
  }

  .header-content {
    padding: 0 1rem;
  }

  .mode-toggle {
    margin-left: auto;
    margin-right: 0.8rem;
  }

  .logo img {
    width: 70px;
    height: 70px;
  }

  .logo h1 {
    font-size: 1.4rem;
  }

  .logo i {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  .container {
    max-width: 540px;
    padding: 0 12px;
  }

  header {
    padding: 0.6rem 0;
  }

  .header-content {
    padding: 0 0.8rem;
  }

  .logo img {
    width: 60px;
    height: 60px;
  }

  .logo h1 {
    font-size: 1.2rem;
  }

  .logo i {
    font-size: 1.4rem;
  }

  main {
    margin-top: 2rem;
    padding: 0 0.8rem;
  }

  .calculator-section {
    padding: 1rem;
  }

  .input-group h2 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
  }

  .time-picker {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
  }

  .time-picker select {
    padding: 0.3rem;
    font-size: 0.8rem;
    min-width: 50px;
  }

  .bedtime-options {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .bedtime-time {
    font-size: 1.6rem;
  }

  .bedtime-details span {
    font-size: 0.85rem;
  }

  .service-items {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1.2rem;
    padding: 1rem;
  }

  .footer-links {
    gap: 1rem;
  }

  .footer-links a {
    font-size: 0.9rem;
  }

  .social-links {
    gap: 1.2rem;
  }

  .social-links a {
    font-size: 1.3rem;
  }

  .copyright {
    font-size: 0.8rem;
    margin-top: 1rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 8px;
  }

  main {
    margin-top: 1rem;
    padding: 0 8px;
  }

  .calculator-section {
    padding: 1rem;
  }

  .input-group h2 {
    font-size: 0.95rem;
  }

  .time-picker {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
  }

  .time-picker select {
    padding: 0.25rem;
    font-size: 0.75rem;
    min-width: 45px;
  }

  .results-container {
    padding: 1rem;
  }

  .bedtime-time {
    font-size: 1.4rem;
  }

  .bedtime-details span {
    font-size: 0.8rem;
  }

  .timer-circle {
    width: 120px;
    height: 120px;
    border-width: 4px;
  }

  .timer-display {
    font-size: 1.4rem;
  }

  .hero-text h1 {
    font-size: 1.6rem;
  }

  .hero-text p {
    font-size: 0.85rem;
  }

  .service-item {
    padding: 1rem;
  }

  .service-content h3 {
    font-size: 1rem;
  }

  .service-content p {
    font-size: 0.8rem;
  }

  .footer-logo img {
    width: 50px;
    height: 50px;
  }

  .footer-links a {
    font-size: 0.85rem;
  }

  .copyright {
    font-size: 0.75rem;
  }

  .primary-btn,
  .secondary-btn {
    padding: 0.8rem;
    font-size: 0.9rem;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .modal-content h3 {
    font-size: 1.2rem;
  }

  .modal-content p {
    font-size: 0.9rem;
  }

  .reminder-options label {
    font-size: 0.9rem;
  }

  .reminder-options select {
    padding: 0.6rem;
    font-size: 0.9rem;
  }
}

/* Dark mode adjustments for mobile */
@media (max-width: 768px) {
  .dark-mode .main-nav {
    background: var(--card-background);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* Touch device optimizations */
@media (hover: none) {
  .service-item:hover,
  .bedtime-card:hover,
  .hero-image img:hover {
    transform: none;
    box-shadow: none;
  }

  .main-nav a:hover {
    background: none;
    transform: none;
  }

  .primary-btn:hover,
  .secondary-btn:hover {
    transform: none;
  }
}

/* Print styles update */
@media print {
  .calculator-section,
  .results-container {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  .bedtime-options {
    break-inside: avoid;
  }

  header,
  footer,
  .mode-toggle,
  .quick-actions {
    display: none;
  }
}

/* Removing About, Contact, and How to Use specific styles */
.about-section,
.guide-section,
.contact-section,
.about-header,
.guide-header,
.contact-header,
.about-grid,
.contact-grid,
.guide-grid,
.about-card,
.contact-card,
.guide-card,
.timeline-container,
.timeline-item,
.timeline-icon,
.contact-hero,
.guide-hero,
.method-card,
.contact-form-section,
.form-wrapper,
.social-connect,
.contact-methods,
.methods-grid,
.faq-section,
.location-section,
.help-section,
.features-overview,
.modern-hero,
.mission-section,
.features-showcase,
.stats-section,
.team-section,
.cta-section {
  display: none;
}

/* About Page Styles */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Hero Section */
.about-hero {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  padding: 50px 20px;
  color: white;
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  margin: 15px auto;
  box-shadow: 0 5px 15px var(--shadow-color);
  animation: fadeIn 0.5s ease-out;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  animation: slideIn 0.5s ease-out;
}

.hero-text p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 25px;
  color: rgba(255, 255, 255, 0.9);
  animation: fadeIn 0.7s ease-out;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px;
  animation: slideIn 0.5s ease-out;
}

.hero-image img {
  max-width: 280px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.hero-image img:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.hero-button {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  text-decoration: none;
}

.hero-button::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 8px;
  left: 50%;
  background: white;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.hero-button:hover::after {
  width: calc(100% - 48px);
}

.hero-button:hover {
  transform: translateY(-2px);
  background: var(--secondary-color);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Mission Section */
.mission-section {
  padding: 50px 20px;
  background: var(--card-background);
  margin-top: -15px;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
}

.mission-content {
  max-width: 1000px;
  margin: 0 auto;
}

.mission-content h2 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 35px;
  color: var(--text-color);
  font-weight: 700;
  position: relative;
}

.mission-content h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent-color);
  border-radius: 2px;
}

.mission-wrapper {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 20px;
  background: var(--card-background);
  border-radius: 15px;
  box-shadow: 0 5px 15px var(--shadow-color);
}

.mission-text {
  flex: 2;
}

.mission-text h3 {
  font-size: 1.6rem;
  margin-bottom: 15px;
  color: var(--text-color);
  font-weight: 600;
}

.mission-text p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-color);
  opacity: 0.9;
}

.mission-icon {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: rgba(92, 107, 192, 0.1);
  border-radius: 50%;
  width: 100px;
  height: 100px;
  margin: 0 auto;
}

.mission-icon i {
  font-size: 3rem;
  color: var(--accent-color);
}

/* Services Section */
.services-section {
  padding: 50px 20px;
  background: var(--background-color);
}

.services-section h2 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 40px;
  color: var(--text-color);
  font-weight: 700;
  position: relative;
}

.services-section h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent-color);
  border-radius: 2px;
}

.services-grid {
  max-width: 1000px;
  margin: 0 auto;
}

.service-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  padding: 20px 0;
}

.service-item {
  background: var(--card-background);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 10px var(--shadow-color);
  transition: all 0.3s ease;
  border: 1px solid rgba(92, 107, 192, 0.1);
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px var(--shadow-color);
  border-color: var(--accent-color);
}

.service-icon {
  margin-bottom: 15px;
  background: rgba(92, 107, 192, 0.1);
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon i {
  font-size: 1.8rem;
  color: var(--accent-color);
}

.service-content h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-color);
  font-weight: 600;
}

.service-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-color);
  opacity: 0.9;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  .about-hero {
    padding: 40px 15px;
    margin: 10px;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 25px;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .hero-image img {
    max-width: 220px;
  }

  .mission-wrapper {
    flex-direction: column-reverse;
    text-align: center;
    padding: 15px;
  }

  .mission-content h2 {
    font-size: 1.8rem;
  }

  .mission-text h3 {
    font-size: 1.4rem;
  }

  .service-items {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service-item {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .about-hero {
    padding: 30px 15px;
    margin: 5px;
  }

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

  .hero-image img {
    max-width: 180px;
  }

  .mission-content h2,
  .services-section h2 {
    font-size: 1.6rem;
  }

  .mission-text h3 {
    font-size: 1.3rem;
  }

  .service-content h3 {
    font-size: 1.2rem;
  }
}

/* Footer Styles */
footer {
  background: var(--card-background);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
  box-shadow: 0 -2px 8px var(--shadow-color);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.footer-logo i {
  font-size: 1.8rem;
  color: var(--accent-color);
}

.footer-logo span {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-color);
}

.footer-logo img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-links a {
  color: var(--text-color);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.social-links a:hover {
  color: var(--accent-color);
  transform: translateY(-3px);
}

.copyright {
  text-align: center;
  color: var(--text-color);
  opacity: 0.8;
  font-size: 0.9rem;
  margin-top: 2rem;
  padding: 0 2rem;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.3s ease;
  z-index: 1000;
  margin-left: auto;
}

.menu-toggle i {
  color: var(--accent-color);
  transition: transform 0.3s ease;
}

.menu-toggle:hover i {
  transform: scale(1.1);
}

@media (max-width: 992px) {
  .menu-toggle {
    display: -webkit-flex;
    display: -moz-flex;
    display: flex;
    -webkit-align-items: center;
    -moz-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    -moz-justify-content: center;
    justify-content: center;
    z-index: 1001;
  }

  .main-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card-background);
    padding: 1.5rem;
    -webkit-flex-direction: column;
    -moz-flex-direction: column;
    flex-direction: column;
    -webkit-box-shadow: 0 4px 6px var(--shadow-color);
    -moz-box-shadow: 0 4px 6px var(--shadow-color);
    box-shadow: 0 4px 6px var(--shadow-color);
    z-index: 999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav.active {
    display: -webkit-flex;
    display: -moz-flex;
    display: flex;
    -webkit-animation: slideDown 0.3s ease-out forwards;
    -moz-animation: slideDown 0.3s ease-out forwards;
    animation: slideDown 0.3s ease-out forwards;
  }

  .main-nav a {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    margin: 0.5rem 0;
    transition: all 0.3s ease;
  }

  .main-nav a:hover {
    background: rgba(92, 107, 192, 0.1);
  }

  .main-nav a.active {
    background: var(--accent-color);
    color: white;
  }

  .main-nav a i {
    font-size: 1.2rem;
  }

  .header-content {
    padding: 0 1rem;
  }

  .mode-toggle {
    margin-left: auto;
    margin-right: 0.8rem;
  }

  .logo img {
    width: 70px;
    height: 70px;
  }

  .logo h1 {
    font-size: 1.4rem;
  }

  .logo i {
    font-size: 1.6rem;
  }
}

@-webkit-keyframes slideDown {
  from {
    opacity: 0;
    -webkit-transform: translateY(-10px);
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

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

/* Dark mode adjustments for mobile nav */
.dark-mode .main-nav {
  background: var(--card-background);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .main-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Contact Page Styles */
.contact-hero {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  padding: 60px 20px;
  text-align: center;
  color: white;
  border-radius: 15px;
  margin: 20px auto;
  box-shadow: 0 5px 15px var(--shadow-color);
}

.contact-hero-content h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
  animation: slideIn 0.5s ease-out;
}

.contact-hero-content p {
  font-size: 1.2rem;
  opacity: 0.9;
  animation: fadeIn 0.7s ease-out;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 40px 0;
}

/* Contact Form Styles */
.contact-form-section {
  background: var(--card-background);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 15px var(--shadow-color);
}

.contact-form-section h2 {
  color: var(--text-color);
  font-size: 2rem;
  margin-bottom: 25px;
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: var(--text-color);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  padding: 12px;
  border: 2px solid var(--secondary-color);
  border-radius: 8px;
  background: var(--card-background);
  color: var(--text-color);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.2);
  outline: none;
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.submit-btn {
  background: var(--accent-color);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

/* Contact Info Styles */
.contact-info-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.contact-info-card {
  background: var(--card-background);
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 5px 15px var(--shadow-color);
  transition: all 0.3s ease;
}

.contact-info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px var(--shadow-color);
}

.contact-info-card i {
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 15px;
}

.contact-info-card h3 {
  color: var(--text-color);
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.contact-info-card p {
  color: var(--text-color);
  opacity: 0.8;
  line-height: 1.6;
}

/* FAQ Section Styles */
.faq-section {
  padding: 40px 0;
}

.faq-section h2 {
  text-align: center;
  color: var(--text-color);
  font-size: 2rem;
  margin-bottom: 30px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.faq-item {
  background: var(--card-background);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 5px 15px var(--shadow-color);
  transition: all 0.3s ease;
}

.faq-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--shadow-color);
}

.faq-item h3 {
  color: var(--text-color);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.faq-item p {
  color: var(--text-color);
  opacity: 0.8;
  line-height: 1.6;
}

/* Responsive Design for Contact Page */
@media (max-width: 768px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
  }

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

  .faq-grid {
    grid-template-columns: 1fr;
  }

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

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

  .contact-form-section {
    padding: 20px;
  }

  .contact-form-section h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .contact-hero {
    padding: 40px 15px;
  }

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

  .contact-info-card {
    padding: 20px;
  }

  .contact-info-card i {
    font-size: 1.8rem;
  }

  .faq-item {
    padding: 20px;
  }
}

/* Dark Contact Page Styles */
.dark-contact-page {
  background: var(--background-color);
  min-height: calc(100vh - 200px);
  padding: 80px 0;
}

.contact-title {
  text-align: left;
  margin-bottom: 50px;
}

.contact-label {
  background: rgba(92, 107, 192, 0.1);
  color: var(--accent-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-block;
  margin-bottom: 20px;
}

.contact-title h1 {
  font-size: 2.5rem;
  color: var(--text-color);
  margin-bottom: 15px;
}

.contact-title p {
  color: var(--text-color);
  opacity: 0.8;
  font-size: 1.1rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  margin-top: 40px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-method {
  background: var(--card-background);
  padding: 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-method:hover {
  transform: translateY(-2px);
  border-color: var(--accent-color);
}

.method-icon {
  width: 40px;
  height: 40px;
  background: rgba(92, 107, 192, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.method-icon i {
  color: var(--accent-color);
  font-size: 1.2rem;
}

.method-details {
  flex: 1;
}

.method-details h3 {
  color: var(--text-color);
  font-size: 1rem;
  margin-bottom: 5px;
}

.method-details p {
  color: var(--text-color);
  opacity: 0.7;
  font-size: 0.9rem;
}

.method-arrow {
  color: var(--accent-color);
  opacity: 0;
  transition: all 0.3s ease;
}

.contact-method:hover .method-arrow {
  opacity: 1;
  transform: translateX(5px);
}

.contact-form-wrapper {
  background: var(--card-background);
  padding: 40px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-contact-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.dark-contact-form .form-group {
  position: relative;
}

.dark-contact-form input,
.dark-contact-form textarea {
  width: 100%;
  padding: 15px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.dark-contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.dark-contact-form label {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-color);
  opacity: 0.7;
  transition: all 0.3s ease;
  pointer-events: none;
}

.dark-contact-form textarea + label {
  top: 20px;
  transform: none;
}

.dark-contact-form input:focus,
.dark-contact-form textarea:focus {
  border-color: var(--accent-color);
  outline: none;
}

.dark-contact-form input:focus + label,
.dark-contact-form textarea:focus + label,
.dark-contact-form input:not(:placeholder-shown) + label,
.dark-contact-form textarea:not(:placeholder-shown) + label {
  top: -10px;
  left: 10px;
  font-size: 0.8rem;
  padding: 0 5px;
  background: var(--card-background);
  color: var(--accent-color);
}

.dark-contact-form .submit-btn {
  background: var(--accent-color);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.dark-contact-form .submit-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

/* Responsive Design for Dark Contact Page */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-title h1 {
    font-size: 2rem;
  }

  .contact-form-wrapper {
    padding: 25px;
  }

  .dark-contact-page {
    padding: 40px 0;
  }
}

@media (max-width: 480px) {
  .contact-title h1 {
    font-size: 1.8rem;
  }

  .contact-method {
    padding: 15px;
  }

  .method-icon {
    width: 35px;
    height: 35px;
  }

  .contact-form-wrapper {
    padding: 20px;
  }
}

/* Simple Contact Page Styles */
.simple-contact-page {
  padding: 80px 0;
  min-height: calc(100vh - 200px);
  background: var(--background-color);
}

.simple-contact-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background: var(--card-background);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 5px 15px var(--shadow-color);
}

.simple-contact-info {
  text-align: center;
  margin-bottom: 40px;
}

.simple-contact-info h1 {
  font-size: 2.5rem;
  color: var(--text-color);
  margin-bottom: 15px;
}

.simple-contact-info p {
  color: var(--text-color);
  opacity: 0.8;
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: var(--background-color);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.contact-item:hover {
  transform: translateX(10px);
}

.contact-item i {
  font-size: 1.2rem;
  color: var(--accent-color);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(92, 107, 192, 0.1);
  border-radius: 50%;
}

.contact-item span {
  color: var(--text-color);
  font-size: 1rem;
}

.simple-contact-form {
  margin-top: 40px;
}

.simple-contact-form .form-group {
  margin-bottom: 20px;
}

.simple-contact-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-color);
  font-weight: 500;
}

.simple-contact-form input,
.simple-contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(92, 107, 192, 0.2);
  border-radius: 8px;
  background: var(--background-color);
  color: var(--text-color);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.simple-contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.simple-contact-form input:focus,
.simple-contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.1);
}

.simple-contact-form .submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.simple-contact-form .submit-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

/* Responsive Design for Simple Contact Page */
@media (max-width: 768px) {
  .simple-contact-wrapper {
    padding: 30px;
    margin: 20px;
  }

  .simple-contact-info h1 {
    font-size: 2rem;
  }

  .contact-item {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .simple-contact-wrapper {
    padding: 20px;
    margin: 15px;
  }

  .simple-contact-info h1 {
    font-size: 1.8rem;
  }

  .contact-item i {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
}

/* Responsive Breakpoints */
/* Large Desktop (1400px and up) */
@media (min-width: 1400px) {
  .container,
  .header-content,
  .footer-content,
  main {
    max-width: 1320px;
  }

  .calculator-section {
    padding: 2.5rem;
  }

  .logo img {
    width: 85px;
    height: 85px;
  }

  .footer-logo img {
    width: 75px;
    height: 75px;
  }
}

/* Desktop (1200px to 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
  .container,
  .header-content,
  .footer-content,
  main {
    max-width: 1140px;
  }
}

/* Laptop (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .container,
  .header-content,
  .footer-content,
  main {
    max-width: 960px;
    padding: 0 1.5rem;
  }

  main {
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
  }

  .logo img {
    width: 75px;
    height: 75px;
  }

  .footer-logo img {
    width: 65px;
    height: 65px;
  }

  .bedtime-options {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .container,
  .header-content,
  .footer-content,
  main {
    max-width: 720px;
    padding: 0 1rem;
  }

  main {
    grid-template-columns: 1fr;
    max-width: 600px;
  }

  .logo img {
    width: 65px;
    height: 65px;
  }

  .footer-logo img {
    width: 55px;
    height: 55px;
  }

  .calculator-section {
    position: relative;
    margin-bottom: 1.5rem;
  }

  .main-nav {
    gap: 0.5rem;
  }

  .main-nav a {
    padding: 0.8rem;
    font-size: 0.95rem;
  }

  .mode-toggle {
    margin-left: auto;
    margin-right: 0.8rem;
  }
}

/* Large Mobile (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .container,
  .header-content,
  .footer-content,
  main {
    max-width: 540px;
    padding: 0 1rem;
  }

  .logo img {
    width: 55px;
    height: 55px;
  }

  .footer-logo img {
    width: 45px;
    height: 45px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-background);
    padding: 1rem;
    flex-direction: column;
    box-shadow: 0 4px 6px var(--shadow-color);
  }

  .main-nav.active {
    display: flex;
  }

  .bedtime-options {
    grid-template-columns: 1fr;
  }
}

/* Small Mobile (575px and below) */
@media (max-width: 575px) {
  .container,
  .header-content,
  .footer-content,
  main {
    max-width: 100%;
    padding: 0 0.8rem;
  }

  .logo img {
    width: 45px;
    height: 45px;
  }

  .footer-logo img {
    width: 40px;
    height: 40px;
  }

  header {
    padding: 0.8rem 0;
  }

  .logo h1 {
    font-size: 1.2rem;
  }

  .time-picker {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
  }

  .time-picker select {
    padding: 0.25rem;
    font-size: 0.75rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

/* SEO and Performance Optimizations */
/* Add content visibility for better performance */
.calculator-section,
.results-section,
.footer-content {
  content-visibility: auto;
  contain-intrinsic-size: 1px 5000px;
}

/* Ensure text remains visible during webfont load */
.logo h1,
.main-nav a,
.bedtime-time,
.footer-links a {
  font-display: swap;
}

/* Improve color contrast for accessibility */
.main-nav a.active {
  color: #ffffff;
  background: var(--accent-color);
}

/* Optimize animations for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .logo i,
  .calculator-section,
  .bedtime-card,
  .hero-image img {
    animation: none;
    transition: none;
  }
}

/* Touch device optimizations */
@media (hover: none) {
  .main-nav a,
  .bedtime-card,
  .service-item,
  .hero-image img {
    transition: none;
  }

  .main-nav a:hover,
  .bedtime-card:hover,
  .service-item:hover {
    transform: none;
  }
}

/* Fix for scrolling */
html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* Fix for images */
img {
  max-width: 100%;
  height: auto;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* Save Message Styles */
.save-message {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s ease;
  opacity: 0;
}

.save-message:not(:empty) {
  opacity: 1;
}

.save-message.success {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.save-message.error {
  background-color: #fdecea;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

.save-message.warning {
  background-color: #fff3e0;
  color: #ef6c00;
  border: 1px solid #ffe0b2;
}

/* Sleep Tracking Section Improvements */
.sleep-tracking .rating-input {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  margin: 0 auto;
}

.sleep-tracking select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  margin-bottom: 5px;
}

.sleep-tracking .secondary-btn {
  margin-top: 5px;
}

/* Form Status Messages */
.form-status {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    display: none;
}

.form-status .success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 1rem;
    border-radius: 0.5rem;
    display: block;
}

.form-status .error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 1rem;
    border-radius: 0.5rem;
    display: block;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.submit-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.footer-social {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  justify-content: center;
}
.footer-social a {
  color: var(--primary-color, #4a90e2);
  font-size: 1.4rem;
  transition: color 0.3s, transform 0.3s;
}
.footer-social a:hover {
  color: var(--secondary-color, #222);
  transform: translateY(-2px) scale(1.15);
}
