﻿

.form-group {
    margin-bottom: 15px;
}

.member-categoryGroup {
    margin-bottom: 0px;
}

.form-row {
    display: grid;
    grid-template-columns: 0.8fr 0.7fr 1.5fr;
    gap: 10px;
}

.form-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 10px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: #34495e;
    font-weight: 500;
    font-size: 0.9rem;
}

input[type="number"],
input[type="text"],
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e8f4f8;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    /* background: #fafafa; */
    background: #fcfcfc;
}

    input[type="number"]:focus,
    input[type="text"]:focus,
    select:focus {
        outline: none;
        border-color: #3498db;
        background: white;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    }

.form-group input,
.form-group select {
    height: 50px !important;
    box-sizing: border-box !important;
}

/* Beam Calculator Specific Styles */
.beam-calculator-wrapper {
    background-color: var(--background2, #f4f4f4);
    min-height: 100vh;
    padding: 40px 0;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary2, #0077cc) 0%, #005aa3 100%);
    color: white;
    padding: 60px 40px;
    border-radius: 20px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

    .page-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: repeating-linear-gradient(45deg, transparent, transparent 50px, rgba(255,255,255,0.05) 50px, rgba(255,255,255,0.05) 100px);
        animation: slidePattern 20s linear infinite;
    }

@keyframes slidePattern {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(100px);
    }
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 30px;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.badge-icon {
    font-size: 1.1rem;
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin: 0 0 16px 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.page-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.header-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.feature-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

    .feature-pill:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
    }

.pill-icon {
    font-size: 1.1rem;
}

/* Description Section */
.description-section {
    margin-bottom: 40px;
}

.description-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.description-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow2, 0 4px 20px rgba(0, 0, 0, 0.1));
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 119, 204, 0.1);
}

    .description-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    }

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.description-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text2, #1a1a1a);
    margin-bottom: 16px;
}

.description-card p {
    color: var(--secondary2, #656c7c);
    line-height: 1.6;
    margin: 0;
}

/* Calculator Interface */
.calculator-interface {
    display: grid;
    gap: 24px;
    margin-bottom: 40px;
}

.interface-panel {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow2, 0 4px 20px rgba(0, 0, 0, 0.1));
    overflow: hidden;
    border: 1px solid rgba(0, 119, 204, 0.1);
}

.panel-header {
    background: linear-gradient(135deg, var(--surface, #f8fafc) 0%, #e2e8f0 100%);
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 119, 204, 0.1);
}

.panel-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text2, #1a1a1a);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-icon {
    font-size: 1.2rem;
}

.panel-content {
    padding: 24px;
}

/* Input Styling */
.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.project-grid {
    grid-template-columns: 1fr 1fr 1fr;
}

