/* Global Styles */
:root {
    --primary-color: #27ae60;
    --primary-hover: #219150;
    --secondary-color: #2c3e50;
    --background-color: #f8fafc;
    --text-color: #334155;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.9);
    --nav-text: #334155;
    --footer-bg: #1e293b;
    --footer-text: #f1f5f9;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --roadmap-item-bg: #f0fdf4;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

main {
    padding-top: 80px; /* Space for fixed navbar */
    min-height: 80vh;
}

/* Navbar */
.navbar {
    background-color: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #F29600; /* Updated to match logo.png/svg dark grey */
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--nav-text);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--nav-text);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    padding: 60px 0 120px;
    position: relative;
    overflow: hidden;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.hero-wave .shape-fill {
    fill: var(--background-color);
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 16px;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--secondary-color);
    letter-spacing: -0.025em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 60px;
    font-size: 1.1rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Reduced from 280px */
    gap: 32px;
}

.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.search-bar input, .search-bar select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-bar input:focus, .search-bar select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.product-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.product-image {
    height: 220px;
    overflow: hidden;
    background-color: #f1f5f9;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 24px;
}

.product-title {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.product-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.25rem;
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--secondary-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
    box-sizing: border-box;
    background: var(--card-bg);
    color: var(--text-color);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.submit-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
}

.submit-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 80px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 60px;
    margin-bottom: 60px;
}

.footer-section h3 {
    color: white;
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-section p {
    color: #94a3b8;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section a {
    color: #94a3b8;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.social-icon:hover {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    color: #64748b;
    font-size: 0.9rem;
}

/* News & Jobs Styles */
.news-item, .job-item {
    background: var(--card-bg);
    padding: 32px;
    margin-bottom: 24px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.news-item:hover, .job-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.news-date {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.news-title, .job-title {
    margin: 0 0 12px 0;
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.news-summary, .job-desc {
    color: var(--text-muted);
    line-height: 1.7;
}

.job-item {
    border-left: 4px solid var(--primary-color);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.job-type {
    background: #f0fdf4;
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.apply-btn, .read-more-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 8px 24px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.2s;
    font-weight: 500;
}

.apply-btn:hover, .read-more-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Helper Classes */
.flex-row-responsive {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
    align-items: center;
}

.flex-col-responsive {
    flex: 1;
    min-width: 280px; /* Reduced from 320px to prevent overflow on small screens */
}

.text-center { text-align: center; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }

/* Custom Containers */
.card-container {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.message-list-container {
    background: var(--background-color);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    max-height: 400px;
    overflow-y: auto;
}

.roadmap-item {
    padding: 20px;
    background: var(--roadmap-item-bg);
    border-radius: 12px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 16px;
    padding: 40px;
    position: relative;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--background-color);
}

.modal-close:hover {
    color: var(--secondary-color);
    background: #e2e8f0;
}

/* Animations */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Back to top button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    transform: translateY(-5px);
    background: var(--primary-hover);
}

/* Dark Theme Support (Basic) */
[data-theme='dark'] {
    --background-color: #0f172a;
    --text-color: #f1f5f9;
    --card-bg: #1e293b;
    --border-color: #334155;
    --secondary-color: #f1f5f9;
    --text-muted: #94a3b8;
    --nav-bg: rgba(15, 23, 42, 0.9);
    --nav-text: #f1f5f9;
    --roadmap-item-bg: #1e293b; /* Adjusted for dark mode */
}

[data-theme='dark'] .hero-section {
    background: linear-gradient(135deg, #022c22 0%, #064e3b 100%);
}

[data-theme='dark'] .hero-wave .shape-fill {
    fill: var(--background-color);
}

[data-theme='dark'] .job-type {
    background: rgba(39, 174, 96, 0.2);
}

[data-theme='dark'] .product-image {
    background-color: #020617;
}

[data-theme='dark'] .modal-close:hover {
    background: #334155;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .navbar .container {
        height: 60px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--card-bg);
        flex-direction: column;
        padding: 24px 0;
        box-shadow: var(--shadow-lg);
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        margin: 12px 0;
    }

    .hero-section {
        padding: 40px 0 80px;
    }

    h1 { font-size: 2rem !important; }
    h2 { font-size: 1.75rem !important; }
    
    .container {
        padding: 0 16px;
    }

    .footer-content {
        gap: 40px;
    }
}
