/* ========================================
   Swayambhu Labs - Main Stylesheet
   ======================================== */

/* --- CSS Variables --- */
:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #3B82F6;
    --accent: #D4A017;
    --accent-light: #F0C040;
    --dark: #1E293B;
    --dark-light: #334155;
    --gray: #64748B;
    --gray-light: #94A3B8;
    --gray-lighter: #F1F5F9;
    --white: #FFFFFF;
    --bg-light: #F8FAFC;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --radius: 12px;
    --radius-lg: 20px;
}

/* --- Global Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Navbar --- */
.navbar {
    padding: 16px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition);
    border-bottom: 1px solid transparent;
    z-index: 1000;
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    height: 56px;
    width: 56px;
    object-fit: contain;
    border-radius: 8px;
}

.brand-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.brand-highlight {
    color: var(--primary);
}

.navbar-nav .nav-link {
    color: var(--dark-light);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 18px !important;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.06);
}

.navbar-toggler {
    border: none;
    padding: 8px;
}

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

/* --- Hero Section --- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--white), transparent);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.15), transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(212, 160, 23, 0.1), transparent 50%);
}

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

.hero-subtitle {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--gray-light);
    max-width: 560px;
    margin-bottom: 36px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-cta {
    padding: 14px 36px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 10px;
    letter-spacing: 0.3px;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35);
}

.btn-cta-secondary {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
}

.btn-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--white);
    box-shadow: none;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: bounce 2s ease infinite;
}

.hero-scroll-indicator a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
}

.hero-scroll-indicator a:hover {
    color: var(--white);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* --- Section Common --- */
.section-padding {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--bg-light) !important;
}

.section-subtitle {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.section-description {
    font-size: 1.05rem;
    color: var(--gray);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.8;
}

/* --- Service Cards --- */
.service-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius);
    padding: 36px 30px;
    height: 100%;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: var(--transition);
}

.service-icon i {
    font-size: 1.4rem;
    color: var(--primary);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.service-card:hover .service-icon i {
    color: var(--white);
}

.service-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}

.service-card p {
    font-size: 0.92rem;
    color: var(--gray);
    line-height: 1.7;
    margin: 0;
}

/* --- Product Cards --- */
.product-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    height: 100%;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.product-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.product-icon i {
    font-size: 1.6rem;
    color: var(--white);
}

.product-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark);
}

.product-tagline {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 500;
    font-style: italic;
    margin-bottom: 20px;
}

.product-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.product-features li {
    font-size: 0.9rem;
    color: var(--gray);
    padding: 6px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.product-features li i {
    color: var(--accent);
    font-size: 0.8rem;
    margin-top: 4px;
    flex-shrink: 0;
}

.product-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
}

/* --- Client Logos --- */
.client-logo-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.client-logo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.15);
}

.client-logo-card img {
    max-height: 56px;
    max-width: 140px;
    object-fit: contain;
    margin-bottom: 12px;
    opacity: 0.7;
    transition: var(--transition);
}

.client-logo-card:hover img {
    opacity: 1;
}

.client-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray);
    margin: 0;
    letter-spacing: 0.5px;
}

/* --- Contact Section --- */
.contact-form-wrapper {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.form-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--dark);
    margin-bottom: 6px;
}

.form-control {
    padding: 12px 16px;
    border: 1.5px solid var(--gray-lighter);
    border-radius: 10px;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--bg-light);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background: var(--white);
}

.form-control::placeholder {
    color: var(--gray-light);
}

textarea.form-control {
    resize: vertical;
    min-height: 130px;
}

.btn-submit {
    padding: 14px 40px;
    font-weight: 600;
    border-radius: 10px;
    width: 100%;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Contact Info */
.contact-info {
    padding: 20px 0;
}

.contact-info-item {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.1rem;
    color: var(--primary);
}

.contact-info-item h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.contact-info-item p {
    font-size: 0.92rem;
    color: var(--gray);
    margin: 0;
    line-height: 1.6;
}

.contact-info-item p a {
    color: var(--gray);
}

.contact-info-item p a:hover {
    color: var(--primary);
}

/* Social Links */
.social-links h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icons a {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bg-light);
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 1rem;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

/* --- Footer --- */
.footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 30px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo {
    height: 40px;
    width: 40px;
    object-fit: contain;
    border-radius: 8px;
}

.footer .brand-text {
    color: var(--white);
}

.footer-about {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    max-width: 320px;
}

.footer-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links li a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.footer-links li a:hover {
    color: var(--white);
    padding-left: 4px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
}

.footer-contact li i {
    color: var(--primary-light);
    margin-top: 4px;
    flex-shrink: 0;
}

.footer-contact li a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-contact li a:hover {
    color: var(--white);
    padding-left: 0;
}

.footer .social-icons a {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.footer .social-icons a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 40px 0 20px;
}

.footer-copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-3px);
}

/* --- Responsive --- */
@media (max-width: 991px) {
    .section-padding {
        padding: 70px 0;
    }

    .navbar-collapse {
        background: var(--white);
        border-radius: var(--radius);
        padding: 16px;
        margin-top: 12px;
        box-shadow: var(--shadow-lg);
        border: 1px solid rgba(0, 0, 0, 0.06);
    }

    .navbar-nav .nav-link {
        padding: 10px 16px !important;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-padding {
        padding: 60px 0;
    }

    .contact-form-wrapper {
        padding: 28px 20px;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
        text-align: center;
    }

    .footer {
        text-align: center;
    }

    .footer-brand {
        justify-content: center;
    }

    .footer-about {
        margin: 0 auto;
    }

    .footer-links {
        margin-bottom: 10px;
    }

    .footer .social-icons {
        justify-content: center;
    }

    .social-icons {
        justify-content: center;
    }

    .social-links {
        text-align: center;
    }

    .contact-info {
        text-align: left;
    }
}

@media (max-width: 575px) {
    .hero-section {
        padding-top: 80px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .service-card, .product-card {
        padding: 28px 22px;
    }
}

/* --- Utilities --- */
.text-primary {
    color: var(--primary) !important;
}

/* --- Preloader --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-lighter);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
