@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    /* Color Palette */
    --primary: #10b981;
    --primary-rgb: 16, 185, 129;
    --primary-light: #34d399;
    --primary-dark: #059669;
    --primary-bg: rgba(16, 185, 129, 0.1);

    --secondary: #3b82f6;
    --secondary-dark: #2563eb;

    --accent: #f59e0b;

    --text-main: #1f2937;
    --text-muted: #6b7280;
    --text-light: #9ca3af;

    /* Surface / Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);

    /* Spacing & Borders */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    font-family: 'Outfit', sans-serif;
    background: #f8fafc;
    background-image:
        radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.05) 0px, transparent 50%),
        radial-gradient(at 50% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(245, 158, 11, 0.05) 0px, transparent 50%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    padding-top: 100px;
    /* Space for fixed/floating nav */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Glass Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
}

.glass-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

/* Typography Enhancements */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Premium Buttons */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    gap: 0.5rem;
    animation: fadeInUp 0.6s ease-out both;
}

.btn-primary-modern {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary-modern:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    transform: scale(1.02);
}

.btn-primary-modern:active {
    transform: scale(0.98);
}

/* Inputs */
.input-modern {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.8);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.input-modern:focus {
    outline: none;
    border-color: var(--primary-light);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-bg);
}

/* Tables */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.table-modern th {
    padding: 1rem;
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table-modern tr td {
    background: white;
    padding: 1.25rem 1rem;
}

.table-modern tr td:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.table-modern tr td:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.table-modern tbody tr {
    transition: transform 0.2s ease;
}

.table-modern tbody tr:hover {
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

/* Navigation Styles consolidated below */

/* --- Integrated External Viewer --- */
.integrated-viewer-wrapper {
    display: none;
    width: 100%;
    min-height: 85vh;
    animation: fadeInUp 0.5s ease;
    margin-bottom: 5rem;
}

.viewer-container {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.04);
}

.viewer-header-bar {
    background: #f8fafc;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.viewer-header-bar h3 {
    font-size: 1rem;
    margin: 0;
    font-weight: 700;
    color: var(--primary-dark);
}

.viewer-main-frame {
    width: 100%;
    height: 750px;
    border: none;
    background: white;
}

.btn-close-viewer {
    padding: 0.4rem 1rem;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
}

.btn-close-viewer:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.05);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Navigation */
.nav-modern {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0.75rem 2.5rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
}

.nav-pill {
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    background: white;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--glass-border);
}

.nav-pill:hover,
.nav-pill.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
    border-color: var(--primary);
}

.category-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

/* Results Section */
.results-section {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    display: none;
}

/* Input Group Styles */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 1.25rem;
    color: var(--primary);
    font-size: 1.1rem;
    z-index: 10;
}

.input-group input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3.5rem;
    border-radius: var(--radius-md);
    border: 2px solid rgba(0, 0, 0, 0.08);
    background: white;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-bg), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.input-group input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.footer-modern {
    background: #0f172a;
    color: #f1f5f9;
    padding: 3rem 2rem 1.5rem;
    margin-top: 5rem;
    border-top: 3px solid var(--primary);
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.footer-col h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    font-weight: 700;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    color: #94a3b8;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.5;
}

.footer-col ul li i {
    color: var(--primary);
    width: 16px;
    flex-shrink: 0;
}

.footer-col ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-logo {
    height: 50px;
    margin-top: 1rem;
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: #64748b;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #94a3b8;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-3px) scale(1.1);
}

@media (max-width: 768px) {
    .nav-modern {
        padding: 0.75rem 1rem;
        top: 0;
    }

    .top-banner {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .banner-left {
        flex-direction: column;
        gap: 0.75rem;
    }

    .banner-contact {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-grid {
        gap: 1.5rem;
        grid-template-columns: 1fr;
    }

    .footer-modern {
        padding: 2rem 1rem 1rem;
    }
}