/* ============================================
   PLEMIS - Institutional Knowledge Portal
   CSS System - Global Styles
   ============================================ */

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

/* ============================================
   Color Palette & Design Tokens
   ============================================ */

:root {
  /* Primary & Neutral Colors */
  --primary-bg: #F5F5F5;
  --secondary-text: #36454F;
  --off-white: #FFFFFF;
  --light-grey: #E0E0E0;
  
  /* Accent Colors */
  --teal-primary: #008080;
  --gold-accent: #B8860B;
  --lavender-accent: #C8A2C8;
  
  /* Spacing Scale (8px system) */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-xxl: 64px;
  --space-xxxl: 120px;
  
  /* Typography Scale */
  --font-main: 'Open Sans', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Montserrat', 'Oswald', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Sizing */
  --max-width: 1440px;
  --container-padding: 40px;
  
  /* Transitions */
  --transition-smooth: all 0.3s ease-out;
  --transition-fade: opacity 0.4s ease-out;
}

/* ============================================
   Global Styles
   ============================================ */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--primary-bg);
  color: var(--secondary-text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

/* Typography System */

h1 {
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--teal-primary);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.5px;
}

h2 {
  font-family: var(--font-heading);
  font-size: 42px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--teal-primary);
  margin-bottom: var(--space-md);
  margin-top: var(--space-xl);
}

h3 {
  font-family: var(--font-main);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--secondary-text);
  margin-bottom: var(--space-md);
  margin-top: var(--space-lg);
}

p {
  margin-bottom: var(--space-md);
  line-height: 1.8;
  font-size: 16px;
}

a {
  color: var(--teal-primary);
  text-decoration: none;
  transition: var(--transition-smooth);
  border-bottom: 1px solid transparent;
}

a:hover {
  border-bottom-color: var(--teal-primary);
}

/* ============================================
   Container & Layout
   ============================================ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

section {
  padding-top: var(--space-xxxl);
  padding-bottom: var(--space-xxxl);
  animation: fadeInUp 0.6s ease-out;
}

section:first-of-type {
  padding-top: var(--space-lg);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Header & Navigation
   ============================================ */

header {
  background-color: var(--off-white);
  border-bottom: 1px solid var(--light-grey);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--container-padding);
}

.logo {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--teal-primary);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

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

nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-lg);
}

nav a {
  font-weight: 500;
  font-size: 15px;
  border-bottom: 2px solid transparent;
  transition: var(--transition-smooth);
}

nav a:hover,
nav a.active {
  border-bottom-color: var(--teal-primary);
  color: var(--teal-primary);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  position: relative;
  height: 680px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: brightness(0.7);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--off-white);
  max-width: 800px;
}

.hero h1 {
  color: var(--off-white);
  font-size: 64px;
  margin-bottom: var(--space-lg);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 20px;
  color: var(--off-white);
  margin-bottom: var(--space-lg);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Content Sections
   ============================================ */

.section-intro {
  background-color: var(--primary-bg);
}

.section-teal-bg {
  background-color: var(--teal-primary);
}

.section-teal-bg h2,
.section-teal-bg p {
  color: var(--off-white);
}

.section-lavender-bg {
  background-color: var(--lavender-accent);
}

.section-lavender-bg p {
  color: var(--secondary-text);
}

/* ============================================
   Two-Column Layout
   ============================================ */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.grid-2.reverse {
  direction: rtl;
}

.grid-2.reverse > * {
  direction: ltr;
}

.grid-2-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  display: block;
}

.grid-2-text h2 {
  margin-top: 0;
}

/* ============================================
   Three-Column Grid
   ============================================ */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

/* ============================================
   Cards
   ============================================ */

.card {
  background-color: var(--off-white);
  border: 1px solid var(--light-grey);
  border-radius: 8px;
  padding: var(--space-lg);
  transition: var(--transition-smooth);
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0, 128, 128, 0.1);
  transform: translateY(-3px);
  border-color: var(--teal-primary);
}

