/* ===================================================
   GiziSehat - Healthcare & Nutrition Theme
   Responsive, Modern & Clean UI for PHP 7.x
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #0d9488;
    --primary-hover: #0f766e;
    --primary-light: #ccfbf1;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --dark-color: #0f172a;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-muted: #64748b;
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--light-bg);
    color: #334155;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark-color);
    font-weight: 700;
}

a {
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

/* Navbar */
.navbar-custom {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 0.85rem 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.45rem;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.nav-link {
    font-weight: 600;
    color: #475569 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
    background-color: var(--primary-light);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0d9488 0%, #115e59 100%);
    color: #ffffff;
    padding: 4.5rem 0 3.5rem;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.92;
}

/* Cards & Components */
.card-custom {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-custom:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.07);
}

.card-feature {
    border-radius: 16px;
    border: none;
    background: #ffffff;
    padding: 1.75rem;
    height: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: all 0.25s ease;
}

.card-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(13, 148, 136, 0.12);
}

.feature-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

/* Buttons */
.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.65rem 1.4rem;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
    transition: all 0.2s ease;
}

.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
}

.btn-secondary-custom {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #334155;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.65rem 1.4rem;
}

.btn-secondary-custom:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

/* BMI Visual Meter */
.bmi-meter-wrapper {
    background: #f8fafc;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.bmi-scale-bar {
    height: 20px;
    border-radius: 10px;
    background: linear-gradient(to right, 
        #0dcaf0 0%, #0dcaf0 20%, 
        #198754 20%, #198754 45%, 
        #ffc107 45%, #ffc107 65%, 
        #fd7e14 65%, #fd7e14 85%, 
        #dc3545 85%, #dc3545 100%
    );
    position: relative;
    margin: 25px 0 10px;
}

.bmi-pointer {
    position: absolute;
    top: -12px;
    width: 24px;
    height: 24px;
    background: #0f172a;
    border: 3px solid #ffffff;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bmi-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* BMI Score Big Badge */
.bmi-score-display {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--dark-color);
}

/* Isi Piringku Visual Card */
.piring-visual {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 8px solid #e2e8f0;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1), 0 6px 20px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    background: #fff;
}

.piring-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    width: 100%;
    height: 100%;
}

.piring-sector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px;
    color: #fff;
}

.sector-sayur { background: #16a34a; }
.sector-makanan-pokok { background: #eab308; }
.sector-lauk { background: #dc2626; }
.sector-buah { background: #f97316; }

/* Table Styling */
.table-custom {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.table-custom thead {
    background-color: #f1f5f9;
    color: #334155;
    font-weight: 700;
}

.table-custom th, .table-custom td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background-color: #f8fafc;
}

/* Badges & Tags */
.badge-custom {
    padding: 0.4em 0.8em;
    font-weight: 600;
    border-radius: 6px;
    font-size: 0.8rem;
}

/* Footer */
.footer-custom {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 3.5rem 0 1.5rem;
    margin-top: auto;
}

.footer-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
}

.footer-link {
    color: #94a3b8;
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.footer-link:hover {
    color: var(--secondary-color);
    padding-left: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    .hero-section {
        padding: 3rem 0 2rem;
    }
    .bmi-score-display {
        font-size: 2.75rem;
    }
}
