/* Acushnet Project Website Styles */
:root {
  --navy: #0a2540;
  --deep-blue: #1a3a5c;
  --gold: #c9a227;
  --light-gold: #e8d48b;
  --white: #ffffff;
  --off-white: #f7f5f2;
  --gray: #5a6a7a;
  --light-gray: #e8eef3;
  --accent: #c0392b;
  --success: #27ae60;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--navy);
  background: var(--off-white);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
header {
  background: var(--navy);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
}

.logo img {
  height: 50px;
  width: auto;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo-text span {
  color: var(--gold);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 8px;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: background 0.2s;
}

nav a:hover, nav a.active {
  background: var(--deep-blue);
  color: var(--gold);
}

.mobile-menu {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  height: 85vh;
  min-height: 500px;
  background: linear-gradient(rgba(10,37,64,0.55), rgba(10,37,64,0.7)), url('../images/hero-ship.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  color: white;
  text-align: center;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.hero-content .tagline {
  font-size: 1.6rem;
  color: var(--light-gold);
  margin-bottom: 24px;
  font-weight: 500;
}

.hero-content p {
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto 32px;
  opacity: 0.95;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--gold);
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  border-radius: 6px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover {
  background: var(--light-gold);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
  margin-left: 12px;
}

.btn-outline:hover {
  background: var(--gold);
  color: var(--navy);
}

/* Sections */
section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 2.4rem;
  margin-bottom: 16px;
  color: var(--navy);
}

.section-subtitle {
  text-align: center;
  color: var(--gray);
  max-width: 700px;
  margin: 0 auto 48px;
  font-size: 1.1rem;
}

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

.card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-6px);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 24px;
}

.card h3 {
  margin-bottom: 12px;
  color: var(--navy);
}

/* Mission bar */
.mission-bar {
  background: var(--navy);
  color: white;
  text-align: center;
  padding: 40px 20px;
}

.mission-bar h2 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.mission-bar p {
  font-size: 1.2rem;
  color: var(--light-gold);
}

/* Footer */
footer {
  background: var(--navy);
  color: #ccc;
  padding: 60px 0 30px;
}

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

footer h4 {
  color: white;
  margin-bottom: 16px;
}

footer a {
  color: #aaa;
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
}

footer a:hover {
  color: var(--gold);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #2a4a6a;
  font-size: 0.9rem;
}

/* Chat styles */
.chat-container {
  max-width: 900px;
  margin: 40px auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.1);
  overflow: hidden;
  height: 70vh;
  display: flex;
  flex-direction: column;
}

.chat-header {
  background: var(--navy);
  color: white;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f0f4f8;
}

.message {
  margin-bottom: 16px;
  max-width: 75%;
}

.message.sent {
  margin-left: auto;
  background: var(--navy);
  color: white;
  padding: 12px 16px;
  border-radius: 18px 18px 4px 18px;
}

.message.received {
  background: white;
  padding: 12px 16px;
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.message .meta {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-bottom: 4px;
}

.chat-input {
  display: flex;
  padding: 16px;
  background: white;
  border-top: 1px solid #ddd;
  gap: 12px;
}

.chat-input input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 24px;
  font-size: 1rem;
  outline: none;
}

.chat-input input:focus {
  border-color: var(--gold);
}

.chat-input button {
  background: var(--gold);
  color: var(--navy);
  border: none;
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: 700;
  cursor: pointer;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

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

/* Page header */
.page-header {
  background: linear-gradient(rgba(10,37,64,0.7), rgba(10,37,64,0.7)), url('../images/hero-ship.jpg') center/cover;
  color: white;
  padding: 100px 0 60px;
  text-align: center;
}

.page-header h1 {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-content h1 { font-size: 2.2rem; }
  .hero-content .tagline { font-size: 1.2rem; }
  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 20px;
  }
  nav ul.open { display: flex; }
  .mobile-menu { display: block; }
  .btn-outline { margin-left: 0; margin-top: 12px; display: block; }
}

.highlight-box {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border-left: 5px solid var(--gold);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ===== Members Chat (Firebase) ===== */
[hidden] { display: none !important; }

.chat-section { padding-top: 40px; }

.chat-panel {
  max-width: 500px;
  margin: 0 auto;
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  text-align: center;
}

.chat-panel h2 { margin-bottom: 12px; }

.chat-panel-lead {
  margin-bottom: 24px;
  color: var(--gray);
}

.chat-panel-lead a { color: var(--deep-blue); }

.chat-panel form { text-align: left; }

.btn-block { display: block; width: 100%; }
.btn-small { padding: 8px 16px; font-size: 0.9rem; }
.btn-small:hover { transform: none; }
.btn-ghost { background: transparent; border: 1px solid var(--gray); color: var(--navy); }
.btn-ghost:hover { background: var(--light-gray); }
.btn-danger { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.btn-danger:hover { background: var(--accent); color: white; }

.auth-tabs {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--light-gray);
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.auth-tab.active { color: var(--navy); border-bottom-color: var(--gold); }

.auth-small {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--gray);
  text-align: center;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--deep-blue);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.form-message {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.95rem;
  text-align: left;
}

.form-message.is-error { background: #fdecea; color: var(--accent); }
.form-message.is-ok { background: #e8f6ee; color: var(--success); }

.chat-user { font-size: 0.85rem; opacity: 0.8; }

.chat-header-actions { display: flex; gap: 8px; align-items: center; }

.chat-header-btn {
  background: transparent;
  border: 1px solid white;
  color: white;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
}

.chat-header-btn:hover { border-color: var(--gold); color: var(--gold); }

.message-text { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }

.meta-name { font-weight: 700; }

.msg-delete {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.8;
  font-size: 0.75rem;
  margin-left: 8px;
  text-decoration: underline;
  cursor: pointer;
}

.msg-delete:hover { opacity: 1; color: var(--accent); }
.message.sent .msg-delete:hover { color: var(--light-gold); }

.chat-input button:disabled { opacity: 0.6; cursor: default; }

.chat-footer-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px 10px;
  background: white;
  font-size: 0.8rem;
  color: var(--gray);
}

.chat-error { color: var(--accent); text-align: right; }

.chat-note {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--gray);
}

/* Admin page */
.admin-toolbar {
  max-width: 900px;
  margin: 0 auto 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-card {
  max-width: 900px;
  margin: 0 auto 28px;
  background: white;
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border-left: 5px solid var(--gold);
}

.admin-card h2 { font-size: 1.4rem; margin-bottom: 16px; }

.admin-count {
  display: inline-block;
  min-width: 28px;
  padding: 2px 10px;
  border-radius: 14px;
  background: var(--navy);
  color: var(--gold);
  font-size: 0.9rem;
  text-align: center;
  vertical-align: middle;
}

.member-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--light-gray);
  flex-wrap: wrap;
}

.member-info { display: flex; flex-direction: column; }
.member-sub { font-size: 0.85rem; color: var(--gray); }
.member-actions { display: flex; gap: 8px; }
.member-empty { color: var(--gray); }

@media (max-width: 768px) {
  .chat-panel { padding: 28px 20px; }
  .message { max-width: 90%; }
}

.btn-small, .chat-input button, .chat-input input, .chat-header-btn, .auth-tab, .msg-delete { font-family: inherit; }
