/* CSS Variables - Easy to customize colors */
:root {
  --primary-color: #ffb100;
  --secondary-color: #ff8c00;
  --dark-color: #1e1810;
  --text-color: #62615c;
  --light-bg: #f8f7f3;
  --white: #ffffff;
  --black: #000000;
  --gray: #4b4f58;
  --light-gray: #f6f7f8;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --transition: all 0.3s ease;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
}

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--white);
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: var(--transition);
}

.navbar {
  padding: 1rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  height: 50px;
  width: auto;
}

.nav-list {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--dark-color);
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link:hover {
  color: var(--primary-color);
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  box-shadow: var(--shadow);
  border-radius: var(--border-radius);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  list-style: none;
  padding: 1rem 0;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  padding: 0;
}

.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

.dropdown-menu a:hover {
  background: var(--light-bg);
  color: var(--primary-color);
}

.btn-donate {
  background: var(--primary-color);
  color: var(--white) !important;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 600;
}

.btn-donate:hover {
  background: var(--secondary-color);
  color: var(--white) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--dark-color);
  margin: 3px 0;
  transition: var(--transition);
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--dark-color);
  transition: var(--transition);
}

/* Hero Section */
.hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 80px;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 24, 16, 0.7);
  z-index: 2;
}

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

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease;
}

.highlight {
    color: var(--primary-color);
}

/* Publications Section */
.publications {
  padding: 6rem 0;
  background: var(--white);
}

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

.publication-card {
  background: var(--white);
  border-radius: 15px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.publication-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.publication-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--primary-color);
  color: var(--white);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 2;
}

.publication-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.publication-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.publication-card:hover .publication-cover {
  transform: scale(1.05);
}

.publication-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  /* Faz o conteúdo ocupar o restante do card */
}

.publication-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.publication-description {
  color: var(--text-color);
  margin-bottom: 2rem;
  line-height: 1.6;
  flex-grow: 1; /* Empurra o botão para baixo */
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  cursor: pointer;
}

.btn-download {
  background: var(--primary-color);
  color: var(--white);
  width: 100%;
  justify-content: center;
  margin-top: auto;
}

.btn-download:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

/* Footer */
.footer {
  background: var(--dark-color);
  color: var(--white);
  padding: 3rem 0 1rem;
}

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

.footer-logo {
  height: 60px;
  margin-bottom: 1rem;
}

.footer-section h4 {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

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

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--white);
  text-decoration: none;
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  text-decoration: none;
  transition: var(--transition);
}

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

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.8rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
}

.newsletter-form button {
  background: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 0.8rem 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-form button:hover {
  background: var(--secondary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--gray);
  color: #ccc;
}

/* WhatsApp Button */
.whatsapp-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  text-decoration: none;
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: var(--transition);
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  color: var(--white);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1000;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  }

  50% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.8);
  }

  100% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  }
}


/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--white);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow);
    height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 2rem 0;
  }

  .nav-list li {
    margin: 1rem 0;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: var(--light-bg);
    margin-top: 1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero-title {
    font-size: 2.5rem;
  }

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

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

}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero {
    height: 60vh;
    min-height: 400px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .publications {
    padding: 4rem 0;
  }

  .publication-card {
    margin: 0 10px;
  }

  .publication-content {
    padding: 1.5rem;
  }

  .footer-main {
    padding: 3rem 0 1.5rem;
  }

  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Loading Animation */
.loading {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.loading.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus Styles for Accessibility */
.nav-link:focus,
.btn:focus,
.social-link:focus,
.whatsapp-btn:focus,
.back-to-top:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}