/* ============================================================
   Plus1 — main.css
   ============================================================ */

/* Reset & Base
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans TC", system-ui, -apple-system, sans-serif;
  background: #fafaf8;
  color: #1a1a1a;
  line-height: 1.7;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Layout
   ------------------------------------------------------------ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: #2d7a6e;
  margin-top: 0.4rem;
  border-radius: 2px;
}

/* Navbar
   ------------------------------------------------------------ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
  z-index: 100;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: #2d7a6e;
  letter-spacing: 0.02em;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar-links a {
  font-size: 0.95rem;
  color: #1a1a1a;
  transition: color 0.15s;
}

.navbar-links a:hover {
  color: #2d7a6e;
}

.lang-switch {
  border: 1px solid #2d7a6e;
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
  color: #2d7a6e !important;
  transition: background 0.15s, color 0.15s !important;
}

.lang-switch:hover {
  background: #2d7a6e;
  color: #ffffff !important;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #1a1a1a;
  padding: 0.25rem 0.5rem;
  line-height: 1;
}

/* Hero
   ------------------------------------------------------------ */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, #2d7a6e 0%, #1a5c52 100%);
  color: #ffffff;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.6rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
  border: none;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: #2d7a6e;
  color: #ffffff;
}

.btn-primary:hover {
  background: #235f56;
  color: #ffffff;
}

.btn-secondary {
  background: transparent;
  border: 2px solid #ffffff;
  color: #ffffff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-outline {
  background: transparent;
  border: 2px solid #2d7a6e;
  color: #2d7a6e;
}

.btn-outline:hover {
  background: #2d7a6e;
  color: #ffffff;
}

.btn-donate {
  background: #e8916a;
  color: #ffffff;
  font-size: 1.1rem;
  padding: 0.9rem 2rem;
  border-radius: 4px;
}

.btn-donate:hover {
  background: #d4785a;
  color: #ffffff;
}

.btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}

.btn-danger {
  background: #ef4444;
  color: #ffffff;
}

.btn-danger:hover {
  background: #dc2626;
  color: #ffffff;
}

/* Cards
   ------------------------------------------------------------ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card-text {
  font-size: 0.9rem;
  color: #555555;
  margin-bottom: 1rem;
  line-height: 1.6;
  flex: 1;
}

/* Gallery
   ------------------------------------------------------------ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  aspect-ratio: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
  display: block;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-title {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Modal / Lightbox
   ------------------------------------------------------------ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #ffffff;
  border-radius: 8px;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  position: relative;
}

.modal-img {
  max-height: 60vh;
  object-fit: contain;
  width: 100%;
  background: #f0f0f0;
}

.modal-body {
  padding: 1.5rem;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.modal-desc {
  font-size: 0.95rem;
  color: #555555;
  line-height: 1.7;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #ffffff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  z-index: 1001;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.15s;
  font-family: inherit;
}

.modal-close:hover {
  background: #f0f0f0;
}

.modal-nav {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid #eeeeee;
}

/* Katie Intro
   ------------------------------------------------------------ */
.katie-intro {
  background: #fff9f5;
  border-left: 4px solid #e8916a;
  padding: 1.5rem 2rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 2rem;
  font-style: italic;
}

.katie-intro p + p {
  margin-top: 0.75rem;
}

/* Service Pages
   ------------------------------------------------------------ */
.service-hero {
  background: linear-gradient(135deg, #2d7a6e, #1a5c52);
  color: #ffffff;
  padding: 5rem 0 4rem;
}

.service-section {
  border-bottom: 1px solid #eeeeee;
  padding: 2.5rem 0;
}

.feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.feature-list li {
  padding: 0.4rem 0;
}

.feature-list li::before {
  content: "✓";
  color: #2d7a6e;
  font-weight: bold;
  margin-right: 0.5rem;
}

/* Footer
   ------------------------------------------------------------ */
.footer {
  background: #1a1a1a;
  color: #cccccc;
  padding: 3rem 0 1.5rem;
}

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

.footer-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.footer-text {
  font-size: 0.875rem;
  line-height: 1.8;
}

.footer-link {
  color: #aaaaaa;
  transition: color 0.15s;
}

.footer-link:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid #333333;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: #666666;
}

/* Contact CTA
   ------------------------------------------------------------ */
.contact-cta {
  background: #f0faf8;
  padding: 4rem 0;
  text-align: center;
}

.contact-cta-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.contact-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

/* Admin Styles
   ------------------------------------------------------------ */
.admin-layout {
  min-height: 100vh;
  background: #f5f5f5;
}

.admin-nav {
  background: #2d7a6e;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.admin-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #dddddd;
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #ffffff;
  transition: border-color 0.15s;
}

.form-control:focus {
  outline: none;
  border-color: #2d7a6e;
  box-shadow: 0 0 0 2px rgba(45, 122, 110, 0.1);
}

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

.artwork-table {
  width: 100%;
  border-collapse: collapse;
}

.artwork-table th {
  background: #f8f8f8;
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  border-bottom: 2px solid #eeeeee;
}

.artwork-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.artwork-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.badge {
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}

.badge-published {
  background: #d1fae5;
  color: #065f46;
}

.badge-draft {
  background: #f3f4f6;
  color: #6b7280;
}

/* Responsive
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .navbar-links {
    display: none;
  }

  .navbar-links.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 99;
  }

  .navbar-links.open a {
    display: block;
    padding: 0.5rem 0;
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
  }

  .navbar-links.open a:last-child {
    border-bottom: none;
  }

  .hamburger {
    display: block;
  }

  .hero {
    min-height: 60vh;
  }

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

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .feature-list {
    grid-template-columns: 1fr;
  }

  .modal-box {
    width: 95%;
    max-height: 95vh;
  }

  .modal-img {
    max-height: 50vh;
  }

  .section {
    padding: 2.5rem 0;
  }

  .service-hero {
    padding: 3.5rem 0 2.5rem;
  }

  .section-title {
    font-size: 1.5rem;
  }
}

@media (min-width: 769px) {
  .hamburger {
    display: none;
  }
}
