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

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
    /* Fallback padding to avoid content under fixed navbar before JS adjusts */
    padding-top: var(--nav-height, 72px);
}

/* Custom Properties */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 72px; /* default header height */
}

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

/* Ensure anchors don't scroll under the fixed navbar */
section {
    scroll-margin-top: var(--nav-height, 72px);
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    padding: 1rem 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #667eea;
}

.navbar-dark .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: var(--primary-gradient);
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-dark .navbar-nav .nav-link:hover::after {
    width: 100%;
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--dark-color) !important;
}

/* Custom Hamburger Menu */
.custom-toggler {
    border: none;
    padding: 0.25rem;
    outline: none;
    box-shadow: none;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: transparent;
    position: relative;
}

.custom-toggler:focus {
    box-shadow: none;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.custom-toggler.collapsed .hamburger-line:nth-child(1) {
    transform: rotate(0deg) translate(0px, 0px);
}

.custom-toggler.collapsed .hamburger-line:nth-child(2) {
    opacity: 1;
}

.custom-toggler.collapsed .hamburger-line:nth-child(3) {
    transform: rotate(0deg) translate(0px, 0px);
}

.custom-toggler:not(.collapsed) .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.custom-toggler:not(.collapsed) .hamburger-line:nth-child(2) {
    opacity: 0;
}

.custom-toggler:not(.collapsed) .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Styles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        border-radius: var(--border-radius);
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: var(--shadow-medium);
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 8px;
        margin-bottom: 0.25rem;
        text-align: center;
        transition: var(--transition);
    }
    
    .navbar-nav .nav-link:hover {
        background: rgba(102, 126, 234, 0.1);
        color: #667eea !important;
    }
    
    .navbar-nav .btn {
        margin: 0.5rem 0;
        text-align: center;
        display: block;
    }
}

/* Hero Section */
.hero-section {
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badges .badge {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 500;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.text-gradient {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.hero-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

.hero-buttons .btn {
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--secondary-gradient);
    border: none;
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 500px;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    color: white;
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(1) {
    top: 50px;
    right: 50px;
    animation-delay: 0s;
}

.floating-card:nth-child(2) {
    top: 200px;
    left: 50px;
    animation-delay: 2s;
}

.floating-card:nth-child(3) {
    bottom: 50px;
    right: 100px;
    animation-delay: 4s;
}

.floating-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.floating-card h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.floating-card p {
    font-size: 0.875rem;
    opacity: 0.8;
    margin: 0;
}

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

/* Section Styles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

/* About Section */
.about-content .lead {
    font-size: 1.125rem;
    color: #4b5563;
    margin-bottom: 2rem;
}

.about-features {
    list-style: none;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #374151;
}

.feature-item i {
    margin-right: 0.75rem;
    font-size: 1.125rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
}

.stat-icon i {
    color: white;
    font-size: 1.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: #6b7280;
    margin: 0;
}

/* Project Cards */
.project-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    height: 100%;
    border: 1px solid #e5e7eb;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: #667eea;
}

.project-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.project-icon i {
    color: white;
    font-size: 1.5rem;
}

.project-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.project-content p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Lab Cards */
.lab-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    height: 100%;
    border: 1px solid #e5e7eb;
}

.lab-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: #667eea;
}

.lab-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.lab-icon i {
    color: white;
    font-size: 2rem;
}

.lab-card h5 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.lab-card p {
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* Testimonials */
.testimonials-swiper {
    padding: 2rem 0;
}

/* Make slides and cards stretch to equal heights */
.testimonials-swiper .swiper-wrapper {
    align-items: stretch;
}

.testimonials-swiper .swiper-slide {
    display: flex;
    height: auto;
}

.testimonial-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    margin: 1rem;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.testimonial-content {
    position: relative;
    margin-bottom: 2rem;
    flex: 1;
}

.quote-icon {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.testimonial-content p {
    font-size: 1rem;
    line-height: 1.7;
    color: #374151;
    font-style: italic;
    margin: 0;
}

.testimonial-author {
    display: flex;
    align-items: center;
    margin-top: auto;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.author-avatar i {
    color: white;
    font-size: 1.25rem;
}

.author-info h6 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.author-info span {
    font-size: 0.875rem;
    color: #6b7280;
}

.swiper-pagination-bullet {
    background: #667eea;
    opacity: 0.3;
}

.swiper-pagination-bullet-active {
    opacity: 1;
}

/* CTA Section */
.cta-section {
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="b" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="100" cy="100" r="80" fill="url(%23b)"/><circle cx="900" cy="200" r="120" fill="url(%23b)"/><circle cx="300" cy="800" r="100" fill="url(%23b)"/></svg>');
    opacity: 0.3;
}

.cta-buttons {
    position: relative;
    z-index: 2;
}

/* Footer */
footer {
    background: var(--dark-color) !important;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: var(--transition);
}

.social-links a:hover {
    background: #667eea;
    color: white !important;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .floating-card {
        position: static;
        margin-bottom: 1rem;
        animation: none;
    }
    
    .hero-visual {
        height: auto;
        margin-top: 2rem;
    }
    
    .about-stats {
        margin-top: 2rem;
    }
    
    .hero-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        justify-content: center;
        max-width: 100%;
    }
    
    .hero-buttons .btn {
        flex: 0 0 auto;
        min-width: 120px;
        max-width: calc(100vw - 2rem);
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .hero-buttons .btn {
        flex: 1 1 100%;
        margin-bottom: 0.5rem;
    }
    
    .project-card,
    .lab-card,
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        margin-right: 1rem;
    }
    
    .stat-icon i {
        font-size: 1.25rem;
    }
    
    .stat-content h3 {
        font-size: 1.5rem;
    }
}

/* Loading Animation */
.loading {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

