/* ============================================
   QJINEL - Institutional Knowledge Portal CSS
   ============================================ */

/* ---- VARIABLES & BASE ---- */
:root {
  --primary: #1A2E40;
  --secondary: #F0F2F5;
  --accent-warm: #C78C0C;
  --accent-sage: #8FA68E;
  --accent-terra: #A3574A;
  --border-light: #DCE0E5;
  --border-medium: #C4C8D0;
  --text-primary: #1A2E40;
  --text-secondary: #4A5568;
  --text-light: #7A8694;
  --spacing-unit: 8px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Merriweather', 'Georgia', serif;
  background-color: var(--secondary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Raleway', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: calc(var(--spacing-unit) * 4);
}

h2 {
  font-size: 2.2rem;
  line-height: 1.3;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

p {
  line-height: 1.8;
  margin-bottom: calc(var(--spacing-unit) * 3);
  color: var(--text-secondary);
  font-size: 1rem;
}

a {
  color: var(--accent-warm);
  text-decoration: none;
  transition: all 0.3s ease-out;
}

a:hover {
  text-decoration: underline;
  color: var(--primary);
}

/* ---- CONTAINER & LAYOUT ---- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 4);
}

.container-narrow {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 4);
}

section {
  padding: calc(var(--spacing-unit) * 15) 0;
}

.section-full-width {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* ---- GRID SYSTEM ---- */
.grid {
  display: grid;
  gap: calc(var(--spacing-unit) * 4);
}

.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.grid-4 {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ---- FLEXBOX ---- */
.flex {
  display: flex;
  align-items: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- HEADER & NAVIGATION ---- */
header {
  background-color: var(--primary);
  color: white;
  padding: calc(var(--spacing-unit) * 2) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(26, 46, 64, 0.1);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 4);
}

.logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-warm);
}

nav ul {
  list-style: none;
  display: flex;
  gap: calc(var(--spacing-unit) * 3);
}

nav a {
  color: white;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.2s ease-out;
}

nav a:hover {
  color: var(--accent-warm);
  text-decoration: none;
}

nav a.active {
  color: var(--accent-warm);
  border-bottom: 2px solid var(--accent-warm);
  padding-bottom: 4px;
}

@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
  }
}

/* ---- FOOTER ---- */
footer {
  background-color: var(--primary);
  color: white;
  padding: calc(var(--spacing-unit) * 10) 0;
  margin-top: calc(var(--spacing-unit) * 20);
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 4);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: calc(var(--spacing-unit) * 4);
  margin-bottom: calc(var(--spacing-unit) * 8);
}

.footer-section h4 {
  color: var(--accent-warm);
  margin-bottom: calc(var(--spacing-unit) * 2);
}

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

.footer-section a {
  color: #ccc;
  display: block;
  margin-bottom: calc(var(--spacing-unit) * 1.5);
  transition: color 0.2s ease-out;
}

.footer-section a:hover {
  color: var(--accent-warm);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: calc(var(--spacing-unit) * 4);
  text-align: center;
  font-size: 0.9rem;
  color: #999;
}

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

/* ---- HERO SECTION ---- */
.hero {
  position: relative;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(26, 46, 64, 0.5);
}

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

.hero h1 {
  color: white;
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.hero p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.2rem;
  margin-bottom: 0;
}

/* ---- CARDS & BOXES ---- */
.card {
  background-color: white;
  border: 1px solid var(--border-light);
  padding: calc(var(--spacing-unit) * 4);
  transition: all 0.3s ease-out;
}

.card:hover {
  box-shadow: 0 8px 20px rgba(26, 46, 64, 0.08);
  transform: translateY(-2px);
}

.card h3 {
  color: var(--accent-warm);
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: calc(var(--spacing-unit) * 2);
  display: inline-block;
}

.quote-box {
  background-color: var(--accent-sage);
  padding: calc(var(--spacing-unit) * 6);
  border-left: 5px solid var(--accent-warm);
  margin: calc(var(--spacing-unit) * 6) 0;
}

.quote-box p {
  color: var(--primary);
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 0;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);
  background-color: var(--accent-warm);
  color: white;
  border: 2px solid var(--accent-warm);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease-out;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: calc(var(--spacing-unit));
}

.btn:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 46, 64, 0.2);
  text-decoration: none;
}

.btn-outline {
  background-color: transparent;
  color: var(--accent-warm);
  border-color: var(--accent-warm);
}

.btn-outline:hover {
  background-color: var(--accent-warm);
  color: white;
}

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

.btn-secondary:hover {
  background-color: var(--accent-warm);
  border-color: var(--accent-warm);
}

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

.img-responsive {
  width: 100%;
  height: auto;
}

/* ---- SECTIONS WITH PATTERNS ---- */
.section-exploration {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--spacing-unit) * 6);
  align-items: center;
}

.section-exploration.reverse {
  direction: rtl;
}

.section-exploration.reverse > * {
  direction: ltr;
}

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

.section-dominant-title {
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 10);
}

.section-dominant-title h2 {
  font-size: 2.8rem;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

/* ---- LISTS ---- */
ul, ol {
  margin-left: calc(var(--spacing-unit) * 3);
  margin-bottom: calc(var(--spacing-unit) * 3);
}

li {
  margin-bottom: calc(var(--spacing-unit) * 1.5);
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ---- FORMS ---- */
form {
  max-width: 600px;
}

.form-group {
  margin-bottom: calc(var(--spacing-unit) * 4);
}

label {
  display: block;
  margin-bottom: calc(var(--spacing-unit) * 1);
  font-weight: 500;
  color: var(--text-primary);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: calc(var(--spacing-unit) * 2);
  border: 1px solid var(--border-light);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease-out;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-warm);
  box-shadow: 0 0 0 3px rgba(199, 140, 12, 0.1);
}

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

/* ---- UTILITY CLASSES ---- */
.text-center {
  text-align: center;
}

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

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: calc(var(--spacing-unit) * 1); }
.mb-2 { margin-bottom: calc(var(--spacing-unit) * 2); }
.mb-3 { margin-bottom: calc(var(--spacing-unit) * 3); }
.mb-4 { margin-bottom: calc(var(--spacing-unit) * 4); }
.mt-4 { margin-top: calc(var(--spacing-unit) * 4); }
.mt-6 { margin-top: calc(var(--spacing-unit) * 6); }

.accent-warm { color: var(--accent-warm); }
.accent-sage { color: var(--accent-sage); }
.accent-terra { color: var(--accent-terra); }

.bg-primary { background-color: var(--primary); color: white; }
.bg-secondary { background-color: var(--secondary); }
.bg-sage { background-color: var(--accent-sage); color: var(--primary); }

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  body {
    font-size: 15px;
  }

  section {
    padding: calc(var(--spacing-unit) * 10) 0;
  }

  .hero {
    height: 400px;
  }

  nav ul {
    gap: calc(var(--spacing-unit) * 2);
  }
}

/* ---- ANIMATIONS ---- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}
