/* Solar Energy Research Group Design System
   Colors: Navy Blue primary, Forest Green secondary, Amber accent
   Style: Clean, academic, modern with generous whitespace
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
  /* Background tones */
  --background: hsl(210, 20%, 98%);
  --foreground: hsl(215, 25%, 15%);

  /* Card surfaces */
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(215, 25%, 15%);

  /* Primary: Navy Blue #1a365d */
  --primary: hsl(216, 55%, 23%);
  --primary-foreground: hsl(210, 40%, 98%);

  /* Secondary: Forest Green #2d6a4f */
  --secondary: hsl(155, 41%, 30%);
  --secondary-foreground: hsl(210, 40%, 98%);

  /* Muted tones */
  --muted: hsl(210, 15%, 95%);
  --muted-foreground: hsl(215, 15%, 45%);

  /* Accent: Amber/Orange #f59e0b */
  --accent: hsl(38, 92%, 50%);
  --accent-foreground: hsl(215, 25%, 15%);

  --danger: hsl(0, 92%, 50%);
  --danger-foreground: hsl(210, 40%, 98%);

  --warning: hsl(24, 92%, 50%);
  --warning-foreground: hsl(215, 25%, 15%);

  --info: hsl(207, 92%, 50%);
  --info-foreground: hsl(210, 40%, 98%);

  /* Borders */
  --border: hsl(210, 20%, 88%);

  /* Hero overlay */
  --hero-overlay: hsl(216, 55%, 23%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--foreground);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.875rem);
}

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

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

/* Layout Components */
.min-h-screen {
  min-height: 100vh;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-1 {
  flex: 1;
}

.section-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .section-container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .section-container {
    padding: 0 2rem;
  }
}

.section-padding {
  padding: 4rem 0;
}

@media (min-width: 768px) {
  .section-padding {
    padding: 6rem 0;
  }
}

.section-alt {
  background-color: var(--muted);
  background-color: hsl(210, 15%, 96%);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

@media (min-width: 1024px) {
  .header-content {
    height: 5rem;
  }
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 3rem;
  width: auto;
}

.logo-text {
  display: block;
}

.logo-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
}

.logo-subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Navigation */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  transition: all 0.2s;
  color: var(--muted-foreground);
}

.nav-link:hover {
  color: var(--foreground);
  background-color: var(--muted);
}

.nav-link.active {
  color: var(--primary);
  background-color: hsla(216, 55%, 23%, 0.05);
}

/* Mobile Menu */
.mobile-menu-button {
  display: block;
  padding: 0.5rem;
  border: none;
  background: none;
  cursor: pointer;
}

@media (min-width: 1024px) {
  .mobile-menu-button {
    display: none;
  }
}

.mobile-menu {
  display: block;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

@media (min-width: 1024px) {
  .mobile-menu {
    display: none;
  }
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  min-width: 12rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 50;
  display: none;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  text-align: left;
  transition: background-color 0.2s;
}

.dropdown-item:hover {
  background-color: var(--muted);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding-left: 15px;
  padding-right: 15px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-slide {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

.hero-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.hero-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  border: 2px solid hsla(210, 40%, 98%, 0.6);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.3s, border-color 0.3s;
}

.hero-dot:hover {
  border-color: var(--primary-foreground);
}

.hero-dot.active {
  background-color: var(--primary-foreground);
  border-color: var(--primary-foreground);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    hsla(216, 55%, 23%, 0.95) 0%,
    hsla(216, 55%, 23%, 0.8) 50%,
    hsla(216, 55%, 23%, 0.6) 100%
  );
}

.hero-content {
  position: relative;
  padding: 5rem 0;
}

@media (min-width: 1024px) {
  .hero-content {
    padding: 8rem 0;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: hsla(38, 92%, 50%, 0.2);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero-title {
  color: var(--primary-foreground);
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.125rem;
  color: hsla(210, 40%, 98%, 0.8);
  margin-bottom: 2rem;
  max-width: 36rem;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
    gap: 1rem;
  }

  .hero-badge {
    font-size: 0.875rem;
  }
}

@media (min-width: 768px) {
  .hero-description {
    font-size: 1.25rem;
  }
}

/* Cards */
.card-academic {
  background-color: var(--card);
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
}

.card-academic:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-color: hsla(216, 55%, 23%, 0.2);
}

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tag-primary {
  background-color: hsla(216, 55%, 23%, 0.1);
  color: var(--primary);
}

.tag-secondary {
  background-color: hsla(155, 41%, 30%, 0.1);
  color: var(--secondary);
}

.tag-accent {
  background-color: hsla(38, 92%, 50%, 0.1);
  color: var(--accent);
}

.tag-info {
  background-color: hsla(207, 92%, 50%, 0.1);
  color: var(--info);
}

.tag-danger {
  background-color: hsla(0, 92%, 50%, 0.1);
  color: var(--danger);
}

.tag-warning {
  background-color: hsla(24, 92%, 50%, 0.1);
  color: var(--warning);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.btn-primary:hover {
  background-color: hsl(38, 92%, 45%);
}

.btn-outline {
  border: 1px solid var(--border);
  background-color: transparent;
}

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

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Form Inputs */
.input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--foreground);
  background-color: var(--card);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px hsla(216, 55%, 23%, 0.2);
}

.input::placeholder {
  color: var(--muted-foreground);
}

textarea.input {
  resize: vertical;
}

/* Grid */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .grid-cols-sm-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .grid-cols-md-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-cols-md-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid-cols-lg-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-cols-lg-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid-cols-lg-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Footer */
.footer {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.footer-content {
  padding: 2rem 15px;
}

@media (min-width: 768px) {
  .footer-content {
    padding: 3rem 15px;
  }
}

@media (min-width: 1024px) {
  .footer-content {
    padding: 4rem 15px;
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
  }
}

.footer-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-subtitle {
  display: block;
  font-size: 0.75rem;
  color: hsla(210, 40%, 98%, 0.7);
}

.footer-text {
  font-size: 0.875rem;
  color: hsla(210, 40%, 98%, 0.8);
  line-height: 1.6;
}

.footer-link {
  color: hsla(210, 40%, 98%, 0.8);
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--primary-foreground);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid hsla(210, 40%, 98%, 0.1);
}

@media (min-width: 768px) {
  .footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
  }
}

.footer-bottom-text {
  font-size: 0.75rem;
  color: hsla(210, 40%, 98%, 0.6);
}

@media (min-width: 640px) {
  .footer-bottom-text {
    font-size: 0.875rem;
  }
}

/* Utilities */
.text-center {
  text-align: center;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

.mt-4 {
  margin-top: 1rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.items-start {
  align-items: flex-start;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.max-w-2xl {
  max-width: 42rem;
}

.max-w-3xl {
  max-width: 54rem;
}

.text-muted-foreground {
  color: var(--muted-foreground);
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Post Cards */
.post-card:hover img {
  transform: scale(1.05);
}

.read-more-link svg {
  transition: transform 0.2s;
}

.read-more-link:hover svg {
  transform: translateX(3px);
}

.tag-outline {
  border: 1px solid var(--border);
  background-color: transparent;
  color: var(--muted-foreground);
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.breadcrumb-separator {
  color: var(--border);
}

/* Responsive utilities */
@media (max-width: 1023px) {
  .lg-hidden {
    display: none;
  }

  .hero-title {
    text-align: center;
  }
}

@media (min-width: 1024px) {
  .lg-block {
    display: block;
  }
}
