/* ==========================================================================
   IBU HAMIL - TRIMESTER LAYOUT 
   ========================================================================== */

.trimester-badge-inline {
    display: none !important;
}

.ih-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 100px; /* Space for the pill navbar */
    font-family: 'Inter', sans-serif;
}

/* Breadcrumb */
.ih-breadcrumb {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ih-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}
.ih-breadcrumb a:hover {
    color: #127142;
}
.ih-breadcrumb span.active {
    color: #127142;
    font-weight: 500;
}

/* Hero Section */
.ih-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 50px;
}

.ih-hero-content {
    flex: 1;
}

.ih-hero-title {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 15px;
    line-height: 1.2;
    font-family: 'Poppins', sans-serif;
}

.ih-hero-desc {
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Alert Box */
.ih-alert {
    background-color: #f4fdf4;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
.ih-alert-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}
.ih-alert-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.ih-alert-text h4 {
    color: #2e7d32;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 5px 0;
}
.ih-alert-text p {
    color: #2e7d32;
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
    opacity: 0.9;
}

/* Hero Image */
.ih-hero-image {
    flex: 0 0 45%;
    max-width: 500px;
}
.ih-hero-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Table Section */
.ih-table-wrapper {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 50px;
    border: 1px solid #e2e8f0;
    scroll-margin-top: 100px;
}

.ih-table {
    width: 100%;
    border-collapse: collapse;
}

.ih-table th {
    background-color: #127142; /* Grass green to match screenshot */
    color: #fff;
    padding: 20px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.ih-table td {
    padding: 20px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 14px;
    vertical-align: middle;
}

.ih-table tr:last-child td {
    border-bottom: none;
}

.ih-table tr:hover td {
    background-color: #fcfcfc;
}

.ih-col-no { width: 6%; text-align: center; font-weight: 600; }
.ih-col-nama { font-weight: 500; color: #0f172a; }
.ih-table th.ih-col-nama { padding-left: 20px; }
.ih-col-desc { width: 45%; color: #475569; }
.ih-col-aksi { width: 170px; text-align: center; }

/* Image Thumbnail in Table */
.ih-recipe-thumb {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    
    
}

/* Light Filled Button (No Border, Light Green BG) */
.ih-btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background-color: #eaf5eb; /* very light green */
    color: #4caf50; /* text green */
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.ih-btn-light:hover {
    background-color: #dcedde;
}

/* Pagination Footer */
.ih-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.ih-footer-text {
    font-size: 13px;
    color: #64748b;
}

.ih-pagination {
    display: flex;
    gap: 5px;
}

.ih-page-btn {
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.ih-page-btn:hover {
    background: #f1f5f9;
}

.ih-page-btn.active {
    background: #5ba84a;
    color: #fff;
    border-color: #127142;
}

/* Responsive */
@media (max-width: 900px) {
    .ih-hero {
        flex-direction: column-reverse;
        text-align: center;
    }
    .ih-alert {
        text-align: left;
    }
    .ih-hero-image {
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .ih-table, .ih-table tbody, .ih-table tr, .ih-table td {
        display: block;
        width: 100%;
    }
    .ih-table thead {
        display: none;
    }
    .ih-table tr {
        margin-bottom: 15px;
        border-bottom: 2px solid #e2e8f0;
        padding-bottom: 15px;
    }
    .ih-table td {
        border: none;
        padding: 8px 15px;
        padding-left: 45%;
        text-align: right;
        position: relative;
    }
    .ih-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        font-weight: 600;
        color: #127142;
    }
    .ih-col-no, .ih-col-nama, .ih-col-desc, .ih-col-aksi {
        width: 100%;
    }
    .ih-table td.ih-col-no { display: none; }
    .ih-col-nama { justify-content: flex-end; flex-direction: row-reverse; }
    .ih-table-footer {
        flex-direction: column;
        gap: 15px;
    }
}

/* Breadcrumb */
.ih-breadcrumb {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 20px;
}
.ih-breadcrumb span {
    color: #0f172a;
    font-weight: 500;
}

/* 2-Column Hero Grid */
.ih-hero-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
}
.ih-hero-grid .hero-text h1 {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.25;
    background: linear-gradient(135deg, #0f172a 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
}
.ih-hero-grid .hero-text p {
    font-size: 16px;
    color: #475569;
    margin-bottom: 30px;
    line-height: 1.7;
    max-width: 95%;
}

@keyframes floatHero {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.ih-hero-grid .hero-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    animation: floatHero 6s ease-in-out infinite;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.08));
}

/* Info Box */
.ih-info-box {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 10px 40px -10px rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-left: 5px solid #10b981;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}
.ih-info-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px -10px rgba(16, 185, 129, 0.25);
}
.ih-info-box::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.03));
    pointer-events: none;
}
.ih-info-box-icon {
    width: 65px;
    height: 65px;
    background-color: #ecfdf5;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
    border: 3px solid #ffffff;
}
.ih-info-box-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.ih-info-box-text {
    z-index: 1;
}
.ih-info-box-text h4 {
    color: #065f46;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}
.ih-info-box-text p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 !important;
}

/* Table overrides to remove images */
.ih-table th.ih-col-nama {
    padding-left: 20px; /* Reset padding since there's no image */
}
.ih-col-nama .recipe-name {
    font-weight: 500;
    color: #0f172a;
}

/* Fix tbody flex issue caused by table-layout.css only on desktop */
@media (min-width: 769px) {
    tbody#recipe-list-container, tbody.recipe-list-container {
        display: table-row-group !important;
    }
}

/* Responsive Overrides */
@media (max-width: 900px) {
    .ih-hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }
    .ih-hero-grid .hero-image {
        order: -1;
        max-width: 350px;
        margin: 0 auto;
    }
    .ih-info-box {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .ih-hero-grid .hero-text h1 {
        font-size: 24px !important;
    }
    .ih-hero-grid .hero-text p {
        font-size: 14px !important;
    }
    .ih-info-box {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
}
