/* --- CSS VARIABLES & RESET --- */
:root {
    --primary-blue: #0056b3;
    --deep-blue: #002a5c;
    --tech-cyan: #00a8e8;
    --accent-teal: #00c2cb;
    --white: #ffffff;
    --off-white: #f8faff;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --border-color: #e2e8f0;
    --container-width: 1200px;
    --header-height: 80px;
    --radius: 8px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 6px 12px rgba(0, 42, 92, 0.08);
    --shadow-lg: 0 12px 24px rgba(0, 42, 92, 0.12);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* --- UTILITIES --- */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--deep-blue));
    color: var(--white);
    box-shadow: 0 4px 10px rgba(0, 86, 179, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0, 86, 179, 0.4); }

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}
.btn-outline:hover { background: var(--primary-blue); color: var(--white); }

.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 2.25rem; color: var(--deep-blue); margin-bottom: 1rem; font-weight: 700; }
.section-title p { color: var(--text-gray); max-width: 600px; margin: 0 auto; font-size: 1.1rem; }
.section-padding { padding: 5rem 0; }

/* --- HEADER --- */
header {
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.nav-container { display: flex; justify-content: space-between; align-items: center; width: 100%; }

.logo { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.5rem; color: var(--deep-blue); }
.logo img { height: 60px; width: auto; }

.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-tagline { font-size: 0.65rem; letter-spacing: 2px; color: var(--text-gray); text-transform: uppercase; font-weight: 400; }

.logo-text-footer { display: flex; flex-direction: column; line-height: 1.1; color: var(--white);}
.logo-tagline-footer { font-size: 0.65rem; letter-spacing: 2px; color: var(--white); text-transform: uppercase; font-weight: 400; }

.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-weight: 500; color: var(--text-dark); }
.nav-links a:hover { color: var(--primary-blue); }

.nav-cta { display: none; }
.mobile-menu-btn { display: none; font-size: 1.5rem; color: var(--deep-blue); cursor: pointer; }

@media (min-width: 768px) { .nav-cta { display: block; } }
@media (max-width: 768px) { .nav-links { display: none; } .mobile-menu-btn { display: block; } }

/* --- HERO SECTION --- */
.hero {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 5rem;
    /* New Background: Nile River Image with White Overlay */
    background: linear-gradient(to right, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)),
                url('../img/hero-section1.png');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--deep-blue);
}

.hero-content h1 span {
    color: var(--primary-blue);
    background: linear-gradient(120deg, var(--tech-cyan), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p { font-size: 1.25rem; color: var(--text-gray); margin-bottom: 2.5rem; max-width: 90%; }
.hero-buttons { display: flex; gap: 1rem; }

/* --- ANIMATED LOGO STYLES --- */
.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The container holding the logo and rings */
.logo-animation-wrapper {
    position: relative;
    width: 500px;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The Actual Logo Image - Static but Floating */
.hero-logo-img {
    width: 500px;
    height: auto;
    position: relative;
    z-index: 10;
    filter: drop-shadow(0 10px 20px rgba(0, 42, 92, 0.15));
    animation: floatLogo 4s ease-in-out infinite;
}

/* Orbiting Ring 1 (Solid Tech Ring) */
.orbit-ring-1 {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    border: 2px solid rgba(0, 168, 232, 0.1); /* Faint Cyan */
    border-top: 2px solid var(--text-gray);
    border-left: 2px solid var(--text-gray);
    animation: spin 8s linear infinite;
}

/* Orbiting Ring 2 (Larger Blue Ring) */
.orbit-ring-2 {
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    border-radius: 50%;
    border: 2px solid rgba(0, 42, 92, 0.05);
    border-bottom: 3px solid var(--primary-blue);
    border-right: 3px solid var(--deep-blue);
    animation: spinReverse 12s linear infinite;
}

/* Decorative Blobs behind */
.glow-blob {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,168,232,0.1) 0%, rgba(255,255,255,0) 70%);
    z-index: 1;
    animation: pulseGlow 3s ease-in-out infinite alternate;
}

/* Animations */
@keyframes floatLogo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spinReverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

@keyframes pulseGlow {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.1); opacity: 0.8; }
}

/* --- FEATURES SECTION --- */
.features { background-color: var(--white); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.feature-card {
    padding: 2.5rem; background: var(--off-white); border-radius: var(--radius);
    transition: var(--transition); text-align: left; border: 1px solid transparent;
}
.feature-card:hover { transform: translateY(-5px); background: var(--white); box-shadow: var(--shadow-md); border-color: var(--tech-cyan); }
.icon-box {
    width: 60px; height: 60px; background: rgba(0, 86, 179, 0.1); border-radius: 12px;
    display: flex; align-items: center; justify-content: center; color: var(--primary-blue);
    font-size: 1.5rem; margin-bottom: 1.5rem;
}
.feature-card h3 { margin-bottom: 1rem; color: var(--deep-blue); }
.feature-card p { color: var(--text-gray); font-size: 0.95rem; }

/* --- PRODUCTS --- */
.products { background-color: var(--off-white); }

/* Filter Buttons Styles */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border-radius: 50px;
    border: 1px solid transparent;
    background-color: #f1f5f9; /* Light Gray Inactive */
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

/* Active State (Like "All Kits" in uploaded image) */
.filter-btn.active {
    background-color: var(--primary-blue);
    color: var(--white);
}

/* Hover for inactive buttons */
.filter-btn:hover:not(.active) {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm); transition: var(--transition); display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-5px); }

