/* =========================================================
   SMAARRDEC TECHNOLOGY PAGE
   Page-specific styles only.
========================================================= */

.technology-hero {
    padding: 30px 20px !important;
}

.technology-page {
    padding-bottom: 40px;
}

/* Toolbar */
.technology-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 175px 175px 120px 130px;
    align-items: center;
    gap: 10px;
    margin-top: -25px;
    margin-bottom: 18px;
    position: sticky;
    top: 75px;
    z-index: 100;
    padding: 10px;
    border-radius: 12px;
    transition: .25s ease;
}

.technology-toolbar.is-sticky {
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 25px rgba(15,23,42,.08);
    border: 1px solid rgba(226,232,240,.8);
}

.technology-search {
    position: relative;
}

.technology-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 13px;
    z-index: 2;
}

.technology-search input,
.technology-filter select {
    width: 100%;
    height: 46px;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: #fff;
    color: #334155;
    outline: none;
}

.technology-search input {
    padding: 0 15px 0 42px;
    font-size: 12px;
}

.technology-filter select {
    padding: 0 14px;
    font-size: 11px;
}

.technology-search input:focus,
.technology-filter select:focus {
    border-color: #01a8b0;
    box-shadow: 0 0 0 3px rgba(1,168,176,.10);
}

.clear-filter,
.my-inquiries-btn {
    height: 46px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: .2s;
}

.clear-filter {
    border: 1px solid #dbe3ec;
    background: #fff;
    color: #425466;
}

.clear-filter:hover {
    border-color: #9fcfd4;
    color: #08788e;
}

.my-inquiries-btn {
    border: 0;
    background: linear-gradient(135deg, #087f72, #0794a0);
    color: #fff;
}

.my-inquiries-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(8,127,114,.18);
}

.my-inquiries-count {
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 20px;
    background: #fff;
    color: #087f72;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 700;
}

.my-inquiries-count:not([hidden]) {
    display: flex;
}

/* Section headings */
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.section-heading h5 {
    margin: 0;
    color: #14366e;
    font-size: 15px;
    font-weight: 700;
}

.section-link,
.technology-result-count {
    color: #08788e;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none !important;
}

/* Technology cards */
.technology-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
}

.technology-card {
    background: #fff;
    border: 1px solid #e1e8ef;
    border-radius: 11px;
    overflow: hidden;
    min-width: 0;
    transition: .2s ease;
    display: flex;
    flex-direction: column;
}

.technology-card:hover {
    border-color: #a7dce0;
    box-shadow: 0 6px 18px rgba(15,23,42,.06);
    transform: translateY(-2px);
}

.technology-image-wrap {
    aspect-ratio: 16 / 10;
    position: relative;
    overflow: hidden;
    background: #e5e7eb;
}

.technology-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .3s;
}

.technology-category {
    position: absolute;
    left: 9px;
    bottom: 8px;
    padding: 3px 8px;
    border-radius: 5px;
    background: rgba(255,255,255,.95);
    color: #247b3b;
    font-size: 8px;
    font-weight: 600;
}

.technology-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 11px;
}

.technology-title {
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
    color: #14366e;
    margin: 0 0 6px;
}

.technology-description {
    font-size: 9.5px;
    line-height: 1.6;
    color: #64748b;
    min-height: 47px;
    margin: 0 0 10px;
}

.technology-footer {
    margin-top: auto;
    padding-top: 9px;
    border-top: 1px solid #e8edf2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
}

