/* Font Face Declarations */
@font-face {
    font-family: 'Sanger';
    src: url('Assets/Sanger.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cartograph';
    src: url('Assets/Cartograph-Sans-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: 'Cartograph', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333941;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Sanger', serif;
    font-weight: normal;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

/* Development Banner */
.dev-banner {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    padding: 1rem 0;
    text-align: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dev-banner p {
    margin: 0;
    font-weight: 500;
    font-size: 1.1rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 60px; /* Adjusted to account for dev banner */
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(51, 57, 65, 0.1);
}

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

.nav-logo-img {
    height: 80px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333941;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #666;
}

/* Hero Section */
.hero {
    padding: 180px 0 80px; /* Increased top padding to account for dev banner */
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: #333941;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    color: #666;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero-database-button {
    width: 100%;
    max-width: 500px;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo {
    max-width: 400px;
    width: 100%;
    height: auto;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: #333941;
    color: #ffffff;
    border-color: #333941;
}

.btn-primary:hover {
    background-color: #555;
    border-color: #555;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: #333941;
    border-color: #333941;
}

.btn-secondary:hover {
    background-color: #333941;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.2rem;
}

/* Disabled button styles */
.btn.disabled {
    background-color: #ccc;
    color: #666;
    border-color: #ccc;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.7;
}

.btn.disabled:hover {
    background-color: #ccc;
    color: #666;
    border-color: #ccc;
    transform: none;
}

.btn-database {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-color: transparent;
    font-weight: 600;
    text-align: center;
    justify-content: center;
}

.btn-database:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: #fafafa;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333941;
}

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

.feature-card {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333941;
}

.feature-description {
    color: #666;
    line-height: 1.6;
}

/* Download Section */
.download {
    padding: 80px 0;
    text-align: center;
}

.download-subtitle {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    color: #666;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.download-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.download-note {
    color: #999;
    font-size: 1rem;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background-color: #fafafa;
    text-align: center;
}

.contact-subtitle {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    color: #666;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.contact-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333941;
}

.contact-item p {
    color: #666;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background-color: #333941;
    color: #ffffff;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo-img {
    height: 30px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ccc;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .dev-banner p {
        font-size: 1rem;
    }
    
    .navbar {
        top: 50px; /* Adjusted for mobile */
    }
    
    .hero {
        padding: 160px 0 80px; /* Adjusted for mobile */
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-database-button {
        max-width: 100%;
    }
    
    .nav-links {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .download-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .feature-card {
        padding: 2rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn-large {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
}

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

/* Focus styles for accessibility */
.btn:focus,
.nav-links a:focus,
.footer-links a:focus {
    outline: 2px solid #333941;
    outline-offset: 2px;
}

/* Protocols Page Styles */
.protocols {
    padding: 180px 0 80px; /* Account for dev banner and navbar */
    min-height: 100vh;
}

.protocols-header {
    text-align: center;
    margin-bottom: 4rem;
    padding-top: 2rem;
}

.protocols-subtitle {
    font-size: 1.3rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

/* Search Bar Styles */
.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1.1rem;
    font-family: 'Cartograph', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: #333941;
    box-shadow: 0 4px 20px rgba(51, 57, 65, 0.1);
}

.search-input::placeholder {
    color: #999;
    font-style: italic;
}

.search-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #666;
    pointer-events: none;
}

.search-results-info {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    font-style: italic;
    min-height: 1.2rem;
}

/* Category Filter Styles */
.filter-container {
    margin-bottom: 1rem;
}

.category-dropdown {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    font-family: 'Cartograph', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
    color: #333941;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

.category-dropdown:focus {
    outline: none;
    border-color: #333941;
    box-shadow: 0 4px 20px rgba(51, 57, 65, 0.1);
}

.category-dropdown:hover {
    border-color: #ccc;
}

/* No search results state */
.no-search-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-search-results .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.no-search-results h3 {
    color: #333941;
    margin-bottom: 1rem;
}

.no-search-results p {
    color: #666;
    margin-bottom: 2rem;
}

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

.protocol-card {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(51, 57, 65, 0.1);
}

.protocol-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.protocol-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.protocol-title {
    font-size: 1.4rem;
    color: #333941;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.protocol-category {
    background-color: #f0f0f0;
    color: #666;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.protocol-content {
    margin-bottom: 1.5rem;
}

.protocol-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.protocol-detail {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: #555;
}

.protocol-detail strong {
    color: #333941;
    font-weight: 600;
}

.protocol-footer {
    border-top: 1px solid rgba(51, 57, 65, 0.1);
    padding-top: 1rem;
}

.protocol-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #999;
}

.protocol-badge {
    background-color: #333941;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Metrics list styling */
.metrics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.metric-tag {
    background-color: #e8f4f8;
    color: #2c5aa0;
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #d1e7dd;
    white-space: nowrap;
}

/* Loading, Error, and Empty States */
.loading-state,
.error-state,
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #333941;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-icon,
.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-state h3,
.empty-state h3 {
    color: #333941;
    margin-bottom: 1rem;
}

.error-state p,
.empty-state p {
    color: #666;
    margin-bottom: 2rem;
}

/* Active navigation link */
.nav-links a.active {
    color: #333941;
    font-weight: 600;
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #333941;
}

/* Responsive adjustments for protocols page */
@media (max-width: 768px) {
    .protocols {
        padding: 160px 0 80px;
    }
    
    .protocols-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .protocol-card {
        padding: 1.5rem;
    }
    
    .protocol-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .protocol-title {
        font-size: 1.2rem;
    }
    
    .protocol-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .metrics-list {
        gap: 0.3rem;
    }
    
    .metric-tag {
        font-size: 0.8rem;
        padding: 0.25rem 0.6rem;
    }
    
    .search-container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .search-input {
        padding: 0.8rem 2.5rem 0.8rem 1rem;
        font-size: 1rem;
    }
    
    .search-icon {
        right: 1rem;
        font-size: 1rem;
    }
    
    .category-dropdown {
        padding: 0.7rem 0.8rem;
        font-size: 0.95rem;
        padding-right: 2.5rem;
    }
}
