/* ============================================
   CETRIS - Institutional Knowledge Portal
   Educational Resource on Dietary Essentials
   ============================================ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&family=Playfair+Display:wght@400;600;700&display=swap');

/* ============================================
   CSS VARIABLES & COLOR SYSTEM
   ============================================ */

:root {
  /* Primary Colors */
  --primary: #2C3E50;           /* Deep Slate Blue */
  --secondary: #ECEFF1;         /* Warm Grey */
  
  /* Accent Colors */
  --accent-green: #84A98C;      /* Muted Sage Green */
  --accent-terracotta: #D49B89; /* Soft Terracotta */
  
  /* Neutral Colors */
  --bg-white: #FFFFFF;
  --text-dark: #34495E;         /* Dark Grey */
  --text-light: #5D6D7B;        /* Light Grey for secondary text */
  --border-light: #D5D8DC;      /* Light border */
  
  /* Typography */
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Open Sans', sans-serif;
  
  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --spacing-xxl: 80px;
  
  /* Layout */
  --max-width: 1280px;
  --container-padding: 20px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  
  /* Transitions */
  --transition-fast: 200ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(44, 62, 80, 0.1);
  --shadow-md: 0 4px 8px rgba(44, 62, 80, 0.12);
  --shadow-lg: 0 8px 16px rgba(44, 62, 80, 0.15);
  --shadow-xl: 0 12px 24px rgba(44, 62, 80, 0.18);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background-color: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1 {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
  margin-bottom: var(--spacing-md);
  text-balance: true;
}

h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary);
  margin-bottom: var(--spacing-md);
  margin-top: var(--spacing-xl);
  text-balance: true;
}

h3 {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--primary);
  margin-bottom: var(--spacing-sm);
  margin-top: var(--spacing-lg);
}

h4 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--spacing-sm);
}

p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
  color: var(--text-dark);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-green);
}

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

li {
  margin-bottom: var(--spacing-sm);
  line-height: 1.6;
}

blockquote {
  border-left: 4px solid var(--accent-terracotta);
  padding-left: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
  font-style: italic;
  color: var(--text-light);
  background-color: var(--secondary);
  padding: var(--spacing-md) var(--spacing-lg);
}

code {
  background-color: var(--secondary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  color: var(--text-dark);
}

/* ============================================
   LAYOUT & CONTAINERS
   ============================================ */

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

.container-wide {
  max-width: 100%;
  margin: 0 auto;
}

.section {
  padding: var(--spacing-xxl) 0;
  border-top: 1px solid var(--border-light);
}

.section:first-of-type {
  border-top: none;
  padding-top: 0;
}

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

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--bg-white);
}

.section-light {
  background-color: var(--secondary);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
  position: sticky;
  top: 0;
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) var(--container-padding);
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.logo img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

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

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition-fast);
}

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

/* ============================================
   FOOTER
   ============================================ */

footer {
  background-color: var(--primary);
  color: var(--bg-white);
  padding: var(--spacing-xxl) var(--container-padding);
  margin-top: var(--spacing-xxl);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.footer-section h4 {
  color: var(--bg-white);
  margin-bottom: var(--spacing-md);
}

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

.footer-section a {
  color: var(--secondary);
  font-size: 0.95rem;
  display: block;
  margin-bottom: var(--spacing-sm);
  transition: color var(--transition-fast);
}

.footer-section a:hover {
  color: var(--accent-green);
}

.footer-contact {
  font-size: 0.95rem;
  line-height: 1.8;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: var(--spacing-lg);
  text-align: center;
  font-size: 0.9rem;
  color: var(--secondary);
}

/* ============================================
   BUTTONS & LINKS
   ============================================ */

.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  border: 2px solid var(--primary);
  background-color: transparent;
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.btn:hover {
  background-color: var(--primary);
  color: var(--bg-white);
  box-shadow: var(--shadow-md);
}

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

.btn-primary:hover {
  background-color: var(--text-dark);
  border-color: var(--text-dark);
}

.btn-secondary {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.btn-secondary:hover {
  background-color: var(--accent-green);
  color: var(--bg-white);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  background: linear-gradient(135deg, rgba(44, 62, 80, 0.85), rgba(52, 73, 94, 0.85)),
              url('/images/img1.jpg') center/cover;
  background-attachment: fixed;
  color: var(--bg-white);
  padding: var(--spacing-xxl) var(--container-padding);
  text-align: center;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  max-width: 800px;
}

.hero h1 {
  color: var(--bg-white);
  font-size: 3.5rem;
  margin-bottom: var(--spacing-lg);
}

.hero p {
  color: var(--secondary);
  font-size: 1.2rem;
  margin-bottom: var(--spacing-lg);
  line-height: 1.8;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--spacing-lg);
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card h3 {
  margin-top: 0;
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
}

/* ============================================
   IMAGES
   ============================================ */

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

.image-container {
  margin: var(--spacing-lg) 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.image-featured {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

/* ============================================
   TWO-COLUMN LAYOUTS
   ============================================ */

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

.two-col-text {
  padding: var(--spacing-lg);
}

.two-col-image {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.two-col-image img {
  width: 100%;
  height: auto;
  display: block;
}

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

/* ============================================
   FORMS
   ============================================ */

form {
  margin: var(--spacing-lg) 0;
}

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

label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
  color: var(--text-dark);
}

input[type="text"],
input[type="email"],
input[type="phone"],
textarea,
select {
  width: 100%;
  padding: var(--spacing-sm);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(132, 169, 140, 0.1);
}

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

/* ============================================
   DISCLAIMER & LIMITATION SECTIONS
   ============================================ */

.disclaimer-block {
  background-color: var(--secondary);
  border-left: 4px solid var(--accent-terracotta);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  margin: var(--spacing-xl) 0;
}

.disclaimer-block h4 {
  color: var(--primary);
  margin-top: 0;
}

.disclaimer-block p {
  font-size: 0.95rem;
  color: var(--text-dark);
}

.legal-notice {
  background-color: var(--primary);
  color: var(--bg-white);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-xl);
  font-size: 0.9rem;
  line-height: 1.8;
}

/* ============================================
   BREADCRUMB
   ============================================ */

.breadcrumb {
  display: flex;
  gap: var(--spacing-sm);
  margin: var(--spacing-md) 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--text-light);
}

.breadcrumb a:hover {
  color: var(--primary);
}

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

/* ============================================
   TABLE STYLES
   ============================================ */

table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--spacing-lg) 0;
}

th {
  background-color: var(--primary);
  color: var(--bg-white);
  padding: var(--spacing-md);
  text-align: left;
  font-weight: 600;
}

td {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
}

tr:hover {
  background-color: var(--secondary);
}

/* ============================================
   UTILITIES
   ============================================ */

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

.text-accent {
  color: var(--accent-green);
}

.text-light {
  color: var(--text-light);
}

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

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

.pt-lg {
  padding-top: var(--spacing-lg);
}

.pb-lg {
  padding-bottom: var(--spacing-lg);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .hero {
    min-height: 350px;
    background-attachment: scroll;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  nav ul {
    gap: var(--spacing-md);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-xxl: 48px;
    --spacing-xl: 32px;
    --spacing-lg: 24px;
  }
  
  .container {
    padding: 0 var(--spacing-md);
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.3rem;
  }
  
  .header-inner {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  nav ul {
    flex-direction: column;
    gap: var(--spacing-md);
  }
}
