/* 
   assets/css/style.css
   Modern, stunning, responsive design system for Deaf Resource Centre Nigeria
   Incorporates Dark Mode, Accessibility Controls, and Glassmorphism
*/

:root {
  /* Colors */
  --primary: #0d9488;
  --primary-light: #2dd4bf;
  --primary-dark: #0f766e;
  --secondary: #d97706;
  --secondary-light: #fbbf24;
  --secondary-dark: #b45309;
  
  /* Light Theme (Default) */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: rgba(226, 232, 240, 0.8);
  --shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  --accent: #6366f1;
}

/* Dark Theme Variables */
body.dark-mode {
  --bg-primary: #0b1329;
  --bg-secondary: #1c2541;
  --bg-card: rgba(28, 37, 65, 0.85);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border-color: rgba(58, 80, 107, 0.5);
  --shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.3);
  --accent: #818cf8;
}

/* Base Elements */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  margin-top: 0;
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: 2.8rem; letter-spacing: -0.02em; }
h2 { font-size: 2.2rem; letter-spacing: -0.01em; margin-bottom: 20px; }
h3 { font-size: 1.5rem; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

/* Containers */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 0;
}

/* Navigation Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(var(--bg-primary), 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 0;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-dark);
}
body.dark-mode .site-logo {
  color: var(--primary-light);
}
.site-logo img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  gap: 30px;
}
.nav-menu a {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}
.nav-menu a:hover, .nav-menu li.active a {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Header Utilities */
.nav-utils {
  display: flex;
  align-items: center;
  gap: 15px;
}
.btn-toggle {
  background: none;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s ease;
}
.btn-toggle:hover {
  background-color: var(--bg-secondary);
  transform: scale(1.05);
}

/* Hero Section */
.hero {
  position: relative;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.05) 0%, rgba(217, 119, 6, 0.05) 100%);
  padding: 100px 0;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 50px;
  align-items: center;
}
.hero-tag {
  display: inline-block;
  background-color: rgba(13, 148, 136, 0.1);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}
body.dark-mode .hero-tag {
  color: var(--primary-light);
  background-color: rgba(45, 212, 191, 0.15);
}
.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
}
.hero-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 35px;
}
.hero-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-weight: 600;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background-color: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px -5px rgba(13, 148, 136, 0.3);
}
.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  color: #fff;
}
.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background-color: var(--border-color);
  transform: translateY(-2px);
}

/* Cards & Grid Layouts */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
  border-color: var(--primary);
}
.card-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  display: inline-block;
}

/* Blog Layout */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 35px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.blog-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
}
.blog-card h3 {
  margin-bottom: 10px;
  font-size: 1.4rem;
}
.blog-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
  display: flex;
  gap: 15px;
}
.blog-excerpt {
  color: var(--text-secondary);
  flex-grow: 1;
  margin-bottom: 20px;
}

/* Services Grid Layout */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow);
}
.service-card h3 {
  color: var(--primary-dark);
  margin-bottom: 15px;
}
body.dark-mode .service-card h3 {
  color: var(--primary-light);
}

/* Footer Section */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px 0;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 40px;
}
.footer-about h3 {
  color: var(--primary-dark);
  font-weight: 800;
}
body.dark-mode .footer-about h3 {
  color: var(--primary-light);
}
.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links ul li {
  margin-bottom: 12px;
}
.footer-links ul a {
  color: var(--text-secondary);
  font-weight: 500;
}
.footer-links ul a:hover {
  color: var(--primary);
}
.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* PWA Floating Installation Banner */
.pwa-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.95);
  color: #fff;
  border-radius: 16px;
  padding: 16px 24px;
  display: none;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  z-index: 9999;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 600px;
  margin: 0 auto;
}
.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 15px;
}
.pwa-banner-content img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}
.pwa-banner-text h4 {
  color: #fff;
  margin: 0;
  font-size: 1.05rem;
}
.pwa-banner-text p {
  color: #94a3b8;
  margin: 4px 0 0 0;
  font-size: 0.85rem;
}
.pwa-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.btn-install {
  background-color: var(--primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}
.btn-install:hover {
  background-color: var(--primary-dark);
}
.btn-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 5px;
}
.btn-close:hover {
  color: #fff;
}

/* Animations */
@keyframes slideUp {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Mobile Responsive Adjustments */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-buttons {
    justify-content: center;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  .header-container {
    position: relative;
  }
  .nav-menu {
    display: none; /* In production: a clean responsive toggle can trigger this */
  }
  .nav-menu.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    gap: 15px;
    box-shadow: var(--shadow);
  }
}
