/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Lora:ital,wght@0,400;0,500;1,400&display=swap');

/* CSS Variables */
:root {
  --bg-primary: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border-color: #e2e8f0;
  --border-color-hover: #cbd5e1;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  /* Brand Colors from SVG Logo */
  --brand-blue: #0078b4;
  --brand-light-blue: #0078b4;
  --brand-accent-blue: #80bcda;
  
  --font-sans: 'Outfit', sans-serif;
  --font-serif: 'Lora', Georgia, serif;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-quick: all 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background/Hero Art Overlay */
.background-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  background-color: var(--bg-primary);
}

.background-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.08; /* Extremely faint watermark */
  filter: grayscale(100%) contrast(85%) brightness(115%);
  transform: scale(1.05);
  animation: slowZoom 45s infinite alternate ease-in-out;
}

.background-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Gradient that overlays a soft tech-blue tint and washes out the image */
  background: 
    radial-gradient(circle at 90% 10%, rgba(128, 188, 218, 0.18) 0%, rgba(248, 250, 252, 0.1) 50%),
    radial-gradient(circle at 10% 90%, rgba(0, 120, 180, 0.12) 0%, rgba(248, 250, 252, 0.1) 50%),
    linear-gradient(to bottom, rgba(248, 250, 252, 0.75) 0%, rgba(248, 250, 252, 0.95) 75%, var(--bg-primary) 100%);
  z-index: -1;
}

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header & Logo styling */
header {
  padding: 4rem 0 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo-container {
  max-width: 280px;
  width: 100%;
  margin-bottom: 1rem;
  transition: var(--transition-smooth);
  filter: drop-shadow(0 4px 12px rgba(0, 120, 180, 0.08));
}

.logo-container:hover {
  transform: translateY(-3px) scale(1.01);
  filter: drop-shadow(0 8px 20px rgba(0, 120, 180, 0.15));
}

.logo-container img {
  width: 100%;
  height: auto;
  display: block;
}

.tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--brand-blue);
  margin-top: 0.5rem;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

/* Main Layout Grid */
.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

@media (min-width: 900px) {
  .main-grid {
    grid-template-columns: 1.25fr 0.75fr;
  }
}

/* Glassmorphic Panel (Common Style) */
.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 
    0 1px 3px rgba(15, 23, 42, 0.03),
    0 10px 30px rgba(15, 23, 42, 0.03);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(0, 120, 180, 0.25);
  box-shadow: 
    0 1px 3px rgba(15, 23, 42, 0.03),
    0 20px 45px rgba(0, 120, 180, 0.06);
}

/* History Content Area */
.history-section h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.history-section p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.history-section p:first-of-type {
  font-size: 1.15rem;
  color: var(--text-primary);
  line-height: 1.8;
  font-family: var(--font-serif);
}

/* Sidebar Info & Form */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 120, 180, 0.06);
  border: 1px solid rgba(0, 120, 180, 0.15);
  color: var(--brand-blue);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.825rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  align-self: flex-start;
}

.status-badge::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--brand-blue);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
  }
  100% {
    transform: scale(0.9);
    opacity: 0.6;
  }
}

.signup-box h2 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.signup-box p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1rem;
}

.form-input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.85rem 1.1rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition-quick);
}

.form-input:focus {
  outline: none;
  border-color: var(--brand-blue);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 120, 180, 0.08);
}

.btn-primary {
  width: 100%;
  background: var(--brand-blue);
  border: none;
  border-radius: 8px;
  padding: 0.95rem;
  color: white;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-quick);
  box-shadow: 0 4px 12px rgba(0, 120, 180, 0.15);
}

.btn-primary:hover {
  background: #006da3;
  box-shadow: 0 6px 16px rgba(0, 120, 180, 0.25);
}

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

/* Archive Highlight / Stat Widget */
.stat-widget {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(0, 120, 180, 0.02);
  border: 1px solid rgba(0, 120, 180, 0.05);
  padding: 1.25rem;
  border-radius: 12px;
  margin-top: 1rem;
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--brand-blue);
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Facebook Cards Grid Section */
.communities-section {
  margin-bottom: 5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 650px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.community-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.02);
}

.community-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--brand-blue);
  opacity: 0;
  transition: var(--transition-quick);
}

.community-card:hover {
  border-color: rgba(0, 120, 180, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 120, 180, 0.06);
}

.community-card:hover::before {
  opacity: 1;
}

.card-header-icon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(0, 120, 180, 0.05);
  color: var(--brand-blue);
  font-size: 1.25rem;
  border: 1px solid rgba(0, 120, 180, 0.1);
}

.card-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  text-transform: uppercase;
}

.badge-active {
  background: rgba(0, 120, 180, 0.06);
  color: var(--brand-blue);
  border: 1px solid rgba(0, 120, 180, 0.12);
}

.badge-dev {
  background: rgba(100, 116, 139, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(100, 116, 139, 0.12);
}

.community-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.community-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand-blue);
  text-decoration: none;
  transition: var(--transition-quick);
}

.card-link svg {
  transition: transform 0.2s ease;
  fill: none;
  stroke: currentColor;
}

.community-card:hover .card-link {
  color: #006da3;
}

.community-card:hover .card-link svg {
  transform: translateX(4px);
}

/* Footer Section */
footer {
  text-align: center;
  padding: 4rem 0 3rem;
  border-top: 1px solid var(--border-color);
  background: #ffffff;
  margin-top: auto;
}

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

.footer-logo {
  max-width: 120px;
  opacity: 0.6;
  transition: var(--transition-quick);
}

.footer-logo:hover {
  opacity: 0.9;
}

.footer-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition-quick);
}

.footer-link:hover {
  color: var(--brand-blue);
}

/* Alert Notification styling */
.alert-success {
  background: rgba(0, 120, 180, 0.05);
  border: 1px solid rgba(0, 120, 180, 0.15);
  color: var(--brand-blue);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: none;
}
