/* ========================================
   NobilisGroup — Main Stylesheet
   Bootstrap 5.3 + CodeIgniter 4
   ======================================== */

/* ---- CSS Variables ---- */
:root {
    --primary:      #1a3a5c;
    --primary-dark: #0f2640;
    --accent:       #c9a96e;
    --accent-light: #e8d5b0;
    --info-alt:     #0ea5e9;
    --text-dark:    #1e293b;
    --text-muted:   #64748b;
    --bg-light:     #f8f9fb;
    --radius:       0.75rem;
    --shadow:       0 4px 24px rgba(0,0,0,0.08);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.15);
    --transition:   all 0.3s ease;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background: #fff;
    font-size: 16px;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--text-dark);
}

a { text-decoration: none; color: inherit; }
a:hover { color: var(--primary); }

img { max-width: 100%; height: auto; }

/* ---- Utilities ---- */
.py-6 { padding-top: 5rem !important; padding-bottom: 5rem !important; }
.ls-2 { letter-spacing: 0.1em; }
.z-1 { z-index: 1; }
.text-gradient {
    background: linear-gradient(135deg, var(--accent), #fff8e7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Bootstrap Overrides ---- */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.btn { transition: var(--transition); }
.form-control, .form-select { border-color: #e2e8f0; }
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(26,58,92,0.12);
}

/* ---- Top Bar ---- */
.topbar {
    background: var(--bg-light);
    border-bottom: 1px solid #e9ecef;
    font-size: 0.85rem;
}
.topbar a { color: #6c757d; transition: var(--transition); }
.topbar a:hover { color: var(--primary); }

/* ---- Navbar ---- */
#mainNav {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 0.75rem 0;
    transition: var(--transition);
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
#mainNav.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.brand-icon { color: var(--accent); font-size: 1.5rem; }
.brand-text { font-family: 'Playfair Display', serif; font-size: 1.35rem; font-weight: 600; color: var(--primary); }
.brand-accent { color: var(--accent); }

.navbar-nav .nav-link {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem !important;
    border-radius: 0.5rem;
    transition: var(--transition);
}
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
    color: var(--primary);
    background: rgba(26,58,92,0.07);
}
.dropdown-menu {
    border-radius: var(--radius);
    padding: 0.5rem;
}
.dropdown-item {
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    transition: var(--transition);
}
.dropdown-item:hover { background: var(--bg-light); color: var(--primary); }

/* ---- Section Helpers ---- */
.section-tag {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    font-family: 'Inter', sans-serif;
}
.section-title { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; }
.section-subtitle { color: var(--text-muted); font-size: 1.05rem; max-width: 580px; margin: 0 auto; }

/* ---- Hero ---- */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(160deg, var(--primary-dark) 0%, #0d2137 40%, #1a3a5c 70%, #2d5986 100%);
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(201,169,110,0.25) 0%, transparent 70%),
        radial-gradient(ellipse 60% 60% at 80% 80%, rgba(14,165,233,0.1) 0%, transparent 60%);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,20,35,0.35);
}
.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.hero-subtitle { font-size: clamp(1rem, 2vw, 1.2rem); color: rgba(255,255,255,0.8); }
.hero-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}
.hero-scroll-hint a { color: rgba(255,255,255,0.5); font-size: 1.5rem; }
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ---- Stats ---- */
.stat-card { border-radius: var(--radius); transition: var(--transition); }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-number { font-family: 'Playfair Display', serif; font-size: 2.5rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

/* ---- Product Feature Cards ---- */
.product-feature-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.product-feature-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-6px); }
.product-feature-img {
    height: 200px;
}
.agarwood-bg {
    background: linear-gradient(135deg, #3d1c02 0%, #7b4f2e 50%, #c9a96e 100%);
    background-image: url('../img/agar04.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}
.gfrp-bg {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 60%, #0ea5e9 100%);
    background-image: url('../img/gfrp05.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}
.product-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--accent), #f5e6c8);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: #3d1c02;
}
.product-icon.gfrp-icon {
    background: linear-gradient(135deg, #0ea5e9, #bfdbfe);
    color: #1e3a5f;
}

/* ---- Why Cards ---- */
.why-icon {
    width: 44px; height: 44px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--info-alt));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: #fff;
}
.why-card {
    background: #fff;
    border: 1px solid #e9ecef;
    transition: var(--transition);
}
.why-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.why-card-1 { background: linear-gradient(135deg, #fffbeb, #fef3c7); }
.why-card-2 { background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.why-card-3 { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.why-card-4 { background: linear-gradient(135deg, #f0f9ff, #bae6fd); }

/* ---- Testimonials ---- */
.testimonials-section { background: var(--bg-light); }
.testimonial-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #f1f5f9;
    transition: var(--transition);
}
.testimonial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.testimonial-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #8b5e3c);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 600; color: #fff; flex-shrink: 0;
}
.testimonial-avatar.teal { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.testimonial-avatar.green { background: linear-gradient(135deg, #10b981, #065f46); }

/* ---- CTA Section ---- */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #1e5799 100%);
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(ellipse 80% 60% at 50% 110%, rgba(201,169,110,0.2) 0%, transparent 70%);
    pointer-events: none;
}

/* ---- Page Header ---- */
.page-header {
    position: relative;
    padding: 100px 0 60px;
    background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 60%, #1e5799 100%);
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 30% 50%, rgba(201,169,110,0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 20%, rgba(14,165,233,0.1) 0%, transparent 40%);
}
.page-header-overlay { position: absolute; inset: 0; background: rgba(10,20,35,0.3); }
.agarwood-header { background: linear-gradient(160deg, #1a0800 0%, #3d1c02 50%, #7b4f2e 100%); }
.gfrp-header { background: linear-gradient(160deg, #0c1445 0%, #1e3a5f 50%, #2563eb 100%); }

.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.4); }

/* ---- About Page ---- */
.about-img-grid { position: relative; height: 400px; }
.about-img-main {
    position: absolute; top: 0; left: 0;
    width: 75%; height: 75%;
    background: linear-gradient(135deg, #3d1c02, #7b4f2e);
}
.about-img-accent {
    position: absolute; bottom: 0; right: 0;
    width: 55%; height: 55%;
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    border: 4px solid #fff;
}
.about-badge {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-hover);
    z-index: 2;
}
.agarwood-bg-about { 
    background: linear-gradient(135deg, #3d1c02, #c9a96e); 
    background-image: url('../img/agar01.jpg');
}
.gfrp-bg-about { 
    background: linear-gradient(135deg, #1e3a5f, #0ea5e9); 
    background-image: url('../img/gfrp02.jpg');
}

/* ---- MVV Cards ---- */
.mvv-card {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: var(--radius);
    transition: var(--transition);
}
.mvv-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.mvv-card.featured {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-color: var(--primary);
    color: #fff;
}
.mvv-card.featured h4, .mvv-card.featured p { color: rgba(255,255,255,0.9); }
.mvv-icon {
    font-size: 2.5rem;
}
.mvv-card.featured .mvv-icon { color: var(--accent); }
.mvv-icon { color: var(--primary); }

/* ---- Team ---- */
.team-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid #e9ecef;
    transition: var(--transition);
}
.team-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.team-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.1rem; color: #fff;
}

/* ---- Cert Badges ---- */
.cert-badge { background: #fff; border: 1px solid #e9ecef; border-radius: var(--radius); transition: var(--transition); }
.cert-badge:hover { border-color: var(--accent); }

/* ---- Product Cards ---- */
.product-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: var(--transition);
}
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-6px); }
.product-card-img { 
    height: 140px;   
}
.product-card .agarwood-card1 { background: url('../img/agar01.jpg') center/cover; }
.product-card .agarwood-card2 { background: url('../img/agar02.jpg') center/cover; }
.product-card .agarwood-card3 { background: url('../img/agar03.jpg') center/cover; }
.product-card .agarwood-card4 { background: url('../img/agar04.jpg') center/cover; }
.product-card .agarwood-card5 { background: url('../img/agar05.jpg') center/cover; }
.product-card .agarwood-card6 { background: url('../img/agar06.jpg') center/cover; }
.product-card .gfrp-card1 { background: url('../img/gfrp01.jpg') center/cover; }
.product-card .gfrp-card2 { background: url('../img/gfrp02.jpg') center/cover; }
.product-card .gfrp-card3 { background: url('../img/gfrp03.jpg') center/cover; }
.product-card .gfrp-card4 { background: url('../img/gfrp04.jpg') center/cover; }
.product-card .gfrp-card5 { background: url('../img/gfrp05.jpg') center/cover; }
.product-card .gfrp-card6 { background: url('../img/gfrp06.jpg') center/cover; }

.product-spec-item {
    background: #f8f9fb;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    border: 1px solid #e9ecef;
}

/* ---- Product Showcase ---- */
.product-showcase-img { height: 420px; }
.agarwood-showcase { 
    background: linear-gradient(160deg, #1a0800, #3d1c02, #7b4f2e, #c9a96e); 
    background-image: url('../img/agar01.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}
.gfrp-showcase { 
    background: linear-gradient(160deg, #0c1445, #1e3a5f, #2563eb, #0ea5e9); 
    background-image: url('../img/gfrp07.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

/* ---- Product Detail ---- */
.product-detail-img { height: 380px; }
.agarwood-detail { 
    background: linear-gradient(160deg, #1a0800 0%, #3d1c02 30%, #7b4f2e 70%, #c9a96e 100%); 
    background-image: url('../img/agar06.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}
.gfrp-detail { 
    background: linear-gradient(160deg, #0c1445 0%, #1e3a5f 30%, #2563eb 70%, #0ea5e9 100%); 
    background-image: url('../img/gfrp02.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

/* ---- Process Steps ---- */
.process-step { position: relative; padding-top: 2rem; }
.process-number {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    font-size: 3.5rem; font-weight: 800;
    font-family: 'Playfair Display', serif;
    color: rgba(26,58,92,0.08);
    line-height: 1;
}

/* ---- Advantage Cards ---- */
.advantage-card { background: #fff; border: 1px solid #e9ecef; transition: var(--transition); }
.advantage-card:hover { border-color: var(--info-alt); box-shadow: var(--shadow); }

/* ---- Application Items ---- */
.application-item { background: #fff; border: 1px solid #e9ecef; transition: var(--transition); }
.application-item:hover { border-color: var(--info-alt); background: #f0f9ff; transform: translateY(-3px); }

/* ---- Feature Pills ---- */
.feature-pill { transition: var(--transition); }
.feature-pill:hover { background: #e0f2fe !important; }

/* ---- Market Badges ---- */
.market-badge {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: var(--radius);
    padding: 1rem 0.5rem;
    transition: var(--transition);
}
.market-badge:hover { border-color: var(--accent); box-shadow: var(--shadow); }

/* ---- Contact ---- */
.contact-info-icon {
    width: 44px; height: 44px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--info-alt));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: #fff;
}
.map-placeholder {
    height: 220px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border: 2px dashed #cbd5e1;
}

/* ---- Gallery ---- */
.gallery-filter .nav-link {
    background: #fff;
    border: 1px solid #e9ecef;
    color: var(--text-dark);
    transition: var(--transition);
}
.gallery-filter .nav-link:hover, .gallery-filter .nav-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.gallery-card {
    height: 200px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}
.gallery-card:hover { transform: scale(1.03); box-shadow: var(--shadow-hover); }
.gallery-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    opacity: 0; transition: var(--transition);
    border-radius: inherit;
}
.gallery-card:hover .gallery-overlay { opacity: 1; }
.gallery-badge {
    position: absolute; top: 0.75rem; left: 0.75rem;
    font-size: 0.7rem;
}
.gallery-item.hidden { display: none; }

/* ---- Footer ---- */
.footer {
    background: #0d1b2a;
}
.footer-link {
    color: #94a3b8;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-block;
}
.footer-link:hover { color: var(--accent); transform: translateX(4px); }

/* ---- Blog ---- */
.blog-card-link { text-decoration: none; color: inherit; }
.blog-card { transition: var(--transition); }
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover) !important; }
.blog-card-img { height: 200px; }
.blog-content { line-height: 1.9; color: var(--text-dark); }
.blog-content h1,.blog-content h2,.blog-content h3 { font-family: 'Playfair Display',serif; margin-top: 2rem; }
.blog-content p { margin-bottom: 1.25rem; }
.blog-content img { max-width: 100%; border-radius: var(--radius); margin: 1rem 0; }
.blog-content a { color: var(--primary); text-decoration: underline; }
.blog-content blockquote {
    border-left: 4px solid var(--accent); padding: 1rem 1.25rem;
    background: #fffbeb; border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.5rem 0; font-style: italic; color: #5c4813;
}
.blog-content pre { background: #1e293b; color: #e2e8f0; padding: 1.25rem; border-radius: var(--radius); overflow-x: auto; }

/* ---- Home Blog Section ---- */
.home-blog-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}
.home-blog-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); color: inherit; }
.home-blog-img { height: 160px; background: linear-gradient(135deg,#1a3a5c,#2563eb); background-size: cover; background-position: center; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero-section { min-height: 100svh; }
    .about-img-grid { height: 280px; }
    .product-showcase-img { height: 280px; }
    .product-detail-img { height: 240px; }
    .py-6 { padding-top: 3.5rem !important; padding-bottom: 3.5rem !important; }
}

@media (max-width: 576px) {
    .hero-title { font-size: 2rem; }
    .gallery-card { height: 150px; }
}