.product-image { 
    height: 220px; 
    background-color: #e2e8f0; 
    position: relative; /* Required for absolute positioning of label */
    overflow: hidden; 
}

.product-label {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-image img { transform: scale(1.05); }

.product-details { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }

.category-tag { font-size: 0.75rem; text-transform: uppercase; color: var(--tech-cyan); font-weight: 700; margin-bottom: 0.5rem; }
.product-title { font-size: 1.25rem; font-weight: 700; color: var(--deep-blue); margin-bottom: 0.75rem; }

.product-desc { color: var(--text-gray); font-size: 0.9rem; margin-bottom: 1.5rem; flex-grow: 1; }

.product-link { color: var(--primary-blue); font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 5px; }
.product-link:hover i { transform: translateX(5px); }

/* Class to hide filtered items */
.hide-product { display: none; }

/* --- ABOUT / SCIENCE --- */
.science-section { position: relative; overflow: hidden; }
.science-container { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.science-text h2 { font-size: 2.5rem; color: var(--deep-blue); margin-bottom: 1.5rem; }
.science-text p { margin-bottom: 1.5rem; color: var(--text-gray); font-size: 1.1rem; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; }
.stat-item h4 { font-size: 2rem; color: var(--tech-cyan); font-weight: 700; }
.stat-item span { color: var(--text-dark); font-size: 0.9rem; font-weight: 600; }
.science-img img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }

/* --- CTA --- */
.cta-section { background: linear-gradient(135deg, var(--deep-blue), var(--primary-blue)); color: var(--white); text-align: center; }
.cta-content h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.cta-content p { font-size: 1.2rem; opacity: 0.9; margin-bottom: 2.5rem; max-width: 700px; margin-left: auto; margin-right: auto; }
.btn-white { background: var(--white); color: var(--primary-blue); }
.btn-white:hover { background: var(--off-white); color: var(--deep-blue); }

/* --- FOOTER --- */
footer { background-color: #0f172a; color: #94a3b8; padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand h3 { color: var(--white); font-size: 1.5rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 10px; }
.footer-brand p { margin-bottom: 1.5rem; line-height: 1.6; }
.footer-col h4 { color: var(--white); margin-bottom: 1.25rem; font-size: 1.1rem; }
.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col ul li a:hover { color: var(--tech-cyan); }
.social-icons { display: flex; gap: 1rem; }
.social-icons a {
    width: 36px; height: 36px; background: rgba(255,255,255,0.1); display: flex;
    align-items: center; justify-content: center; border-radius: 50%; transition: var(--transition);
}
.social-icons a:hover { background: var(--primary-blue); color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; text-align: center; font-size: 0.9rem; }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-content p, .section-title p { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }
    .science-container { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 576px) {
    .hero-content h1 { font-size: 2.5rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .section-title h2 { font-size: 1.75rem; }
    .logo-animation-wrapper { transform: scale(0.8); }
}

/* =========================================
   LAB TOOLS & SERVICES SECTION (ADDED)
   ========================================= */

.tools-section {
    background-color: var(--off-white);
    border-top: 1px solid var(--border-color);
}

.tools-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.calculator-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.calc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.calc-header h3 { color: var(--deep-blue); font-size: 1.25rem; }
.calc-header span { font-size: 0.8rem; color: var(--tech-cyan); font-weight: 600; background: rgba(0,168,232,0.1); padding: 2px 8px; border-radius: 4px; }

.calc-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.option-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.option-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-dark);
    background-color: #fff;
}

.sequence-input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.sequence-input-group textarea {
    width: 100%;
    height: 120px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 0.5rem;
}
.sequence-input-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.calc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.length-display {
    font-size: 0.9rem;
    color: var(--text-gray);
}
.length-display strong { color: var(--deep-blue); }

.calc-actions { display: flex; gap: 0.5rem; }

/* Result Display Area */
.calc-results {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f1f5f9;
    border-radius: 6px;
    border-left: 4px solid var(--primary-blue);
    display: none; 
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
}
.result-item:last-child { border-bottom: none; }
.result-label { color: var(--text-gray); }
.result-value { font-weight: 700; color: var(--deep-blue); }

/* Services List (Right Side) */
.services-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #f1f5f9;
    border-radius: 6px;
    transition: var(--transition);
    cursor: pointer;
}

.service-item:hover {
    border-color: var(--tech-cyan);
    background-color: #f8fafc;
    transform: translateY(-2px);
}

.service-icon {
    width: 40px;
    height: 40px;
    background-color: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
}

.service-info h4 { font-size: 1rem; color: var(--deep-blue); }
.service-info p { font-size: 0.8rem; color: var(--text-gray); margin: 0; }

/* --- MODAL STYLES (NEW) --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); 
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover { color: var(--deep-blue); }

.modal-body label {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.modal-body textarea {
    width: 100%;
    height: 100px;
    margin-bottom: 1rem;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: monospace;
}

.modal-body button {
    margin-top: 10px;
    margin-right: 5px;
}

.tool-result {
    background-color: var(--off-white);
    padding: 10px;
    border-radius: 4px;
    margin-top: 1rem;
    font-family: monospace;
    word-break: break-all;
    color: var(--deep-blue);
    display: none;
}

/* Loader */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: none;
    margin-left: 10px;
}

.blast-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.85rem;
}
.blast-table th {
    text-align: left;
    padding: 8px;
    background-color: #f1f5f9;
    color: var(--deep-blue);
    font-weight: 600;
}
.blast-table td {
    padding: 8px;
    border-bottom: 1px solid #e2e8f0;
}
.e-value { color: #b91c1c; font-weight: 600; }