/* 
  Nyheter fra Norge - CSS Styles
  Theme: News Blog 
  Year: 2024
*/

/* ===== Variables ===== */
:root {
  --primary-color: #134f8e;
  --secondary-color: #f56600;
  --accent-color: #e3f2fd;
  --background-color: #ffffff;
  --light-gray: #f7f7f7;
  --medium-gray: #e0e0e0;
  --dark-gray: #757575;
  --text-color: #333333;
  --text-light: #757575;
  --font-heading: 'Raleway', 'Segoe UI', sans-serif;
  --font-body: 'Open Sans', 'Arial', sans-serif;
  --border-radius: 5px;
  --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --container-width: 1200px;
}

/* ===== Reset & Globals ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%; /* 10px base size for easier rem calculations */
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

h1 {
  font-size: 3.6rem;
}

h2 {
  font-size: 2.8rem;
}

h3 {
  font-size: 2.4rem;
}

p {
  margin-bottom: 1.6rem;
}

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

ul, ol {
  margin-left: 2rem;
  margin-bottom: 1.6rem;
}

button {
  cursor: pointer;
  font-family: var(--font-body);
}

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

/* ===== Header ===== */
header {
  background-color: var(--background-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

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

.logo-container img {
  max-height: 6rem;
  width: auto;
}

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

nav ul li {
  margin: 0 1.5rem;
}

nav ul li a {
  font-size: 1.8rem;
  font-weight: 600;
  padding: 0.8rem 0;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

nav ul li a:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--secondary-color);
  transition: var(--transition);
}

nav ul li a:hover:after,
nav ul li a.active:after {
  width: 100%;
}

nav ul li a.active {
  color: var(--secondary-color);
}

/* ===== Hero Section ===== */
.hero {
  background-color: var(--accent-color);
  padding: 6rem 2rem;
  text-align: center;
  margin-bottom: 4rem;
  border-radius: var(--border-radius);
}

.hero h1 {
  font-size: 4.8rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.hero p {
  font-size: 2rem;
  color: var(--text-light);
  max-width: 80rem;
  margin: 0 auto;
}

/* ===== Featured Articles ===== */
.featured {
  margin-bottom: 4rem;
}

.featured h2, 
.recent-posts h2, 
.related-posts h2,
.data-visualization h2,
.expert-interview h2 {
  position: relative;
  padding-bottom: 1rem;
  margin-bottom: 2.5rem;
}

.featured h2:after,
.recent-posts h2:after,
.related-posts h2:after,
.data-visualization h2:after,
.expert-interview h2:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 6rem;
  height: 3px;
  background-color: var(--secondary-color);
}

.featured-card {
  display: flex;
  flex-direction: column;
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.featured-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.card-image {
  height: 40rem;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 2rem;
}

.card-content h3 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

.read-more {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
}

/* ===== Posts Grid ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2.5rem;
}

.post-card {
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.post-card img {
  width: 100%;
  height: 20rem;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover img {
  transform: scale(1.05);
}

.post-card h3, .post-card p {
  padding: 0 1.5rem;
}

.post-card h3 {
  font-size: 2rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.post-card .read-more {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ===== Data Visualization ===== */
.data-visualization {
  margin: 5rem 0;
  padding: 3rem;
  background-color: var(--light-gray);
  border-radius: var(--border-radius);
}

.chart-container {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  height: 40rem;
}

.chart-description {
  text-align: center;
  margin-top: 2rem;
  font-style: italic;
  color: var(--text-light);
}

/* ===== Expert Interview ===== */
.expert-interview {
  margin: 5rem 0;
}

.interview-container {
  display: flex;
  gap: 3rem;
  background-color: var(--light-gray);
  padding: 3rem;
  border-radius: var(--border-radius);
}

.expert-photo {
  flex: 0 0 20rem;
}

.expert-photo img {
  width: 100%;
  border-radius: var(--border-radius);
}

.interview-content {
  flex: 1;
}

.expert-title {
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.interview-qa .question {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.interview-qa .answer {
  margin-bottom: 2rem;
}

/* ===== Page Header ===== */
.page-header {
  text-align: center;
  padding: 4rem 0;
  margin-bottom: 4rem;
  border-bottom: 1px solid var(--medium-gray);
}

.page-header h1 {
  color: var(--primary-color);
}

/* ===== About Page ===== */
.about-intro {
  margin-bottom: 5rem;
}

.about-content {
  display: flex;
  gap: 4rem;
  align-items: center;
}

.about-image {
  flex: 0 0 40%;
}

.about-image img {
  border-radius: var(--border-radius);
}

.about-text {
  flex: 1;
}

.values-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
  gap: 3rem;
  margin: 4rem 0;
}

.value-card {
  background-color: var(--light-gray);
  padding: 3rem;
  text-align: center;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

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

.value-icon {
  width: 8rem;
  height: 8rem;
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

.value-card h3 {
  font-size: 2.2rem;
}

.team-section {
  margin: 5rem 0;
}

.team-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
  gap: 3rem;
}

.team-card {
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  text-align: center;
  transition: var(--transition);
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.team-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.team-card h3 {
  margin: 1.5rem 0 0.5rem;
}

.team-card p {
  padding: 0 1.5rem;
  margin-bottom: 1.5rem;
}

.team-card p:first-of-type {
  font-weight: bold;
  color: var(--primary-color);
}

/* ===== Contact Page ===== */
.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem;
  margin-bottom: 5rem;
}

.contact-info, .contact-form-container {
  flex: 1;
  min-width: 30rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.contact-icon {
  flex: 0 0 4rem;
  color: var(--primary-color);
}

.contact-text h3 {
  margin-bottom: 0.5rem;
}

.social-media {
  margin-top: 4rem;
}

.social-icons {
  display: flex;
  gap: 1.5rem;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  transition: var(--transition);
}

.social-icons a:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
}

.contact-form {
  background-color: var(--light-gray);
  padding: 3rem;
  border-radius: var(--border-radius);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.form-group input, 
.form-group select, 
.form-group textarea {
  width: 100%;
  padding: 1.2rem;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 1.6rem;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.checkbox-group input {
  width: auto;
}

.checkbox-group label {
  margin-bottom: 0;
}

.btn {
  padding: 1.2rem 2.4rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

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

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

.btn-secondary {
  background-color: var(--light-gray);
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: var(--medium-gray);
}

.btn-tertiary {
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid var(--medium-gray);
}

.btn-tertiary:hover {
  background-color: var(--light-gray);
}

.map-section {
  margin-bottom: 5rem;
}

.map-container {
  height: 45rem;
  border-radius: var(--border-radius);
  overflow: hidden;
}

/* ===== Individual Post Page ===== */
.post {
  margin-bottom: 5rem;
}

.post-header {
  margin-bottom: 3rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  color: var(--text-light);
}

.post-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-thumbnail {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  object-fit: cover;
}

.post-image {
  margin-bottom: 3rem;
}

.post-image img {
  border-radius: var(--border-radius);
  width: 100%;
  max-height: 50rem;
  object-fit: cover;
}

.post-image figcaption {
  margin-top: 1rem;
  font-style: italic;
  color: var(--text-light);
  font-size: 1.4rem;
}

.post-content {
  margin-bottom: 4rem;
}

.post-content h2 {
  margin-top: 3.5rem;
}

.post-content p {
  margin-bottom: 2rem;
}

.post-footer {
  border-top: 1px solid var(--medium-gray);
  padding-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.post-tags span {
  margin-right: 1rem;
  font-weight: 600;
}

.post-tags a {
  display: inline-block;
  margin-right: 1rem;
  padding: 0.5rem 1.5rem;
  background-color: var(--light-gray);
  border-radius: 3rem;
  transition: var(--transition);
}

.post-tags a:hover {
  background-color: var(--primary-color);
  color: white;
}

.post-share span {
  margin-right: 1rem;
  font-weight: 600;
}

.post-share a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-left: 0.8rem;
  background-color: var(--light-gray);
  border-radius: 50%;
  transition: var(--transition);
}

.post-share a:hover {
  background-color: var(--primary-color);
  color: white;
}

.related-posts {
  margin-bottom: 5rem;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.related-post {
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  display: block;
  color: var(--text-color);
}

.related-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.related-post img {
  width: 100%;
  height: 18rem;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.related-post:hover img {
  transform: scale(1.05);
}

.related-post h3 {
  padding: 1.5rem;
  font-size: 1.8rem;
}

/* ===== Cookie Banner ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--background-color);
  padding: 2rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none;
}

.cookie-content {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.cookie-link {
  display: block;
  width: 100%;
  margin-top: 1rem;
  text-align: center;
  text-decoration: underline;
}

/* ===== Thank You Modal ===== */
.thank-you-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content {
  background-color: var(--background-color);
  padding: 4rem;
  border-radius: var(--border-radius);
  max-width: 50rem;
  width: 100%;
  text-align: center;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2.4rem;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--secondary-color);
}

.modal-icon {
  width: 8rem;
  height: 8rem;
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

.close-button {
  margin-top: 2rem;
}

/* ===== Footer ===== */
footer {
  background-color: #1a1a1a;
  color: white;
  padding: 5rem 0 2rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
  gap: 3rem;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-section h3 {
  color: white;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1rem;
}

.footer-section h3:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 5rem;
  height: 2px;
  background-color: var(--secondary-color);
}

.footer-section address {
  font-style: normal;
}

.footer-section .social-icons a {
  background-color: #333;
  color: white;
}

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

.footer-bottom {
  border-top: 1px solid #333;
  margin-top: 4rem;
  padding-top: 2rem;
  text-align: center;
  width: 100%;
  max-width: var(--container-width);
  margin: 4rem auto 0;
  padding: 2rem 2rem 0;
}

.footer-links {
  margin-top: 1.5rem;
}

.footer-links a {
  color: var(--medium-gray);
  margin: 0 1rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
}

/* ===== Responsive Styles ===== */
@media (max-width: 900px) {
  html {
    font-size: 56.25%; /* 9px */
  }
  
  .about-content, 
  .interview-container {
    flex-direction: column;
  }
  
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 50%; /* 8px */
  }
  
  header {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .interview-container {
    padding: 2rem;
  }
  
  .post-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 576px) {
  .related-posts-grid {
    grid-template-columns: 1fr;
  }
  
  .cookie-content, 
  .cookie-buttons {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-content {
    gap: 1.5rem;
  }
  
  .cookie-buttons button {
    width: 100%;
  }
  
  .map-container {
    height: 30rem;
  }
}
