/* Resetting basic margins and paddings */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #faf9f6; /* soft whitish beige background */
  color: #2d3748; /* dark gray for easy reading */
  transition: background-color 0.3s, color 0.3s;
}

/* ============================================
   DARK MODE — 3-LAYER DEPTH SYSTEM
   Layer 1 (base):    #0f1117  — page background
   Layer 2 (surface): #1a1d2e  — cards, sections
   Layer 3 (raised):  #242840  — inputs, list items, dropdown
   Accent:            #db2777  — pink (matches light mode energy)
   Accent alt:        #67e8f9  — cyan (for hover/focus only)
   ============================================ */
body.dark-mode {
  background-color: #0f1117;
  color: #dde3f0;
}

/* NAVBAR SECTION */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #e0f2fe; /* very light pastel blue */
  color: #1e3a8a; /* deep blue text for light mode navbar */
  padding: 18px 8%;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

body.dark-mode .navbar {
  background-color: #1a1d2e;
  color: #f1f5f9;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid #2a2d45;
}

.logo {
  font-size: 24px;
  font-weight: bold;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-menu a {
  color: #475569; /* slate gray links */
  text-decoration: none;
  font-size: 15px;
}

body.dark-mode .nav-menu a {
  color: #c8d0e4;
}

.nav-menu a:hover {
  color: #be185d; /* pretty pastel pink hint on hover */
}

body.dark-mode .nav-menu a:hover {
  color: #c0456e;
}

.nav-link.active {
  color: #be185d; /* active state pink marker */
  font-weight: bold;
}

/* DROPDOWN MENU */
.dropdown {
  position: relative;
}

.dropdown-btn {
  background: none;
  border: none;
  color: #475569; /* matches the gray of Home, About, Services */
  font-size: 15px;
  cursor: pointer;
  padding: 0;      /* removes standard button padding */
}

body.dark-mode .dropdown-btn {
  color: #94a3b8;
  background: none;
  border: none;
}

/* Give it that nice pink text hover highlight just like the links */
.dropdown-btn:hover {
  color: #be185d; 
  background: none !important; /* ensures no dark background boxes show up */
}

body.dark-mode .dropdown-btn:hover {
  color: #c0456e;
}

.dropdown-menu {
  position: absolute;
  top: 35px;
  left: 0;
  background-color: white;
  list-style: none;
  padding: 12px;
  border-radius: 8px;
  width: 190px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.dark-mode .dropdown-menu {
  background-color: #242840;
  border: 1px solid #2e3155;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.dropdown-menu li {
  margin-bottom: 10px;
}

.dropdown-menu li:last-child {
  margin-bottom: 0;
}

.dropdown-menu a {
  color: #1e3a8a;
}

body.dark-mode .dropdown-menu a {
  color: #dde3f0;
}

/* Class to hide elements with JS */
.hidden {
  display: none;
}


/* HAMBURGER MENU BUTTON */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger-line {
  width: 28px;
  height: 3px;
  background-color: #1e3a8a;
  border-radius: 5px;
}

body.dark-mode .hamburger-line {
  background-color: #94a3b8;
}

/* HERO SECTION */
.hero {
  min-height: 420px;
  background: linear-gradient(135deg, #fce7f3, #e0f2fe); /* gentle pink to light blue gradient */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 8%;
  text-align: center;
  color: #1e3a8a; /* deep navy text */
}

body.dark-mode .hero {
  background: linear-gradient(135deg, #1a1d2e 0%, #0f1117 60%, #1a0d2e 100%);
  color: #f1f5f9;
}

.hero-content {
  max-width: 750px;
}

.hero h2 {
  font-size: 46px;
  margin-bottom: 20px;
}

.hero p {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 30px;
  color: #475569;
}

body.dark-mode .hero p {
  color: #b8c4d8;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.hero-buttons button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  background-color: #be185d; /* premium pink button */
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.hero-buttons button:hover {
  background-color: #be185d;
}

body.dark-mode .hero-buttons button {
  background-color: transparent;
  color: #c0456e;
  border: 1.5px solid #c0456e;
}

body.dark-mode .hero-buttons button:hover {
  background-color: #c0456e;
  color: #fff;
}

.hero-buttons button:last-child {
  background-color: white;
  color: #1e3a8a;
  border: 1px solid #cbd5e1;
}

/* hero last-child inherits the outlined style above */

/* MAIN CONTENT AREA */
main {
  padding: 60px 8%;
}

section {
  margin-bottom: 50px;
}

section h2 {
  font-size: 28px;
  color: #1e3a8a;
  margin-bottom: 24px;
}

/* Input + button rows inside list section */
.list-section .input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.list-section .search-row {
  margin-bottom: 20px;
}

body.dark-mode section h2 {
  color: #f1f5f9;
}

/* INPUTS AND STANDARD BUTTONS */
input {
  padding: 12px;
  width: 260px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  margin-right: 12px;
  outline: none;
  background-color: white;
  color: #2d3748;
}

body.dark-mode input {
  background-color: #242840;
  border-color: #2e3155;
  color: #e2e8f0;
}

input:focus {
  border-color: #be185d;
}

body.dark-mode input:focus {
  border-color: #c0456e;
  box-shadow: 0 0 0 3px rgba(232, 121, 160, 0.15);
}

button {
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  background-color: #1e3a8a; /* default dark blue button */
  color: white;
  cursor: pointer;
  font-weight: bold;
}

button:hover {
  background-color: #111827;
}

body.dark-mode button {
  background-color: transparent;
  color: white;
  border: 1.5px solid #c0456e;
}

body.dark-mode button:hover {
  background-color: #c0456e;
  color: #a79898;
  border-color: #c0456e;
}

/* Hamburger is a button but should never get the outlined pink style */
body.dark-mode .hamburger {
  background: none;
  border: none;
  color: inherit;
}

body.dark-mode .hamburger:hover {
  background: none !important;
  border: none;
}

/* Containers for different features */
.text-section,
.theme-section,
.input-section,
.list-section {
  background-color: white;
  padding: 36px 40px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  border: 1px solid #f1f5f9;
}

/* Paragraph text inside sections */
.text-section p,
.theme-section p,
.list-section p {
  line-height: 1.7;
  color: #475569;
  margin-bottom: 0;
}

/* Push buttons away from the text/heading above them */
.text-section button,
.theme-section > #themeBtn {
  margin-top: 20px;
  display: inline-block;
  width: auto;
}

/* Displayed output text spacing */
#displayText {
  margin-top: 16px;
  font-weight: 500;
  color: #1e3a8a;
  min-height: 24px;
}

body.dark-mode #displayText {
  color: #c0456e;
}

body.dark-mode .text-section,
body.dark-mode .theme-section,
body.dark-mode .input-section,
body.dark-mode .list-section {
  background-color: #1a1d2e;
  border-color: #2a2d45;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

/* Specific theme toggle button adjustments */
#themeBtn {
  background-color: #be185d;
}

#themeBtn:hover {
  background-color: #be185d;
}

/* #themeBtn inherits the global dark-mode button outlined style */

/* ACTIVITY LIST STYLES */
#activityList {
  margin-top: 20px;
  list-style: none;
}

