:root {
    --primary-color: #007A7B;
    --secondary-color: #EE9111;
    --tertiary-color: #4ABDAC;
    --bg-color: #f1f1f1ef;
    --card-bg: #FFFFFF;
    --text-color: #333333;
    --shadow: rgba(0, 0, 0, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
}

.header {
    width: 100%;
    background-color: var(--card-bg);
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px var(--shadow);
}

.header img {
    max-width: 100%;
    max-height: 200px;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

.search {
    width: 100%;
    margin-bottom: 2rem;
    background: var(--primary-color);
    box-shadow: 0 2px 4px var(--shadow);
    padding: 2rem;
    border-radius: 1rem;
    color: white;
    
}

a {
    color: white;
    text-decoration: underline;
  }

a:hover {
    color: var(--secondary-color);
  }
.search-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.95rem;
}

.search-link:hover {
    text-decoration: underline;
}

.search-input {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
}

.controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.sort-select {
    margin: auto;
    padding: 0.5rem;
    border-radius: 0.25rem;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.reset-button {
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    margin: auto;
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.reset-button:hover {
    background: #d67f0f;
    align-self: center;
}

.counter {
    margin: auto;
    color: var(--text-color);
    font-size: 0.75rem;
    font-style: italic;
}

.main-content {
    display: flex;
    gap: 1.5rem;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    position: sticky;
    top: 1rem;
    height: fit-content;
    border: 2px solid var(--primary-color);
}

.sidebar p {
    visibility: hidden;
}

.tag-group h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.tag-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tag-item input[type="checkbox"] {
    margin-right: 0.5rem;
}

.resources-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    grid-gap: 0.75rem;
}

.resource-card {
    background-color: var(--card-bg);
    border-radius: 0.5rem;
    padding: 1.25rem;
    box-shadow: 0 4px 6px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-height: 470px;
}

.resource-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.resource-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.resource-thumbnail {
    display:flex;
    margin:auto;
    max-height: 50%;
    max-width: 100%;
    border-radius: 0.5rem;
    object-fit: contain;
    background-color: #f3f4f6;
}

.resource-content {
    padding: 1.5rem;
}

.resource-description {
    color: #4b5563;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.resource-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
}

.resource-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.95rem;
}

.resource-link:hover {
    text-decoration: underline;
}

.pagination-container {
    display: block;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.pagination-top {
    display: block;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.pagination-link {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: none;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.pagination-link.active {
    background-color: var(--secondary-color);
    color: white;
    font-weight: bold;
}

.pagination-link:hover {
    background-color: var(--secondary-color);
}

.site-footer {
    padding: 2rem;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0.5rem;
  }
  
  .footer-columns {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
  }
  
  .footer-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0 1.5rem;
  }
  
  .footer-column h4 {
    padding: 1rem;
    font-size: 1.3rem
  }

  .footer-logo-link {
    display: inline-block;
    margin-bottom: 1rem;
  }
  
  .footer-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
  }
  
  .footer-logo-link:hover .footer-logo {
    transform: scale(1.1);
  }
  
  .social-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .social-button {
    background-color: white;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s, color 0.2s;
  }
  
  .social-button:hover {
    background-color: var(--secondary-color);
    color: white;
  }
  
  .support-button {
    background-color: white;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s, color 0.2s;
  }
  
  .support-button:hover {
    background-color: var(--secondary-color);
    color: white;
  }

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: relative;
        margin-bottom: 1rem;
    }

    .sidebar p {
        visibility: visible;
    }

    .sidebar-header {
        width: 100%;
        background: var(--primary-color);
        margin-bottom: 10px;
        color: white;
        padding: 1rem;
        border-radius: 0.5rem;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .sidebar-header:after {
        content: '▼';
        transition: transform 0.3s ease;
    }

    .sidebar-header.active:after {
        transform: rotate(-180deg);
    }

    .sidebar-content {
        display: none;
        padding: 1rem;
        background: white;
        border: 1px solid var(--primary-color);
        border-radius: 0 0 0.5rem 0.5rem;
    }

    .sidebar-content.active {
        display: block;
    }

    .controls {
        flex-direction: column;
    }

    .sort-select, .reset-button {
        width: 100%;
        margin: 0.5rem 0;
    }

    .footer-columns {
        flex-direction: column;
        align-items: center;
      }
    
      .footer-column {
        margin: 1rem 0;
      }
    
      .footer-logo {
        width: 60px;
        height: 60px;
      }
    
      .social-buttons {
        flex-direction: row;
        gap: 0.75rem;
      }
    
}