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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-image: url('../images/fundo.png'); /* Coloque aqui o caminho correto para a sua imagem */
    background-color: #95d47e; /* Uma cor de fundo de reserva, caso a imagem falhe */
    background-size: cover; /* Para o padrão se repetir */
    background-attachment: fixed; /* A PROPRIEDADE MÁGICA: Fixa o fundo no ecrã */
}

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

a {
    text-decoration: none;
    color: inherit;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #001603, #4a7c3c);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4rem;
}

.site-title a {
    color: white;
    transition: opacity 0.3s ease;
}

.site-title a:hover {
    opacity: 0.8;
}

.site-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero  {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    margin-bottom: 2rem;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    color: #2c5530;
    margin-bottom: 1.5rem;
    font-weight: 600;
    margin-top: 3rem;
}

.hero-description {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 4rem;
    line-height: 1.8;
}

.hero-image {
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.hero-image video {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #4a7c3c, #2c5530);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 124, 60, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 124, 60, 0.4);
}

/* About Section */
.about  {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about h3 {
    font-size: 2rem;
    color: #2c5530;
    margin-bottom: 1.5rem;
}

.about p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Catalog Header */
.catalog-header {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-image: url('fundo.jpg'); /* MUDANÇA AQUI: sem pastas no caminho */
    background-repeat: repeat;
    margin-top: 3rem;
}

.catalog-header h2 {
    font-size: 2.5rem;
    color: #2c5530;
    margin-bottom: 1rem;
}

.catalog-header p {
    font-size: 1.2rem;
    color: #666;
}

/* Catalog Grid */
.catalog-grid {
    padding: 2rem 0 4rem;
}

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

.species-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    max-width: 350px;
}

.species-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.species-image {
    height: 250px;
    overflow: hidden;
}

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

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

.species-info {
    padding: 1.5rem;
}

.species-info h3 {
    font-size: 1.5rem;
    color: #2c5530;
    margin-bottom: 0.5rem;
}

.scientific-name {
    font-style: italic;
    color: #666;
    font-size: 1rem;
}

/* Species Detail Page */
.species-detail {
    padding: 2rem 0 4rem;
}

.breadcrumb {
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: #4a7c3c;
    font-weight: 500;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #2c5530;
}

.species-article {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.species-header {
    padding: 2rem;
    background: linear-gradient(135deg, #4a7c3c, #2c5530);
    color: white;
    text-align: center;
}

.species-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.scientific-name-large {
    font-size: 1.3rem;
    font-style: italic;
    opacity: 0.9;
}

.species-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: start; /* <-- Adicione esta linha */
}

.species-image-large {
    overflow: hidden;
}

.species-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.species-details {
    padding: 2rem;
}

.species-details h3 {
    font-size: 1.8rem;
    color: #2c5530;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

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

.detail-group h4 {
    font-size: 1.2rem;
    color: #4a7c3c;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.detail-group p {
    font-size: 1rem;
    color: #666;
    line-height: 1.7;
}

.detail-group ul {
    list-style: none;
    padding-left: 0;
}

.detail-group li {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0.3rem;
    padding-left: 1.5rem;
    position: relative;
}

.detail-group li::before {
    content: "•";
    color: #4a7c3c;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Footer */
.footer {
    background: #2c5530;
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

.footer p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-title {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-image img {
        height: 250px;
    }
    
    .species-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .species-content {
        grid-template-columns: 1fr;
    }
    
    .species-image-large {
        height: 300px;
    }
    
    .species-details {
        padding: 1.5rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .catalog-header h2 {
        font-size: 2rem;
    }
    
    .species-header h2 {
        font-size: 2rem;
    }
    
    .scientific-name-large {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .species-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .species-info {
        padding: 1rem;
    }
    
    .species-details {
        padding: 1rem;
    }
    
    .species-header {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* Loading and transition effects */
.species-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.species-card:nth-child(1) { animation-delay: 0.1s; }
.species-card:nth-child(2) { animation-delay: 0.2s; }
.species-card:nth-child(3) { animation-delay: 0.3s; }
.species-card:nth-child(4) { animation-delay: 0.4s; }
.species-card:nth-child(5) { animation-delay: 0.5s; }
.species-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus styles for accessibility */
.btn:focus,
.species-card:focus {
    outline: 3px solid #4a7c3c;
    outline-offset: 2px;
}

a:focus {
    outline: 2px solid #4a7c3c;
    outline-offset: 2px;
}

/* --- Estilos para Logo no Cabeçalho --- */

.title-container {
  display: flex; /* A mágica que coloca as coisas lado a lado */
  align-items: center; /* Alinha a logo e o texto verticalmente no centro */
  gap: 20px; /* Cria um espacinho entre a logo e o texto */
}

.site-logo {
  height: 130px; /* Define a altura da logo. Pode ajustar este valor! */
  width: auto; /* Mantém a proporção da imagem */
}

/* Ajusta as margens do título que não são mais necessárias */
.site-title {
    margin-bottom: 0;
}

/*
  COLE ESTE CÓDIGO NO FINAL DO SEU FICHEIRO CSS
*/

/* Opção 2: A caixa adapta-se ao vídeo */
.hero-image video {
  width: 100%;
  height: auto; /* Deixa a altura ser automática */
  /* Removemos o object-fit, já que não é mais necessário */
}

/*
  COLE ESTE CÓDIGO NO FINAL DO SEU FICHEIRO CSS
  Ele garante que o botão fique na camada da frente.
*/

/* Alvo para o botão e seu contentor */
.btn {
  position: relative; /* Define um contexto de posicionamento */
  z-index: 10;        /* Traz o botão para a frente */
}
/*
  COLE ESTE CÓDIGO NO FINAL DO SEU FICHEIRO CSS
*/

.hero-button-container {
  text-align: center;
  margin-top: 2rem; /* Adiciona espaço entre o vídeo e o botão */
  margin-bottom: 2rem;
  position: relative; /* Necessário para o z-index funcionar */
  z-index: 10;        /* Garante que o botão fica à frente de tudo */
}

/* DENTRO DO SEU FICHEIRO style.css */

.swiper-container {
  width: 100%;
  height: 500px; /* Altura do carrossel, ajuste se necessário */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

:root {
  --swiper-theme-color: #4a7c3c; /* Muda a cor das setas e bolinhas para o verde do seu site */
}

/*
  COLE ESTE CÓDIGO NO FINAL DO SEU FICHEIRO CSS
*/

/* A "caixa" principal do carrossel */
.swiper-container {
  width: 100%;
  max-width: 800px; /* Largura máxima, igual à da sua imagem antiga */
  height: 450px;    /* Altura, ajuste se necessário */
  margin: 2rem auto;  /* Centraliza a caixa na horizontal */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Garante que a imagem preenche o slide */
.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Define a cor das setas e bolinhas */
:root {
  --swiper-theme-color: #4a7c3c; /* Verde do seu site */
}

/* Adicione esta classe para ocultar elementos */
.oculto {
  display: none;
}

/* Opção alternativa: justificar apenas os parágrafos */

p {
    text-align: justify;
}

/* Adicione este código ao final do seu ficheiro ../css/styles.css */

/* Define o tamanho e a aparência do carrossel */
.swiper {
  width: 100%;
  height: 500px; /* ALTURA DO CARROSSEL - PODE AJUSTAR ESTE VALOR */
  border-radius: 12px;
}

/* Garante que a imagem preencha o espaço do slide */
.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Define a cor das setas e bolinhas para o verde do seu site */
:root {
  --swiper-theme-color: #4a7c3c;
}
/* --- Estilos para a Barra de Pesquisa --- */
.search-container {
    margin-bottom: 2rem;
    text-align: center;
}

#barraDePesquisa {
    width: 100%;
    max-width: 500px;
    padding: 14px 20px;
    font-size: 1rem;
    border-radius: 50px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#barraDePesquisa:focus {
    outline: 2px solid #4a7c3c;
    border-color: #4a7c3c;
}