/* ============================================
   FlexAI - Project Website Styles
   ============================================ */
/* --- CSS Variables --- */
:root {
    --primary-color: #DC2626;
    --primary-dark: #B91C1C;
    --secondary-color: #991B1B;
    --accent-color: #f59e0b;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-secondary: #f3f4f6;
    --bg-dark: #111827;
    --border-color: #e5e7eb;
    --max-width: 1200px;
    --header-height: 70px;
}
/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}
a {
    text-decoration: underline;
    color: var(--primary-color);
}
a:hover {
    color: var(--primary-dark);
}
/* Remove underline from navigation, logo, and buttons */
nav a,
.logo,
.btn,
.btn-primary,
.btn-outline,
.card-link {
    text-decoration: none;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
ul, ol {
    list-style: none;
}
/* --- Container --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}
/* --- Header & Navigation --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-color);
    z-index: 1000;
}
header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}
.logo img {
    height: 42px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* Fine-tuning for visual balance: FlexAI often appears larger due to aspect ratio */
.logo img[alt*="FlexAI"] {
    height: 40px;
}
.logo-placeholder {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}
nav ul {
    display: flex;
    gap: 30px;
}
nav a {
    color: var(--text-color);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}
nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
}
nav a:hover::after,
nav a.active::after {
    width: 100%;
}
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}
.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
}
/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    padding-top: var(--header-height);
    text-align: center;
}
.hero-content {
    max-width: 800px;
    padding: 40px 20px;
}
.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--primary-color);
}
.hero .subtitle {
    font-size: 1.4rem;
    color: var(--text-light);
    margin-bottom: 30px;
}
.hero-image {
    margin: 40px auto;
    max-width: 336px;
}
.image-placeholder {
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    padding: 60px 40px;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.image-placeholder.large {
    padding: 100px 40px;
}
.image-placeholder-icon {
    font-size: 3rem;
    opacity: 0.5;
}
/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}
.btn-primary {
    background: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}
.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}
.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}
/* --- Sections --- */
section {
    padding: 80px 0;
}
section:nth-child(even) {
    background: var(--bg-secondary);
}
.section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}
.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}
/* --- Cards Grid --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.cards-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.cards-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.card {
    background: var(--bg-color);
    overflow: hidden;
}
.card:hover {
}
.card-image {
    height: 250px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden; /* Ensure images don't overflow */
}

/* Image Hover Effect */
.image-hover-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.image-hover-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out;
}

.image-hover-container .img-back {
    opacity: 0;
    z-index: 2;
}

.image-hover-container:hover .img-back {
    opacity: 1;
}
.card-content {
    padding: 25px;
}
.card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.card p {
    color: var(--text-light);
    margin-bottom: 15px;
}
.card-link {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.card-link::after {
    content: '→';
}
.card-link:hover::after {
}
/* --- Features Section --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}
.feature {
    text-align: center;
    padding: 30px;
}
.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}
.feature h3 {
    margin-bottom: 10px;
}
.feature p {
    color: var(--text-light);
}
/* --- Content Page Layouts --- */
.page-header {
    background: var(--primary-color);
    color: white;
    padding: 120px 0 60px;
    text-align: center;
    margin-top: var(--header-height);
}
.page-header h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
}
.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}
.page-content {
    padding: 60px 0;
}
.page-content h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: var(--text-color);
}
.page-content h3 {
    font-size: 1.4rem;
    margin: 30px 0 15px;
    color: var(--text-color);
}
.page-content p {
    margin-bottom: 15px;
    color: var(--text-color);
}
.page-content ul, .page-content ol {
    margin: 15px 0 15px 30px;
}
.page-content li {
    margin-bottom: 8px;
    list-style: disc;
}
.page-content ol li {
    list-style: decimal;
}
.page-content ol li::marker {
    font-weight: bold;
    color: var(--text-color);
}
/* --- Two Column Layout --- */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.two-column.reverse {
    direction: rtl;
}
.two-column.reverse > * {
    direction: ltr;
}
/* --- Gallery --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}
.gallery-item {
    overflow: hidden;
}
/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--bg-color);
    overflow: hidden;
}
th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
th {
    background: var(--bg-secondary);
    font-weight: 600;
}
tr:hover {
    background: var(--bg-secondary);
}
/* --- Code Blocks --- */
code {
    background: var(--bg-secondary);
    padding: 2px 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
}
pre {
    background: var(--bg-dark);
    color: #e5e7eb;
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
}
pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}
/* --- Team Section --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}
.team-member {
    text-align: center;
    padding: 20px;
}
.team-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    background: var(--bg-secondary);
    border: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 2.5rem;
}
.team-member h4 {
    margin-bottom: 5px;
}
.team-member .role {
    color: var(--text-light);
    font-size: 0.9rem;
}
/* --- Footer --- */
footer {
    background: var(--bg-dark);
    color: white;
    padding: 60px 0 30px;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-section h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}
.footer-section ul li {
    margin-bottom: 10px;
}
.footer-section a {
    color: #9ca3af;
}
.footer-section a:hover {
    color: white;
}
.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 30px;
    text-align: center;
    color: #9ca3af;
}
/* --- Lightbox --- */
#hardware-gallery .card-image {
    cursor: pointer;
    position: relative;
}

#hardware-gallery .card-image::after {
    content: '🔍';
    position: absolute;
    bottom: 10px;
    right: 10px;
    /* background removed as requested */
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px; /* Increased size slightly since background is gone */
    opacity: 0.8;
    transition: all 0.2s ease;
    z-index: 5;
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Added text-shadow for visibility against light images */
}

#hardware-gallery .card-image:hover::after {
    opacity: 1;
    transform: scale(1.2);
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    user-select: none;
    z-index: 2001;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.3);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-caption {
    margin-top: 15px;
    color: white;
    font-size: 1.1rem;
    text-align: center;
    width: 100%;
    max-width: 800px;
}

.lightbox-counter {
    position: absolute;
    top: 20px;
    left: 30px;
    color: #aaa;
    font-size: 14px;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero .subtitle {
        font-size: 1.1rem;
    }
    nav ul {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-color);
        flex-direction: column;
        gap: 0;
        padding: 20px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
    }
    nav ul.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    nav ul li {
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
    }
    .menu-toggle {
        display: flex;
    }
    .two-column {
        grid-template-columns: 1fr;
    }
    .two-column.reverse {
        direction: ltr;
    }
    .section-header h2 {
        font-size: 2rem;
    }
    section {
        padding: 50px 0;
    }
}
@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .cards-grid,
    .cards-grid-3,
    .cards-grid-4 {
        grid-template-columns: 1fr;
    }
}
