/* =========================
   Root Variables
========================= */
:root {
  --primary: #132743;       /* Header, nav */
  --accent: #1e4e8c;        /* Buttons, hover accents */
  --text: #ffffff;           /* Main text */
  --card-bg: #1e2a3b;        /* Card background */
  --card-text: #d1d7e0;      /* Card description text */
  --footer-text: #9aa7b8;    /* Footer text */
  --body-bg: #0f1b2a;        /* Page background */
}

/* =========================
   Reset & Base Styles
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background: var(--body-bg);
  color: var(--text);
  line-height: 1.6;
}

/* =========================
   Header & Navbar
========================= */
header {
  background: var(--primary);
  color: var(--text);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav ul li a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

nav ul li a:hover {
  color: var(--accent);
}

#menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
}

/* =========================
   Main & Blog Cards
========================= */
main {
  max-width: 800px;
  width: 90%;
  margin: 3rem auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

main.center-vertical {
  min-height: 80vh;
  justify-content: center;
}

.card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  transition: transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.6);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.card-content h2 {
  margin-bottom: 10px;
  font-size: 22px;
  color: var(--text);
}

.card-content p {
  color: var(--card-text);
  line-height: 1.5;
}

.card-content .meta {
  font-size: 0.85rem;
  color: #a0a8b8;
  margin-bottom: 10px;
}

.card a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s;
}

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

/* =========================
   Buttons
========================= */
button, .btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover, .btn:hover {
  background: var(--primary);
}

/* =========================
   Footer
========================= */
footer {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  color: var(--footer-text);
  font-size: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: var(--primary);
}

/* =========================
   Forms
========================= */
form {
  width: 100%;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--card-text);
}

form label {
  font-weight: bold;
  color: var(--card-text);
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form textarea,
form input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--body-bg);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}

form input::placeholder,
form textarea::placeholder {
  color: var(--footer-text);
}

form input:focus,
form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 5px rgba(30,78,140,0.5);
  outline: none;
}

/* Password Toggle */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  flex: 1;
}

.toggle-password {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--footer-text);
  font-size: 1rem;
}

/* Form Buttons */
form .btn {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  transition: background-color 0.3s, transform 0.2s;
}

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

form .btn:active {
  transform: translateY(0);
}

/* File Input */
form input[type="file"]::file-selector-button {
  background-color: var(--accent);
  color: var(--text);
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background-color 0.3s;
}

form input[type="file"]::file-selector-button:hover {
  background-color: var(--primary);
}

/* =========================
   Links
========================= */
a {
  text-decoration: none;
}

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

/* =========================
   Responsive
========================= */
@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    gap: 1rem;
    background: var(--primary);
    position: absolute;
    top: 70px;
    right: 0;
    width: 200px;
    padding: 1rem;
    border-radius: 0 0 0 10px;
  }

  nav ul.active {
    display: flex;
  }

  #menu-toggle {
    display: block;
  }
}

@media (max-width: 480px) {
  .card img {
    height: 150px;
  }

  .card-content h2 {
    font-size: 20px;
  }
}
/* =========================
   Header & Navbar
========================= */
header {
  background: var(--primary);
  color: var(--text);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Logo image + text */
.logo {
  display: flex;
  align-items: center;
  font-size: 1.8rem;
  font-weight: bold;
}

.logo-img {
  width: 40px;
  height: 40px;
  margin-right: 10px;
  border-radius: 6px;
  object-fit: cover;
}

/* Nav links */
nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

nav ul li a, nav ul li button {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

nav ul li a:hover, nav ul li button:hover {
  color: var(--accent);
}

/* Google button */
#googleBtn {
  background-color: #DB4437; /* Google red */
  color: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.9rem;
  transition: background-color 0.3s;
}

#googleBtn:hover {
  background-color: #c33d2e;
}

/* Profile section */
#userProfile {
  display: flex;
  align-items: center;
  gap: 6px;
}

#userProfile span {
  font-size: 0.9rem;
  color: var(--text);
}

.profile-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* Logout button */
#logoutBtn {
  background-color: var(--accent);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
}

#logoutBtn:hover {
  background-color: var(--primary);
}

/* Hamburger menu toggle */
#menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
}

/* =========================
   Responsive Header
========================= */
@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    gap: 1rem;
    background: var(--primary);
    position: absolute;
    top: 70px;
    right: 0;
    width: 220px;
    padding: 1rem;
    border-radius: 0 0 0 10px;
  }

  nav ul.active {
    display: flex;
  }

  #menu-toggle {
    display: block;
  }
}