.card h3 {
  margin-top: 0;
  color: var(--teal-primary);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--teal-primary);
  border-radius: 4px;
  background-color: transparent;
  color: var(--teal-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn:hover {
  background-color: var(--teal-primary);
  color: var(--off-white);
  box-shadow: 0 4px 12px rgba(0, 128, 128, 0.2);
}

.btn-primary {
  background-color: var(--teal-primary);
  color: var(--off-white);
  border-color: var(--teal-primary);
}

.btn-primary:hover {
  background-color: #006666;
  border-color: #006666;
}

/* ============================================
   Lists & Typography Elements
   ============================================ */

ul, ol {
  margin-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

li {
  margin-bottom: var(--space-sm);
  line-height: 1.8;
}

blockquote {
  border-left: 4px solid var(--gold-accent);
  padding-left: var(--space-lg);
  margin: var(--space-lg) 0;
  font-style: italic;
  color: var(--secondary-text);
}

/* ============================================
   Forms
   ============================================ */

form {
  max-width: 600px;
}

.form-group {
  margin-bottom: var(--space-lg);
}

label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 600;
  color: var(--secondary-text);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: var(--space-sm);
  font-family: var(--font-main);
  font-size: 16px;
  border: 1px solid var(--light-grey);
  border-radius: 4px;
  background-color: var(--off-white);
  color: var(--secondary-text);
  transition: var(--transition-smooth);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--teal-primary);
  box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

/* ============================================
   Footer
   ============================================ */

footer {
  background-color: var(--secondary-text);
  color: var(--off-white);
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
  margin-top: var(--space-xxxl);
}

footer a {
  color: var(--gold-accent);
  border-bottom: 1px solid transparent;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-section h4 {
  color: var(--gold-accent);
  margin-bottom: var(--space-md);
  font-size: 16px;
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
  margin-left: 0;
}

.footer-section li {
  margin-bottom: var(--space-sm);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-lg);
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   Blog Grid
   ============================================ */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.blog-card {
  background-color: var(--off-white);
  border: 1px solid var(--light-grey);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.blog-card:hover {
  box-shadow: 0 12px 32px rgba(0, 128, 128, 0.12);
  transform: translateY(-4px);
}

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

.blog-card-content {
  padding: var(--space-lg);
}

.blog-card-date {
  font-size: 12px;
  color: var(--gold-accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-xs);
}

.blog-card h3 {
  margin: var(--space-sm) 0;
  font-size: 20px;
}

.blog-card p {
  font-size: 14px;
  color: #666;
  margin-bottom: var(--space-md);
}

.read-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--teal-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.read-more:hover {
  gap: 12px;
}

/* ============================================
   Utility Classes
   ============================================ */

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

.text-balance {
  text-wrap: balance;
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mb-xl {
  margin-bottom: var(--space-xl);
}

.pt-xxxl {
  padding-top: var(--space-xxxl);
}

.pb-xxxl {
  padding-bottom: var(--space-xxxl);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
  .container {
    padding: 0 30px;
  }
  
  h1 {
    font-size: 48px;
  }
  
  h2 {
    font-size: 36px;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .grid-2.reverse {
    direction: ltr;
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero {
    height: 500px;
  }
  
  .hero h1 {
    font-size: 48px;
  }
  
  section {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: 24px;
  }
  
  h1 {
    font-size: 36px;
  }
  
  h2 {
    font-size: 28px;
  }
  
  h3 {
    font-size: 20px;
  }
  
  nav ul {
    gap: var(--space-md);
  }
  
  nav a {
    font-size: 14px;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .hero {
    height: 400px;
  }
  
  .hero h1 {
    font-size: 32px;
  }
  
  .hero p {
    font-size: 16px;
  }
  
  section {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
  }
  
  .form-group {
    margin-bottom: var(--space-md);
  }
}
