/* =============================================
   Nopparat Concrete - Custom Styles
   ============================================= */

/* Base font size bump */
html {
    font-size: 18px;
    overflow-x: hidden;
}
body {
    overflow-x: hidden;
}

/* Nav Links — white for dark header */
.nav-link {
    color: #ffffff;
    position: relative;
    transition: color 0.2s;
    padding-bottom: 2px;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #16a34a;
    transition: width 0.25s ease;
}
.nav-link:hover,
.nav-link.active {
    color: #4ade80;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 0.875rem;
    border-radius: 0.5rem;
    color: #d1d5db;
    transition: background 0.15s, color 0.15s;
    font-size: 1rem;
}
.mobile-nav-link:hover {
    background: rgba(22,163,74,0.2);
    color: #4ade80;
}

/* Footer Links */
.footer-link {
    transition: color 0.2s;
}
.footer-link:hover {
    color: #4ade80;
}

/* Hero Gradient Overlay */
.hero-overlay {
    background: rgba(255,255,255,0.30);
}

/* Section Title Underline */
.section-title::after {
    content: '';
    display: block;
    width: 3rem;
    height: 3px;
    background: #16a34a;
    margin-top: 0.75rem;
}
.section-title.center::after {
    margin-left: auto;
    margin-right: auto;
}

/* Product Card Hover */
.product-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}
.product-card img {
    transition: transform 0.4s ease;
}
.product-card:hover img {
    transform: scale(1.05);
}

/* News Card */
.news-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.1);
}

/* Stat Counter */
.stat-item {
    position: relative;
}
.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255,255,255,0.2);
}

/* Category Badge */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    background: #e8f5e9;
    color: #16a34a;
    border: 1px solid #c8e6c9;
}

/* Inquiry Form */
.form-label {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    color: #374151;
    font-family: 'IBM Plex Sans Thai', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}
.form-input:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22,163,74,0.15);
}

/* Scrollbar */
::-webkit-scrollbar        { width: 6px; }
::-webkit-scrollbar-track  { background: #f1f5f9; }
::-webkit-scrollbar-thumb  { background: #16a34a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #15803d; }

/* Admin FAB button */
.admin-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 14px;
    text-decoration: none;
    opacity: 0.45;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: opacity 0.2s, background 0.2s, color 0.2s;
}
.admin-fab:hover {
    opacity: 1;
    background: #9ca3af;
    color: #ffffff;
}

/* Back to top visibility */
#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

/* Animate on scroll */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Admin specific */
.admin-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    color: #d1d5db;
    transition: background 0.15s, color 0.15s;
}
.admin-sidebar-link:hover,
.admin-sidebar-link.active {
    background: rgba(22,163,74,0.4);
    color: #ffffff;
}

/* Table responsive */
.table-responsive { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}
.data-table th {
    padding: 0.875rem 1rem;
    background: #f9fafb;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}
.data-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: middle;
}
.data-table tbody tr:hover td {
    background: #f9fafb;
}

/* Status badges */
.badge-active     { background:#dcfce7; color:#15803d; }
.badge-inactive   { background:#f3f4f6; color:#6b7280; }
.badge-new        { background:#dbeafe; color:#1d4ed8; }
.badge-contacted  { background:#fef3c7; color:#b45309; }
.badge-closed     { background:#f3f4f6; color:#6b7280; }
.badge-published  { background:#dcfce7; color:#15803d; }
.badge-draft      { background:#fef3c7; color:#b45309; }

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* =============================================
   World-Class Feature Styles
   ============================================= */

/* Star Rating */
.star-filled { color: #f59e0b; }
.star-empty  { color: #d1d5db; }

/* Project Card */
.project-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.14);
}
.project-card .overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 60%);
    transition: opacity 0.3s ease;
}

/* Testimonial Card */
.testimonial-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(0,0,0,0.1);
}

/* Calculator */
.calc-result {
    background: #f7fdf9;
    border-left: 3px solid #004d40;
    border-radius: 0 0.625rem 0.625rem 0;
    padding: 0.875rem 1rem;
}
.calc-tab {
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.7rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    color: #6b7280;
    background: #f3f4f6;
    white-space: nowrap;
    flex-shrink: 0;
    border: none;
}
.calc-tab.active {
    background: #004d40;
    color: #ffffff;
}
.calc-label {
    display: block;
    font-size: 0.69rem;
    font-weight: 500;
    color: #9ca3af;
    margin-bottom: 0.3rem;
}
.calc-input {
    width: 100%;
    padding: 0.45rem 0.625rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    color: #374151;
    font-family: 'IBM Plex Sans Thai', sans-serif;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #f9fafb;
}
.calc-input:focus {
    outline: none;
    border-color: #004d40;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(0,77,64,0.1);
}

/* Process stepper */
.process-step { position: relative; }

.steps-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.steps-row .step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .steps-row {
        flex-direction: row;
        align-items: flex-start;
    }
    .steps-row .step-item {
        flex: 1;
        margin-bottom: 0;
    }
}

.process-connector { display: none; }
.process-connector-v { display: flex; align-items: center; justify-content: center; height: 32px; margin-bottom: 1rem; }
@media (min-width: 768px) {
    .process-connector {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 40px;
        padding-top: 1.75rem;
    }
    .process-connector-v { display: none; }
}

/* Certification badge */
.cert-badge {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cert-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.1);
}

/* FAQ accordion transition */
.faq-body {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
}
.faq-body.open {
    max-height: 600px;
    opacity: 1;
}
