/* =====================
   GLOBAL STYLES
   ===================== */

:root {
    --primary: #10B981;
    --primary-dark: #059669;
    --text-color: #333;
    --bg-color: #f9f9f9;
    --sidebar-width: 280px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* =====================
   OFF-CANVAS SIDEBAR
   ===================== */

/* Fixed Handle */
.sidebar-handle {
    position: absolute;
    top: 50%;
    /* Exact screenshot value */
    right: -65px;
    /* Exact screenshot value */
    width: 142px;
    /* Exact screenshot value */
    height: 128px;
    /* Exact screenshot value */
    cursor: pointer;
    transform: translateY(-50%);
    /* Exact screenshot value */
    z-index: 1003;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    transition: none;
    /* Removed resize transition as size is fixed */
}

/* SVG Background image */
.handle-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(6px 0 3px rgba(0, 0, 0, 0.08));
}

/* Dots Container */
.handle-dots {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Screenshot value */
    margin-left: 25px;
    /* Screenshot value */
}

/* Dots inside handle */
.sidebar-handle .dot {
    width: 5px;
    height: 5px;
    background-color: #10B981;
    border-radius: 50%;
    display: block;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Overlay */
#sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

#sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Panel */
#sidebar-panel {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: #ffffff;
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
}

#sidebar-panel.active {
    transform: translateX(0);
}

/* Sidebar Header */
.sidebar-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

#sidebar-close {
    display: none;
    /* Removed from HTML, keeping helper just in case */
}

/* Sidebar Content */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.sidebar-nav ul,
.sidebar-footer-nav ul {
    list-style: none;
    margin-bottom: 2rem;
}

.sidebar-nav h3,
.sidebar-footer-nav h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.sidebar-nav li,
.sidebar-footer-nav li {
    margin-bottom: 0.2rem;
    /* Tightened margin */
}

.sidebar-nav a,
.sidebar-footer-nav a {
    display: block;
    /* padding: 0.5rem 0; kept implied spacing via line-height */
    padding: 0.4rem 0;
    color: #333;
    font-size: 0.8rem;
    /* Requested base size */
    font-weight: 500;
}

.sidebar-nav a:hover,
.sidebar-footer-nav a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

/* --- Sidebar Search --- */
.sidebar-search-container {
    padding: 0 1.5rem;
    margin-top: .4rem;
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#sidebarSearchInput {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 99px;
    font-size: 0.95rem;
    color: var(--text-main);
    background: #f9fafb;
    outline: none;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
}

#sidebarSearchInput:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.search-icon {
    position: absolute;
    right: 14px;
    color: #9ca3af;
    pointer-events: none;
    display: flex;
    align-items: center;
}

/* Spinner */
.search-spinner {
    position: absolute;
    right: 14px;
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    background: white;
    /* Cover the icon */
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Search Results */
.search-results {
    margin-top: 10px;
    background: white;
    /* border: 1px solid #e5e7eb; removed for cleaner look in sidebar */
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    animation: fadeIn 0.2s ease;
}

.search-results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-results li {
    border-bottom: 1px solid #f3f4f6;
}

.search-results li:last-child {
    border-bottom: none;
}

.search-results a {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    transition: background 0.1s;
}

.search-results a:hover {
    background: #f9fafb;
}

.search-results .result-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.3;
}

.search-results .no-results {
    padding: 12px;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Copyright */
.sidebar-copyright {
    padding: 1.5rem;
    font-size: 0.85rem;
    color: #999;
    border-top: 1px solid #eee;
    text-align: center;
    text-align: center;
    font-size: 0.85rem;
    color: #9ca3af;
    border-top: 1px solid #f3f4f6;
    margin-top: auto;
}

/* --- Responsive Scaling --- */
@media (min-width: 768px) {

    /* Tablet */
    html {
        font-size: 110%;
    }

    .sidebar-nav a {
        font-size: 0.88rem;
        /* 0.8 * 1.1 */
    }

    .sidebar-brand {
        font-size: 1.65rem;
    }

    .sidebar-nav h3,
    .sidebar-footer-nav h3 {
        font-size: 0.94rem;
    }

    .sidebar-nav a,
    .sidebar-footer-nav a {
        font-size: 0.88rem;
        /* 0.8 * 1.1 */
    }

    .sidebar-copyright {
        font-size: 0.94rem;
    }
}

/* Desktop Optimization (min-width: 1024px) - Increase by ~20% from base (0.8rem) */
@media (min-width: 1024px) {
    .sidebar-brand {
        font-size: 1.8rem;
    }

    .sidebar-nav h3,
    .sidebar-footer-nav h3 {
        font-size: 1.02rem;
    }

    .sidebar-nav a,
    .sidebar-footer-nav a {
        font-size: 0.96rem;
        /* 0.8 * 1.2 */
    }

    .sidebar-copyright {
        font-size: 1.02rem;
    }
}

/* =====================
   HERO SECTION
   ===================== */

.hero {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    padding: 100px 20px;
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    background-color: white;
    color: var(--primary);
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
    transition: var(--transition);
}

.btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}



/* =====================
   SECTIONS
   ===================== */

section {
    padding: 60px 20px;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #333;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
}