/* =================================
   OLYNAL - STRUCTURED RESEARCH LAYOUT
   ================================= */

/* ========== RESET & BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #282C34;
  --secondary: #4A909E;
  --accent: #C2945D;
  --ivory: #F8F8F8;
  --light-grey: #E0E0E0;
  --white: #FFFFFF;
  --radius: 0;
  --transition: all 0.3s ease;
  --max-width: 1200px;
  --container-max: 1440px;
  --base-unit: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Merriweather', Georgia, serif;
  color: var(--primary);
  background-color: var(--ivory);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary);
  margin-bottom: 1.2em;
}

h1 {
  font-size: 3.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5em;
  letter-spacing: -1px;
}

h2 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 1.2em;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1em;
}

p {
  margin-bottom: 1.2em;
  text-align: justify;
}

ul, ol {
  margin-bottom: 1.2em;
  padding-left: 2em;
}

li {
  margin-bottom: 0.8em;
}

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

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

/* ========== CONTAINER & GRID ========== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.container-content {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

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

.row {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.col {
  flex: 1;
  min-width: 300px;
}

.col-6 {
  flex: 0 1 50%;
}

.col-4 {
  flex: 0 1 33.333%;
}

.col-8 {
  flex: 0 1 66.666%;
}

/* ========== HEADER & NAVIGATION ========== */
header {
  background-color: var(--primary);
  color: var(--white);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

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

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  padding: 0;
  margin: 0;
}

nav a {
  color: var(--white);
  font-family: 'Merriweather', serif;
  font-size: 0.95rem;
  position: relative;
  border-bottom: none;
}

nav a:hover,
nav a.active {
  color: var(--secondary);
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--secondary);
}

/* ========== FOOTER ========== */
footer {
  background-color: var(--primary);
  color: var(--white);
  padding: 4rem 2rem 2rem;
  margin-top: 8rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--light-grey);
}

.footer-section h3 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

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

.footer-section a {
  color: var(--light-grey);
  border-bottom: none;
}

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

.footer-bottom {
  text-align: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 2rem;
  font-size: 0.9rem;
  color: var(--light-grey);
}

/* ========== SECTIONS ========== */
section {
  padding: 5rem 0;
}

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

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

.section-teal {
  background-color: #F0F5F7;
}

.section-hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
}

.section-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(40, 44, 52, 0.4);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 0 2rem;
}

.hero-content h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  text-align: center;
}

/* ========== CARDS ========== */
.card {
  background-color: var(--white);
  border: 1px solid var(--light-grey);
  padding: 2rem;
  transition: var(--transition);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.card:hover {
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.card p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

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

.image-wrapper {
  overflow: hidden;
  position: relative;
}

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

/* ========== BUTTONS ========== */
button,
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-family: 'Merriweather', serif;
  font-size: 0.95rem;
  background-color: var(--secondary);
  color: var(--white);
  border: 2px solid var(--secondary);
  border-radius: 0;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  text-decoration: none;
}

button:hover,
.btn:hover {
  background-color: var(--primary);
  border-color: var(--primary);
}

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

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

/* ========== FORMS ========== */
form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary);
}

input[type="text"],
input[type="email"],
input[type="phone"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  font-family: 'Merriweather', serif;
  font-size: 0.95rem;
  border: 1px solid var(--light-grey);
  background-color: var(--white);
  color: var(--primary);
  transition: var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="phone"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 5px rgba(74, 144, 158, 0.3);
}

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

/* ========== TABLES ========== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  background-color: var(--white);
}

thead {
  background-color: var(--primary);
  color: var(--white);
}

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--light-grey);
}

tbody tr:hover {
  background-color: #FAFAFA;
}

/* ========== BLOCKQUOTE ========== */
blockquote {
  border-left: 4px solid var(--accent);
  padding: 1.5rem 0 1.5rem 2rem;
  margin: 2rem 0;
  background-color: #FEFBF7;
  font-style: italic;
  color: var(--primary);
}

/* ========== UTILITIES ========== */
.text-center {
  text-align: center;
}

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

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.hidden {
  display: none;
}

.invisible {
  visibility: hidden;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

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

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

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

.border-top {
  border-top: 1px solid var(--light-grey);
  padding-top: 2rem;
}

.divider {
  width: 60px;
  height: 3px;
  background-color: var(--secondary);
  margin: 2rem auto;
}

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

  h2 {
    font-size: 1.5rem;
  }

  nav ul {
    gap: 1rem;
    font-size: 0.85rem;
  }

  .row {
    flex-direction: column;
  }

  .col,
  .col-6,
  .col-4,
  .col-8 {
    flex: 1 1 100%;
  }

  .section-hero {
    min-height: 400px;
  }

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

  table {
    font-size: 0.9rem;
  }

  th,
  td {
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  .container,
  .container-content {
    padding: 0 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  h3 {
    font-size: 1rem;
  }

  nav ul {
    gap: 0.5rem;
  }

  button,
  .btn {
    width: 100%;
    padding: 0.75rem 1rem;
  }

  section {
    padding: 3rem 0;
  }
}