#activityList li {
  background-color: #f1f5f9; /* cool gray rows */
  padding: 14px;
  margin-bottom: 10px;
  border-radius: 8px;
  cursor: pointer;
  border-left: 4px solid #be185d; /* left border pink accent color */
  color: #2d3748;
}

body.dark-mode #activityList li {
  background-color: #242840;
  color: #dde3f0;
  border-left-color: #c0456e;
}

#activityList li:hover {
  background-color: #fce7f3; /* soft pink hover row look */
}

body.dark-mode #activityList li:hover {
  background-color: #2e3155;
  border-left-color: #a3305a;
}

/* CARDS DISPLAY SECTION */
.cards-section {
  padding: 20px 0;
}

.cards-section h2 {
  text-align: center;
  margin-bottom: 40px;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.activity-card {
  background-color: white;
  padding: 28px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.activity-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(219, 39, 119, 0.1);
  border-color: #be185d;
}

body.dark-mode .activity-card {
  background-color: #1a1d2e;
  border-color: #2a2d45;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

body.dark-mode .activity-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(232, 121, 160, 0.15);
  border-color: #c0456e;
}

.activity-card h3 {
  color: #1e3a8a;
  margin-bottom: 15px;
}

body.dark-mode .activity-card h3 {
  color: #f1f5f9;
}

.activity-card p {
  line-height: 1.6;
  margin-bottom: 20px;
  color: #64748b;
}

body.dark-mode .activity-card p {
  color: #b8c4d8;
}

/* card action button */
.cardBtn {
  width: 100%;
  background-color: #be185d;
}

.cardBtn:hover {
  background-color: #be185d;
}

body.dark-mode .cardBtn {
  background-color: transparent;
  color: #c0456e;
  border: 1.5px solid #c0456e;
}

body.dark-mode .cardBtn:hover {
  background-color: #c0456e;
  color: #fff;
}

/* FOOTER */
footer {
  background-color: #1e3a8a;
  color: white;
  text-align: center;
  padding: 25px;
}

body.dark-mode footer {
  background-color: #1a1d2e;
  border-top: 1px solid #2a2d45;
  color: #9aa5be;
}

/* RESPONSIVE STYLES FOR TABLETS AND MOBILE */
/* Extra small screens — prevent logo from pushing into hamburger */
@media (max-width: 400px) {
  .logo,
  .navbar h1 {
    font-size: 17px;
  }

  .navbar {
    padding: 16px 5%;
  }

  .hamburger {
    right: 5%;
  }

  .nav-menu {
    right: 5%;
    width: calc(100% - 10%);
  }
}

@media (max-width: 992px) {
  .cards-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  /* Force the icon to the far right using absolute positioning */
  .hamburger {
    display: flex;
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    width: auto;             /* Override global mobile button width */
    background: none;        /* Remove standard button container default colors */
  }

  /* Stop global mobile hover backgrounds from overriding the hamburger button */
  .hamburger:hover {
    background: none !important;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 65px;
    right: 8%;
    width: 220px;
    background-color: #e0f2fe;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    border-radius: 10px;
    gap: 16px;
    z-index: 10;
  }

  body.dark-mode .nav-menu {
    background-color: #1a1d2e;
    border: 1px solid #2a2d45;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  }

  .nav-menu.show {
    display: flex;
  }

  .dropdown-menu {
    position: static;
    width: 100%;
    margin-top: 10px;
  }

  main {
    padding: 40px 5%;
  }

  .input-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  input {
    width: 100%;
    margin-bottom: 0;
    margin-right: 0;
  }

  /* Only make content-area buttons full width, NOT hamburger or hero buttons */
  main button,
  .theme-section button,
  .text-section button,
  .input-section button,
  .list-section button,
  .cardBtn {
    width: 100%;
    margin-bottom: 10px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .hero-buttons button {
    width: 80%;
    margin-bottom: 0;
  }

  .cards-container {
    grid-template-columns: 1fr;
  }

  section h2 {
    font-size: 24px;
  }
}