.technology-researcher {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.technology-researcher img,
.researcher-placeholder {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
}

.technology-researcher img {
    object-fit: cover;
    background: #e5e7eb;
}

.researcher-placeholder {
    background: #e6f7fb;
    color: #08768b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.technology-researcher-name {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 8px;
    font-weight: 600;
    color: #475569;
}

.technology-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.btn-tech-details,
.btn-tech-inquiry {
    height: 30px;
    border: 1px solid #138ca2;
    border-radius: 5px;
    background: #fff;
    color: #08788e;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
}

.btn-tech-details {
    padding: 0 10px;
    font-size: 8.5px;
    font-weight: 600;
    text-decoration: none !important;
}

.btn-tech-inquiry {
    width: 31px;
    font-size: 10px;
    cursor: pointer;
}

.btn-tech-details:hover {
    background: #f2fbfc;
    color: #08788e;
}

.btn-tech-inquiry:hover {
    background: #087f92;
    color: #fff;
}

.no-technologies {
    grid-column: 1 / -1;
    text-align: center;
    padding: 45px 20px;
    color: #94a3b8;
}

.no-technologies i {
    display: block;
    font-size: 28px;
    margin-bottom: 10px;
}

.no-technologies strong,
.no-technologies span {
    display: block;
}

.no-technologies strong {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 3px;
}

.no-technologies span {
    font-size: 9px;
}

/* Stats */
.technology-stats {
    margin-top: 17px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e1e8ef;
    border-radius: 11px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    border-right: 1px solid #e8edf2;
}

.stat-item:first-child {
    padding-left: 0;
}

.stat-item:last-child {
    border-right: 0;
}

.stat-icon {
    width: 45px;
    height: 45px;
    min-width: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
}

.stat-icon.green { background: #0d7a3d; }
.stat-icon.blue { background: #1475ca; }
.stat-icon.teal { background: #078d91; }
.stat-icon.orange { background: #fb7a16; }

.stat-number {
    font-size: 17px;
    font-weight: 700;
    color: #14366e;
}

.stat-title {
    margin-top: 3px;
    font-size: 9px;
    font-weight: 600;
    color: #08788e;
}

.stat-description {
    margin-top: 2px;
    font-size: 8px;
    color: #94a3b8;
}

/* Updates */
.updates-section {
    margin-top: 17px;
    background: #fff;
    border: 1px solid #e1e8ef;
    border-radius: 11px;
    padding: 15px;
}

.updates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.update-card {
    border: 1px solid #e3e9ef;
    border-radius: 8px;
    min-height: 118px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 60px 105px minmax(0,1fr);
    background: #fff;
}

.update-date {
    border-right: 1px solid #e8edf2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #08788e;
}

.update-day {
    font-size: 21px;
    line-height: 1;
    font-weight: 700;
}

.update-image {
    width: 100%;
    height: 100%;
    min-height: 118px;
    object-fit: cover;
}

.update-content {
    padding: 9px;
    min-width: 0;
}

.update-category {
    display: inline-block;
    margin-bottom: 4px;
    padding: 2px 5px;
    border: 1px solid #b7e3ea;
    border-radius: 4px;
    color: #08768b;
    background: #e6f7fb;
    font-size: 6.5px;
    font-weight: 600;
}

.update-title {
    font-size: 9.5px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 4px;
}

.update-description {
    font-size: 8px;
    line-height: 1.45;
    color: #64748b;
    margin: 0 0 5px;
}

.update-link {
    color: #08788e;
    font-size: 7.5px;
    font-weight: 600;
    text-decoration: none !important;
}

.updates-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 25px;
    color: #94a3b8;
    font-size: 10px;
}

/* Inquiry modal */
.inquiry-modal-content,
.my-inquiries-modal-content {
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 15px 45px rgba(15,23,42,.16);
}

.inquiry-modal-header,
.my-inquiries-modal-header {
    background: #f8fbfb;
    border-bottom: 1px solid #e6ecef;
}

.inquiry-modal-header h5,
.my-inquiries-modal-header h5 {
    color: #14366e;
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 2px;
}

.inquiry-modal-header small,
.my-inquiries-modal-header small {
    color: #64748b;
    font-size: 10px;
}

.inquiry-modal-header strong {
    color: #087f72;
}

#technologyInquiryModal label {
    color: #475569;
    font-size: 11px;
    font-weight: 600;
}

#technologyInquiryModal .form-control {
    min-height: 42px;
    border: 1px solid #dce3e9;
    border-radius: 8px;
    font-size: 12px;
}

#technologyInquiryModal textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

#technologyInquiryModal .form-control:focus {
    border-color: #01a8b0;
    box-shadow: 0 0 0 3px rgba(1,168,176,.08);
}

.inquiry-note {
    padding: 10px 12px;
    border-radius: 8px;
    background: #f2f9f8;
    color: #62717f;
    font-size: 9px;
    line-height: 1.5;
}

.inquiry-submit-btn {
    background: #087f72;
    border-color: #087f72;
    font-size: 11px;
}

/* My inquiries */
.saved-inquiry-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.saved-inquiry-card {
    border: 1px solid #e1e8ef;
    border-radius: 10px;
    padding: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    transition: .2s;
    background: #fff;
}

.saved-inquiry-card:hover {
    border-color: #a7dce0;
    box-shadow: 0 4px 14px rgba(15,23,42,.05);
}

.saved-inquiry-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f7f5;
    color: #087f72;
    font-size: 13px;
}

