@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Poppins:wght@400;600;700&display=swap');

:root {
    --bg-mint: #e8f5e9;
    --bg-blue: #e3f2fd;
    --bg-pink: #fce4ec;
    --bg-yellow: #fffde7;
    --primary: #4db6ac;
    --primary-dark: #00897b;
    --accent: #ff80ab;
    --text-main: #37474f;
    --text-light: #78909c;
    --card-bg: rgba(255, 255, 255, 0.8);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: #fff;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Utils */
.container-new {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.btn-primary {
    display: inline-block;
    padding: 15px 35px;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(77, 182, 172, 0.3);
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 182, 172, 0.4);
    color: white;
}

/* Hero Section */
.hero {
    position: relative;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(-45deg, var(--bg-mint), var(--bg-blue), var(--bg-pink), var(--bg-yellow));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    overflow: hidden;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero-content {
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Services */
.services {
    background: #fff;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 40px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #f0f0f0;
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.service-card i,
.service-card span.icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
}

.card-mint {
    background: var(--bg-mint);
}

.card-blue {
    background: var(--bg-blue);
}

.card-pink {
    background: var(--bg-pink);
}

/* Blog Grid */
.blog-section {
    background: #fafafa;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.blog-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.blog-card-img {
    height: 120px;
    background-size: cover;
    background-position: center;
}

/* Generative Patterns */
.pattern-0 {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.pattern-1 {
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
}

.pattern-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.pattern-3 {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
}

.blog-card-content {
    padding: 20px;
    flex-grow: 1;
}

.blog-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.blog-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

/* Article Metadata */
.article-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Breadcrumbs */
.breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: "›";
    margin-left: 8px;
    color: var(--text-light);
    opacity: 0.5;
}

.breadcrumb-item a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--text-main);
    font-weight: 500;
}

/* Technologies Grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.tech-item {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

/* Agile Workflow */
.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.workflow-step {
    text-align: center;
    position: relative;
    padding: 20px;
}

.step-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.15;
    line-height: 1;
    margin-bottom: 10px;
}

.workflow-step h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.workflow-step p {
    font-size: 0.95rem;
    color: var(--text-light);
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.tech-item strong {
    display: block;
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 5px;
}

.tech-item span {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-main);
}

.logo img {
    height: 40px;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-main);
    font-weight: 600;
}

/* Footer */
footer {
    background: #fff;
    padding: 60px 0 20px;
    border-top: 1px solid #eee;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-bottom {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Content Page specific */
.content-page {
    margin-top: 100px;
    padding-bottom: 80px;
}

.article-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--bg-mint);
}

.article-content {
    font-size: 1.1rem;
    max-width: 900px;
}

.article-content h1,
.article-content h2 {
    margin: 30px 0 15px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    cursor: pointer;
    padding: 10px 0;
}

/* Bridge to prevent closing */
.dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 260px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    z-index: 1001;
    border-radius: 15px;
    padding: 12px 0;
    top: calc(100% + 5px);
    left: 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-item {
    position: relative;
}

.dropdown-item a {
    color: var(--text-main);
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-decoration: none;
}

.dropdown-item a .arrow {
    opacity: 0.4;
    font-size: 1.1rem;
    margin-left: 15px;
}

.dropdown-item:hover>a {
    background-color: var(--bg-mint);
    color: var(--primary-dark);
}

/* Sub-dropdown logic */
.dropdown-sub-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 260px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    z-index: 1002;
    border-radius: 15px;
    padding: 12px 0;
    top: -12px;
    left: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Bridge for sub-menu */
.dropdown-item::after {
    content: "";
    position: absolute;
    top: 0;
    right: -20px;
    width: 20px;
    height: 100%;
}

.dropdown-item:hover>.dropdown-sub-content {
    display: block;
}

.dropdown:hover>.dropdown-content {
    display: block;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Mobile Toggle */
    .mobile-toggle {
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
        z-index: 2000;
    }

    .mobile-toggle span {
        display: block;
        width: 25px;
        height: 2px;
        background-color: var(--text-main);
        border-radius: 2px;
        transition: 0.3s;
    }

    /* Mobile Drawer */
    .mobile-drawer {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 350px;
        height: 100vh;
        background: #fff;
        z-index: 20000;
        transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        padding: 20px;
        overflow-y: auto;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .mobile-drawer.active {
        right: 0;
    }

    .drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 1px solid #eee;
    }

    .close-drawer {
        background: none;
        border: none;
        font-size: 2rem;
        cursor: pointer;
        color: var(--text-light);
    }

    .drawer-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(4px);
        z-index: 19999;
        display: none;
        opacity: 0;
        transition: 0.3s;
    }

    .drawer-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Mobile Nav Links */
    .mobile-nav-link {
        display: block;
        padding: 15px 0;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-main);
        border-bottom: 1px solid #f5f5f5;
    }

    .mobile-articles-header {
        margin-top: 25px;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--text-light);
        font-weight: bold;
        margin-bottom: 15px;
    }

    /* Hierarchical Menu in Mobile */
    .menu-item {
        border-bottom: 1px solid #f5f5f5;
    }

    .item-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .menu-item a {
        display: block;
        padding: 12px 10px;
        color: var(--text-main);
        text-decoration: none;
        flex: 1;
        font-size: 0.95rem;
    }

    .submenu-toggle {
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--primary);
        width: 50px;
        height: 45px;
        cursor: pointer;
        transition: transform 0.3s;
    }

    .submenu-toggle.active {
        transform: rotate(90deg);
    }

    .submenu-content {
        display: none;
        padding-left: 15px;
        background: #fafafa;
    }

    .menu-item.expanded>.submenu-content {
        display: block;
    }

    /* Mobile Footer Layout */
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
    }

    .footer-content .logo {
        flex-direction: column;
        align-items: center;
        margin-bottom: 20px;
        width: 100%;
    }

    .footer-content .logo img {
        margin-bottom: 10px;
    }

    .footer-content .logo>div {
        text-align: center;
    }

    .footer-content .contact-links {
        width: 100%;
        text-align: center;
    }

    /* Fix mobile conversion tools */
    .mobile-only {
        display: flex !important;
        /* Ensure visible on mobile */
        justify-content: center;
        align-items: center;
    }

    .back-to-top {
        width: 50px !important;
        height: 50px !important;
        bottom: 20px !important;
        right: 20px !important;
        position: fixed !important;
    }
}

/* Hide toggle on desktop */
@media (min-width: 769px) {
    .mobile-toggle {
        display: none;
    }

    .mobile-drawer,
    .drawer-overlay {
        display: none;
    }

    .mobile-only {
        display: none !important;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #008080;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #006666;
    transform: translateY(-5px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}