/*
 * Foa Torres Academic Theme
 * Custom Hugo theme matching WordPress Beaver Builder design
 */

/* ========================================
   CSS Variables - Extracted from WordPress
   ======================================== */
:root {
  /* Colors */
  --color-golden: #f7b733;
  --color-teal: #4abdac;
  --color-bg-light: #f2f2f2;
  --color-white: #ffffff;
  --color-text: #2b2b2b;
  --color-heading: #333333;
  --color-gray: #808080;
  --color-dark-gray: #383838;
  --color-nav-hover: #428bca;

  /* Typography */
  --font-body: 'Roboto', sans-serif;
  --font-heading: 'Oswald', sans-serif;

  /* Sizes */
  --max-width: 1280px;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
}

/* ========================================
   Reset & Base Styles
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.45;
  color: var(--color-text);
  background-color: var(--color-bg-light);
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--color-heading);
  margin-bottom: 1rem;
}

h1 {
  font-size: 36px;
  line-height: 1.4;
}

h2 {
  font-size: 30px;
  line-height: 1.4;
}

h3 {
  font-size: 24px;
  line-height: 1.4;
}

h4 {
  font-size: 18px;
  line-height: 1.4;
}

h5 {
  font-size: 14px;
  line-height: 1.4;
}

h6 {
  font-size: 12px;
  line-height: 1.4;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-teal);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-dark-gray);
}

/* ========================================
   Top Bar
   ======================================== */
.top-bar {
  background: var(--color-white);
  border-bottom: 1px solid #e0e0e0;
  padding: 8px 0;
}

.top-bar-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left {
  font-size: 14px;
  color: var(--color-gray);
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  color: #000000;
  font-size: 16px;
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: var(--color-teal);
}

/* ========================================
   Header & Navigation
   ======================================== */
header {
  background: var(--color-white);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 18px 0;
}

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

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  flex-wrap: wrap;
}

nav li {
  display: inline-block;
}

nav a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
  color: var(--color-golden);
  text-transform: capitalize;
  padding: 5px 10px;
  transition: color 0.3s ease;
}

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

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-golden);
  cursor: pointer;
  padding: 10px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  background: var(--color-golden);
  padding: 60px 20px;
  text-align: center;
  color: var(--color-white);
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--color-white);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.hero .tagline {
  font-size: 20px;
  font-style: italic;
  color: var(--color-white);
  margin-top: 10px;
}

.hero .decorative-lines {
  margin: 30px auto;
  width: 200px;
  height: 6px;
  background: linear-gradient(to right,
    var(--color-teal) 0%,
    var(--color-teal) 33%,
    var(--color-white) 33%,
    var(--color-white) 66%,
    var(--color-golden) 66%);
}

/* ========================================
   Main Content
   ======================================== */
main {
  background: var(--color-white);
  min-height: 60vh;
}

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

.content {
  max-width: 900px;
  margin: 0 auto;
}

/* ========================================
   Sidebar Accent (Research Highlights)
   ======================================== */
.research-highlights-wrapper {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
}

.sidebar-accent {
  background: var(--color-teal);
  color: var(--color-white);
  padding: 30px 20px;
  margin-bottom: 0;
  height: fit-content;
}

.sidebar-accent h2 {
  font-family: var(--font-heading);
  font-size: 36px;
  color: var(--color-white);
  margin-bottom: 10px;
}

.sidebar-accent h3 {
  font-family: var(--font-heading);
  font-size: 28px;
  color: var(--color-white);
}

/* ========================================
   Cards & Grid Layouts
   ======================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.card {
  background: var(--color-white);
  border: 1px solid #e0e0e0;
  padding: 20px;
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card img {
  width: 100%;
  height: auto;
  margin-bottom: 15px;
}

.card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.card .read-more {
  display: inline-block;
  background: #000000;
  color: var(--color-white);
  padding: 8px 20px;
  margin-top: 10px;
  font-size: 14px;
  text-transform: uppercase;
  font-weight: 600;
}

.card .read-more:hover {
  background: var(--color-teal);
  color: var(--color-white);
}

/* ========================================
   Gallery (Essential Grid Replacement)
   ======================================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  background: var(--color-white);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-item .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 15px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .overlay {
  transform: translateY(0);
}

/* Masonry-style gallery (like Essential Grid) */
.gallery-masonry {
  column-count: 3;
  column-gap: 20px;
}

.gallery-masonry .gallery-item {
  break-inside: avoid;
  margin-bottom: 20px;
}

/* ========================================
   Footer
   ======================================== */
footer {
  background: var(--color-white);
  border-top: 1px solid #e0e0e0;
  padding: 30px 20px;
  text-align: center;
}

footer p {
  color: var(--color-gray);
  font-size: 14px;
  margin-bottom: 15px;
}

footer .social-icons {
  justify-content: center;
  margin-top: 15px;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--color-white);
    position: absolute;
    top: 100%;
    left: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }

  nav ul.active {
    display: flex;
  }

  .hero h1 {
    font-size: 32px;
  }

  .research-highlights-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar-accent {
    margin-bottom: 30px;
  }

  .card-grid {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .gallery-masonry {
    column-count: 1;
  }

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

@media (max-width: 1024px) and (min-width: 769px) {
  .gallery-masonry {
    column-count: 2;
  }
}

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

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.color-teal {
  color: var(--color-teal);
}

.color-golden {
  color: var(--color-golden);
}

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

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