.saved-inquiry-content {
    min-width: 0;
    flex: 1;
}

.saved-inquiry-reference {
    color: #087f72;
    font-size: 8px;
    font-weight: 700;
    margin-bottom: 3px;
}

.saved-inquiry-title {
    color: #14366e;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saved-inquiry-meta {
    color: #94a3b8;
    font-size: 7.5px;
}

.saved-inquiry-open {
    border: 0;
    background: #087f72;
    color: #fff;
    height: 32px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.saved-inquiry-open:hover {
    color: #fff;
    background: #066f65;
}

.no-saved-inquiries {
    padding: 40px 15px;
    text-align: center;
    color: #94a3b8;
}

.no-saved-inquiries i {
    display: block;
    margin-bottom: 10px;
    font-size: 30px;
    color: #cbd5e1;
}

.no-saved-inquiries strong {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 11px;
}

.no-saved-inquiries span {
    display: block;
    max-width: 340px;
    margin: auto;
    font-size: 8px;
    line-height: 1.5;
}

.my-inquiries-modal-footer {
    justify-content: space-between;
}

.my-inquiries-footer-note {
    color: #94a3b8;
    font-size: 8px;
}

/* Floating */
.scroll-top,
.dark-toggle {
    position: fixed;
    right: 20px;
    width: 45px;
    height: 45px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    z-index: 999;
    cursor: pointer;
}

.scroll-top {
    bottom: 70px;
    background: linear-gradient(135deg, #16a34a, #0ea5e9);
    display: none;
}

.dark-toggle {
    bottom: 20px;
    background: linear-gradient(135deg, #111827, #374151);
}

/* Night mode */
body.night-mode {
    background: #0d1117;
    color: #e5e7eb;
}

body.night-mode .technology-toolbar.is-sticky {
    background: rgba(13,17,23,.94);
    border-color: #263440;
}

body.night-mode .technology-search input,
body.night-mode .technology-filter select,
body.night-mode .clear-filter,
body.night-mode .technology-card,
body.night-mode .technology-stats,
body.night-mode .updates-section,
body.night-mode .update-card,
body.night-mode .saved-inquiry-card {
    background: #18202a;
    border-color: #31404c;
    color: #e5e7eb;
}

body.night-mode .technology-title,
body.night-mode .section-heading h5,
body.night-mode .stat-number,
body.night-mode .saved-inquiry-title {
    color: #58d2d8;
}

body.night-mode .technology-description,
body.night-mode .technology-researcher-name,
body.night-mode .update-title,
body.night-mode .update-description {
    color: #aebbc5;
}

body.night-mode .inquiry-modal-content,
body.night-mode .my-inquiries-modal-content {
    background: #18202a;
    color: #e5e7eb;
}

body.night-mode .inquiry-modal-header,
body.night-mode .my-inquiries-modal-header {
    background: #131a22;
    border-color: #2c3944;
}

body.night-mode .inquiry-modal-header h5,
body.night-mode .my-inquiries-modal-header h5 {
    color: #58d2d8;
}

body.night-mode #technologyInquiryModal label {
    color: #c3ccd5;
}

body.night-mode #technologyInquiryModal .form-control {
    background: #131a22;
    border-color: #31404c;
    color: #e5e7eb;
}

/* Responsive */
@media (max-width: 1200px) {
    .technology-toolbar {
        grid-template-columns: minmax(220px,1fr) 160px 160px 115px 125px;
    }

    .technology-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .updates-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .technology-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .technology-search,
    .my-inquiries-btn {
        grid-column: 1 / -1;
    }

    .technology-stats {
        grid-template-columns: repeat(2,1fr);
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .technology-toolbar {
        grid-template-columns: 1fr;
        position: relative;
        top: auto;
    }

    .technology-search,
    .my-inquiries-btn {
        grid-column: auto;
    }

    .technology-grid,
    .technology-stats {
        grid-template-columns: 1fr;
    }

    .stat-item {
        border-right: 0;
        border-bottom: 1px solid #e8edf2;
        padding: 10px 0;
    }

    .stat-item:last-child {
        border-bottom: 0;
    }

    .saved-inquiry-card {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .saved-inquiry-open {
        width: 100%;
    }

    .update-card {
        grid-template-columns: 52px 90px minmax(0,1fr);
    }
}
