/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* Root Variables */
:root {
    --background: hsl(210, 20%, 98%);
    --foreground: hsl(215, 30%, 12%);
    --primary: hsl(215, 50%, 18%);
    --primary-foreground: hsl(210, 40%, 98%);
    --secondary: hsl(210, 25%, 93%);
    --accent: hsl(152, 60%, 42%);
    --accent-foreground: hsl(0, 0%, 100%);
    --muted-foreground: hsl(215, 15%, 45%);
    --border: hsl(214, 25%, 88%);
    --card: hsl(0, 0%, 100%);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --shadow-soft: 0 4px 24px -4px rgba(33, 60, 91, 0.08);
    --shadow-elevated: 0 12px 40px -8px rgba(33, 60, 91, 0.12);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 4rem 0 3rem;
    background: linear-gradient(135deg, var(--primary) 0%, hsl(215, 50%, 25%) 100%);
    color: var(--primary-foreground);
    overflow: hidden;
    margin-top: 80px;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    background-image: radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.3) 1px, transparent 0);
    background-size: 40px 40px;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 48rem;


}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: rgba(52, 168, 121, 0.2);
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, hsl(168, 55%, 38%) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

/* Stats Bar */
.stats-bar {
    padding: 2rem 0;
    background: rgba(52, 168, 121, 0.05);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    animation: fadeInUp 0.6s ease-out;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}


/* Projects Section Removed */


/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background: rgba(52, 168, 121, 0.05);
}

.cta-content {
    max-width: 48rem;
    margin: 0 auto;
    text-align: center;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    color: var(--foreground);
}

.cta-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-foreground);
    box-shadow: 0 0 40px rgba(52, 168, 121, 0.2);
}

.btn-primary:hover {
    background: hsl(152, 60%, 38%);
    transform: translateY(-2px);
    box-shadow: 0 0 50px rgba(52, 168, 121, 0.3);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animations for project cards */
.project-card:nth-child(1) {
    animation-delay: 0.1s;
}

.project-card:nth-child(2) {
    animation-delay: 0.2s;
}

.project-card:nth-child(3) {
    animation-delay: 0.3s;
}

.project-card:nth-child(4) {
    animation-delay: 0.4s;
}

.project-card:nth-child(5) {
    animation-delay: 0.5s;
}

.project-card:nth-child(6) {
    animation-delay: 0.6s;
}

.project-card:nth-child(7) {
    animation-delay: 0.7s;
}

.project-card:nth-child(8) {
    animation-delay: 0.8s;
}

.project-card:nth-child(9) {
    animation-delay: 0.9s;
}

.project-card:nth-child(10) {
    animation-delay: 1s;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero-section {
        padding: 8rem 0 4rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .projects-section {
        padding: 3rem 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cta-section {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 1.75rem;
    }
}

/* Dashboard Gallery Section */
.dashboard-gallery-section {
    padding: 6rem 0;
    background: var(--background);
    overflow: hidden;
    position: relative;
}

.dashboard-gallery-section::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image:
        linear-gradient(to right, rgba(52, 168, 121, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(52, 168, 121, 0.1) 1px, transparent 1px);
    background-size: 60px 60px;
}

.gallery-slider {
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.gallery-track {
    display: flex;
    gap: 1.5rem;
    animation: scroll-gallery 50s linear infinite;
    width: max-content;
}

.gallery-item {
    flex-shrink: 0;
    width: 380px;
    height: 280px;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-elevated);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
}

.gallery-info p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

@keyframes scroll-gallery {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-380px * 5 - 7.5rem));
    }
}

/* Pause animation on hover */
.gallery-slider:hover .gallery-track {
    animation-play-state: paused;
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 10;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: -40px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.1);
    color: var(--accent);
}

.lightbox-info {
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem 1.5rem;
    border-radius: 0 0 8px 8px;
    color: white;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    backdrop-filter: blur(5px);
}

.lightbox-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: white;
}

.lightbox-info p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-track {
        gap: 1rem;
        animation-duration: 35s;
    }

    .gallery-item {
        width: 280px;
        height: 200px;
    }

    .dashboard-gallery-section {
        padding: 4rem 0;
    }

    /* Reduce lightbox info size on tablets */
    .lightbox-info h3 {
        font-size: 1.1rem;
    }

    .lightbox-info p {
        font-size: 0.9rem;
        margin-bottom: 0 !important;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        width: 240px;
        height: 180px;
    }

    /* Reduce lightbox info size further on mobile */
    .lightbox-info {
        padding: 0.3rem 1rem;
    }

    .lightbox-info h3 {
        font-size: 1rem;
        margin-bottom: 0.15rem;
    }

    .lightbox-info p {
        font-size: 0.8rem;
        margin-bottom: 0 !important;
    }

    /* Adjust close button for mobile */

}

/* All Projects Section */
.all-projects-section {
    padding: 5rem 0;
    background: var(--background);
    border-bottom: 1px solid var(--border);
}

.section-header {
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: var(--foreground);
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* Category Block */
.category-block {
    margin-bottom: 4rem;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    border: 1px solid var(--border);
    /* box-shadow: var(--shadow-soft); */
}

.category-block:last-child {
    margin-bottom: 0;
}

.category-header-main {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
}

.category-icon-large {
    padding: 1rem;
    background: rgba(52, 168, 121, 0.1);
    border-radius: 1rem;
    flex-shrink: 0;
}

.category-icon-large svg {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--accent);
}

.category-title-main {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.category-description-main {
    font-size: 1rem;
    color: var(--muted-foreground);
    line-height: 1.6;
    max-width: 800px;
}

/* Products Grid */
.products-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-item {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.product-item:hover {
    background: white;
    border-color: var(--accent);
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

.product-item-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.product-icon {
    width: 2.5rem;
    height: 2.5rem;
    /* Already defined padding/bg in projects.css for other cards, verifying reuse */
    padding: 0.6rem;
    background: rgba(52, 168, 121, 0.1);
    border-radius: 0.5rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-icon svg {
    width: 100%;
    height: 100%;
    color: var(--accent);
}

/* Ensure h3 is used as requested (hierarchically appropriate) */
.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
}

.product-description {
    font-size: 0.9375rem;
    color: var(--muted-foreground);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.product-features {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-features li {
    font-size: 0.75rem;
    color: var(--accent);
    background: rgba(52, 168, 121, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
}

/* Lightbox close button adjustment */
@media (max-width: 480px) {
    .lightbox-close {
        top: -35px;
        right: -10px;
        font-size: 1.75rem;
    }
}