.input-group-custom {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .input-group-custom.full-width {
        grid-column: 1 / -1;
    }

.input-label {
    font-weight: 600;
    color: var(--text2, #1a1a1a);
    font-size: 0.9rem;
}

.form-input, .form-select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--text2, #1a1a1a);
}

    .form-input:focus, .form-select:focus {
        outline: none;
        border-color: var(--primary2, #0077cc);
        box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.1);
    }

.input-with-unit {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
}

    .input-with-unit:focus-within {
        border-color: var(--primary2, #0077cc);
        box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.1);
    }

    .input-with-unit .form-input {
        border: none;
        flex: 1;
        padding: 12px 16px;
    }

        .input-with-unit .form-input:focus {
            box-shadow: none;
        }

.input-unit {
    padding: 12px 16px;
    background: var(--surface, #f8fafc);
    color: var(--secondary2, #656c7c);
    font-weight: 600;
    font-size: 0.9rem;
    border-left: 1px solid #e2e8f0;
    white-space: nowrap;
}

/* Calculated Properties */
.calculated-properties {
    margin-top: 24px;
    padding: 20px;
    background: var(--surface, #f8fafc);
    border-radius: 12px;
    border: 1px solid rgba(0, 119, 204, 0.1);
}

.property-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

    .property-display:last-child {
        margin-bottom: 0;
    }

.property-label {
    font-weight: 600;
    color: var(--text2, #1a1a1a);
}

.property-value {
    font-weight: 700;
    color: var(--primary2, #0077cc);
    font-family: 'Monaco', 'Menlo', monospace;
}

/* Visualization */
.visualization-container {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface, #f8fafc);
    border-radius: 12px;
    border: 2px dashed rgba(0, 119, 204, 0.2);
}


.plot-container {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface, #f8fafc);
    border-radius: 12px;
    max-width: 1200px;
    /* 🔹 Add these: */
    margin: 20px auto; /* centers container horizontally */
    width: 100%; /* allows shrinking within parent */
}

.beam-viz {
    width: 100%;
    height: 300px;
    max-width: 1200px;
}

/* Action Buttons */
.actions-panel .panel-content {
    padding: 32px 24px;
}

.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-icon {
    font-size: 1.1rem;
}

.primary-action {
    background: var(--primary2, #0077cc);
    color: white;
}

    .primary-action:hover {
        background: #005aa3;
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 119, 204, 0.3);
    }

.secondary-action {
    background: var(--surface, #f8fafc);
    color: var(--text2, #1a1a1a);
    border: 2px solid #e2e8f0;
}

    .secondary-action:hover {
        background: #e2e8f0;
        transform: translateY(-2px);
    }

.analyze-btn {
    background: linear-gradient(135deg, var(--success, #10b981) 0%, #059669 100%);
    color: white;
}

    .analyze-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    }

.export-btn {
    background: linear-gradient(135deg, var(--accent2, #ea4c89) 0%, #db2777 100%);
    color: white;
}

    .export-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(234, 76, 137, 0.3);
    }

/* Custom Offcanvas Styling */
.custom-offcanvas {
    width: 400px;
    background: white;
    border-right: 1px solid rgba(0, 119, 204, 0.1);
}

    .custom-offcanvas .offcanvas-header {
        background: linear-gradient(135deg, var(--primary2, #0077cc) 0%, #005aa3 100%);
        color: white;
        padding: 24px;
        border-bottom: none;
    }

    .custom-offcanvas .offcanvas-title {
        font-size: 1.3rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0;
    }

.offcanvas-icon {
    font-size: 1.2rem;
}

.custom-offcanvas .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

    .custom-offcanvas .btn-close:hover {
        opacity: 1;
    }

.offcanvas-content {
    padding: 24px;
}

/* Navigation Section */
.navigation-section {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--surface, #f8fafc);
    border-radius: 12px;
    text-align: center;
}

.current-item {
    font-weight: 600;
    color: var(--text2, #1a1a1a);
    margin-bottom: 12px;
}

.navigation-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.nav-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text2, #1a1a1a);
}

    .nav-btn:hover {
        border-color: var(--primary2, #0077cc);
        background: var(--primary2, #0077cc);
        color: white;
        transform: scale(1.05);
    }

/* Input Section in Offcanvas */
.input-section {
    margin-bottom: 24px;
}

/* Support Types Grid */
.support-types {
    margin-bottom: 24px;
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.support-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .support-btn:hover {
        border-color: var(--primary2, #0077cc);
        background: rgba(0, 119, 204, 0.05);
    }

    .support-btn.active {
        border-color: var(--primary2, #0077cc);
        background: var(--primary2, #0077cc);
        color: white;
    }

.support-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.support-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

/* Direction Buttons */
.direction-buttons {
    margin-bottom: 24px;
}

.direction-grid {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.direction-btn {
    width: 60px;
    height: 60px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .direction-btn:hover {
        border-color: var(--primary2, #0077cc);
        background: rgba(0, 119, 204, 0.05);
    }

    .direction-btn.active {
        border-color: var(--primary2, #0077cc);
        background: var(--primary2, #0077cc);
    }

.direction-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

/* Spring Inputs */
.spring-inputs {
    margin-bottom: 24px;
}

.hidden-input {
    display: none;
}

/* Warning Section */
.warning-section {
    margin-bottom: 24px;
    text-align: center;
}

.warning-text {
    color: #dc2626;
    font-weight: 500;
}

/* Offcanvas Action Buttons */
.action-buttons-offcanvas {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.offcanvas-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .offcanvas-btn.primary {
        background: var(--primary2, #0077cc);
        color: white;
    }

        .offcanvas-btn.primary:hover {
            background: #005aa3;
            transform: translateY(-2px);
        }

    .offcanvas-btn.secondary {
        background: #10b981;
        color: white;
        /*     color: var(--text2, #1a1a1a);
       border: 2px solid #e2e8f0;*/
    }

        .offcanvas-btn.secondary:hover {
            background: #059669;
        }

    .offcanvas-btn.danger {
        background: #dc2626;
        color: white;
    }

        .offcanvas-btn.danger:hover {
            background: #b91c1c;
            transform: translateY(-2px);
        }

/* Information Section */
.info-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow2, 0 4px 20px rgba(0, 0, 0, 0.1));
    border: 1px solid rgba(0, 119, 204, 0.1);
}

.info-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text2, #1a1a1a);
    margin-bottom: 32px;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.info-block h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary2, #0077cc);
    margin-bottom: 16px;
}

.info-block p {
    color: var(--text2, #1a1a1a);
    line-height: 1.6;
    margin-bottom: 16px;
}

.feature-list {
    list-style: none;
    padding: 0;
}

    .feature-list li {
        padding: 8px 0;
        padding-left: 24px;
        position: relative;
        color: var(--text2, #1a1a1a);
        line-height: 1.5;
    }

        .feature-list li::before {
            content: '✓';
            position: absolute;
            left: 0;
            color: var(--success, #10b981);
            font-weight: bold;
        }

.powered-by {
    text-align: center;
    padding: 24px;
    background: var(--surface, #f8fafc);
    border-radius: 12px;
    border: 1px solid rgba(0, 119, 204, 0.1);
}

.external-link {
    color: var(--primary2, #0077cc);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .external-link:hover {
        text-decoration: underline;
        color: #005aa3;
    }

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .beam-calculator-wrapper {
        padding: 20px 0;
    }

    .page-header {
        padding: 40px 24px;
        margin-bottom: 24px;
    }

    .header-features {
        flex-direction: column;
        align-items: center;
    }

    .description-grid {
        grid-template-columns: 1fr;
    }

    .input-grid {
        grid-template-columns: 1fr;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
        max-width: 300px;
        margin: 0 auto;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .custom-offcanvas {
        width: 90vw;
    }

    .support-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 32px 20px;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1.1rem;
    }

    .panel-content {
        padding: 20px;
    }

    .info-section {
        padding: 24px;
    }

    .support-grid {
        grid-template-columns: 1fr;
    }
}

/* Button Active States */
.btn-toggle.active,
.btn-toggle-pointload.active,
.btn-toggle-distributedload.active {
    background-color: var(--primary2, #0077cc) !important;
    color: white !important;
    border-color: var(--primary2, #0077cc) !important;
}




/* ========================================
   RECENT PROJECTS SECTION
   ======================================== */

.recent-projects-section {
    margin: 2rem 0;
    min-height: 200px;
}

.projects-loading {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.recent-projects-grid {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.projects-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.view-all-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

    .view-all-btn:hover {
        background: #0052a3;
        transform: translateY(-1px);
    }

    .view-all-btn svg {
        transition: transform 0.3s;
    }

    .view-all-btn.expanded svg {
        transform: rotate(180deg);
    }

/* Projects Grid Container */
.projects-grid-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    max-height: 400px; /* Show 2 rows initially */
    overflow: hidden;
    transition: max-height 0.4s ease;
}

    .projects-grid-container.expanded {
        max-height: none;
        overflow-y: auto;
        padding-right: 0.5rem;
    }

        /* Custom scrollbar */
        .projects-grid-container.expanded::-webkit-scrollbar {
            width: 8px;
        }

        .projects-grid-container.expanded::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }

        .projects-grid-container.expanded::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 10px;
        }

            .projects-grid-container.expanded::-webkit-scrollbar-thumb:hover {
                background: #555;
            }

/* Project Card */
.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
}

    .project-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
        border-color: #0066cc;
    }

.project-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .project-thumbnail.has-diagram {
        background: #f8f9fa;
    }

    .project-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 10px;
    }

.project-icon {
    font-size: 3rem;
    opacity: 0.8;
}

.project-card-body {
    padding: 1rem;
}

.project-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-card-date {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .project-card-date svg {
        width: 14px;
        height: 14px;
        opacity: 0.7;
    }

/* No Projects State - Features Grid */
.no-projects-state {
    animation: fadeIn 0.3s ease;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    padding: 2rem 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s;
    border: 1px solid #e9ecef;
}

    .feature-card:hover {
        background: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

.feature-card p {
    font-size: 0.95rem;
    color: #495057;
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   PROJECT ACTIONS BAR
   ======================================== */

.project-actions-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
}

.project-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

    .project-action-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

    .project-action-btn svg {
        flex-shrink: 0;
    }

/* Save Button */
.save-btn {
    background: #28a745;
    color: white;
}

    .save-btn:hover {
        background: #218838;
    }

/* Save As Button */
.saveas-btn {
    background: #17a2b8;
    color: white;
}

    .saveas-btn:hover {
        background: #138496;
    }

/* Load Button */
.load-btn {
    background: #007bff;
    color: white;
}

    .load-btn:hover {
        background: #0056b3;
    }

/* Delete Button */
.delete-btn {
    background: #dc3545;
    color: white;
}

    .delete-btn:hover {
        background: #c82333;
    }

/* Project Status */
.project-status {
    margin-left: auto;
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .projects-grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .projects-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .projects-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-actions-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .project-action-btn {
        justify-content: center;
    }

    .project-status {
        margin-left: 0;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .projects-grid-container {
        grid-template-columns: 1fr;
    }

    .projects-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .view-all-btn {
        justify-content: center;
    }
}

/* Enhanced thumbnail styles */
.project-thumbnail {
    position: relative;
}

    .project-thumbnail img {
        transition: opacity 0.3s ease;
    }

.thumbnail-loading {
    z-index: 1;
}

.project-thumbnail .thumbnail-image {
    z-index: 2;
}

.project-thumbnail .project-icon {
    z-index: 3;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    align-items: center;
    justify-content: center;
}


/* ========================================
   RECENT PROJECTS SECTION WITH PAGINATION
   ======================================== */

.recent-projects-section {
    margin: 2rem 0;
    min-height: 200px;
}

.projects-loading {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.recent-projects-grid {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.projects-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

/* Projects Grid - Fixed 2 rows, 6 columns */
.projects-grid-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Project Card */
.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
}

    .project-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
        border-color: #0066cc;
    }

.project-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .project-thumbnail.has-diagram {
        background: #f8f9fa;
    }

    .project-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.project-icon {
    font-size: 3rem;
    opacity: 0.8;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card-body {
    padding: 1rem;
}

.project-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-card-date {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .project-card-date svg {
        width: 14px;
        height: 14px;
        opacity: 0.7;
    }

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    color: #495057;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

    .pagination-btn:hover:not(:disabled) {
        background: #0066cc;
        color: white;
        border-color: #0066cc;
        transform: translateY(-2px);
    }

    .pagination-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-number {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background: white;
    color: #495057;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

    .pagination-number:hover {
        background: #e9ecef;
        border-color: #adb5bd;
    }

    .pagination-number.active {
        background: #0066cc;
        color: white;
        border-color: #0066cc;
    }

.pagination-ellipsis {
    padding: 0 0.5rem;
    color: #6c757d;
}

/* No Projects State */
.no-projects-state {
    animation: fadeIn 0.3s ease;
}

.description-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.description-card {
    padding: 2rem 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s;
    border: 1px solid #e9ecef;
}

    .description-card:hover {
        background: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .description-card h3 {
        font-size: 1.1rem;
        font-weight: 600;
        color: #1a1a1a;
        margin-bottom: 0.75rem;
    }

    .description-card p {
        font-size: 0.95rem;
        color: #495057;
        line-height: 1.6;
        margin: 0;
    }

/* Responsive Design */
@media (max-width: 1400px) {
    .projects-grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .projects-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .projects-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .pagination-controls {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .projects-grid-container {
        grid-template-columns: 1fr;
    }
}

/* Project Card Footer */
.project-card-footer {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.project-delete-btn {
    padding: 0.4rem 0.8rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #dc3545;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .project-delete-btn:hover {
        background: #dc3545;
        color: white;
        border-color: #dc3545;
        transform: translateY(-1px);
    }

    .project-delete-btn:active {
        transform: translateY(0);
    }