/*
Theme Name: PPTK - Pusat Penelitian Teh dan Kina
Theme URI: https://www.iritc.org
Author: PPTK Development Team
Author URI: https://www.iritc.org
Description: Tema WordPress resmi untuk Pusat Penelitian Teh dan Kina (PPTK). Menyediakan Custom Post Types untuk Peneliti, Produk, dan Publikasi dengan dukungan CMS penuh.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pptk
Tags: research, agriculture, tea, custom-post-types, tailwindcss
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
*/

@layer base {

/* ===== CSS VARIABLES (Design System) ===== */
:root {
    --primary: #0b4d26;
    --primary-hover: #083c1d;
    --primary-light: #e8f5e9;
    --secondary: #f7faf7;
    --surface: #fcfdfc;
    --surface-strong: #f0f5f2;
    --bg: #fcfdfc;
    --text-dark: #152d24;
    --text-medium: #4d6256;
    --text-light: #6f8a7d;
    --border-color: #d9e2dd;
    --white: #fcfdfc;
    --green-light: #e8f5e9;
    --green-accent: #2e7d32;
    --shadow-custom: 0 28px 80px rgba(15, 35, 26, 0.08);
    --shadow-card: 0 20px 40px rgba(15, 35, 26, 0.04);
    --shadow-card-hover: 0 28px 55px rgba(15, 35, 26, 0.08);
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --transition: all 0.3s ease;
}

/* ===== RESET & GLOBAL ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    width: 100%;
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-style: normal;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.25s ease;
}

main {
    overflow: hidden;
}

ul {
    list-style: none;
}

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

} /* end @layer base */

@layer components {

/* ===== LAYOUT ===== */
.container,
.pptk-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 100px 0;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    justify-content: center;
    text-decoration: none;
}

.btn-primary,
.btn-gradient {
    background: linear-gradient(135deg, #0f6d34 0%, #19884a 100%);
    color: var(--white);
    box-shadow: 0 8px 25px rgba(24, 128, 56, 0.3);
}

.btn-primary:hover,
.btn-gradient:hover {
    background: linear-gradient(135deg, #0b5c2c 0%, #177540 100%);
    transform: translateY(-1px);
    color: var(--white);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-ghost {
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    background: transparent;
}

.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

/* ===== CARDS ===== */
.pptk-card {
    background: var(--white);
    border: 1px solid rgba(217, 226, 221, 0.4);
    border-radius: 24px;
    box-shadow: 0 8px 30px rgb(0 0 0 / 0.04);
    transition: var(--transition);
    overflow: hidden;
}

.pptk-card:hover {
    box-shadow: 0 20px 40px rgba(24, 128, 56, 0.08);
    transform: translateY(-8px);
    border-color: rgba(11, 77, 38, 0.2);
}

.pptk-card-sm {
    border-radius: 18px;
}

.pptk-card-sm:hover {
    transform: translateY(-4px);
}

/* ===== HERO SECTION ===== */
.hero-overlay {
    background: linear-gradient(135deg, rgba(10, 34, 23, 0.78), rgba(10, 34, 23, 0.05));
}

.hero-slideshow {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.08);
    transition: opacity 1.8s ease-in-out, transform 20s ease-out;
    will-change: transform, opacity;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
    transform: scale(1.0);
}

/* ===== PAGE HEADER ===== */
.page-header {
    padding: 80px 0;
    color: var(--white);
    position: relative;
    background-size: cover;
    background-position: center;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(18, 30, 24, 0.6), rgba(12, 20, 16, 0.8));
}

.page-header > * {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--white);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.25s ease;
}

.breadcrumb a:hover {
    color: #fff;
}

/* ===== NAVIGATION ===== */
.nav-link {
    padding: 10px 0;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.25s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2.5px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    transform: scaleX(1);
}

/* Dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(217, 226, 221, 0.5);
    padding: 8px 0;
    display: none;
    z-index: 50;
}

.dropdown-menu.show,
li:hover > .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 8px 20px;
    font-size: 14px;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    color: var(--primary);
    background: rgba(232, 245, 233, 0.3);
}

/* ===== MARQUEE (Partners) ===== */
.marquee-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: scroll-left 40s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.partner-logo {
    width: 220px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 1.5rem;
    transition: all 0.3s ease;
    filter: grayscale(100%) opacity(60%);
}

.partner-logo:hover {
    filter: grayscale(0%) opacity(100%);
    transform: scale(1.05);
}

.partner-logo img {
    width: 100%;
    height: 90px;
    object-fit: contain;
}

.partner-logo span {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-medium);
    margin-top: 8px;
    text-align: center;
    line-height: 1.2;
}

/* ===== ARTICLE CONTENT (Gutenberg) ===== */
.article-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-medium);
}

.article-content p {
    margin-bottom: 20px;
}

.article-content h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 40px 0 16px;
}

.article-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin: 40px 0 20px;
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    background: var(--secondary);
    padding: 24px 32px;
    font-style: italic;
    font-size: 20px;
    border-radius: 0 12px 12px 0;
    margin: 32px 0;
    color: var(--text-dark);
    line-height: 1.6;
}

.article-content ul,
.article-content ol {
    padding-left: 24px;
    margin: 16px 0;
}

.article-content ul {
    list-style: disc;
}

.article-content ol {
    list-style: decimal;
}

.article-content li {
    margin-bottom: 12px;
}

.article-content img {
    border-radius: 12px;
    margin: 24px 0;
}

.article-content a {
    color: var(--primary);
    text-decoration: underline;
}

.article-content a:hover {
    color: var(--primary-hover);
}

/* ===== LINE CLAMPS ===== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== PAGINATION (WordPress) ===== */
.pptk-pagination {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.pptk-pagination .nav-links {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    border: 1px solid rgba(217, 226, 221, 0.5);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pptk-pagination .page-numbers {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-medium);
    transition: all 0.2s ease;
}

.pptk-pagination .page-numbers:hover {
    background: var(--secondary);
}

.pptk-pagination .page-numbers.current {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

.pptk-pagination .page-numbers.prev,
.pptk-pagination .page-numbers.next {
    color: var(--text-light);
}

.pptk-pagination .page-numbers.prev:hover,
.pptk-pagination .page-numbers.next:hover {
    color: var(--primary);
}

/* ===== HERO IMAGE (Article) ===== */
.hero-image {
    border-radius: 12px;
    width: 100%;
    height: 500px;
    object-fit: cover;
    box-shadow: var(--shadow-custom);
}

/* ===== PRODUCT DETAIL ===== */
.product-detail-image {
    background: #f9fafb;
    border-radius: 8px;
    padding: 40px;
    border: 1px solid rgba(217, 226, 221, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.product-detail-image img {
    max-width: 300px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
    transition: transform 0.5s ease;
}

.product-detail-image img:hover {
    transform: scale(1.05);
}

/* ===== MARKETPLACE BUTTONS ===== */
.marketplace-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-medium);
    font-weight: 600;
    padding: 14px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.marketplace-btn img {
    height: 20px;
    filter: grayscale(100%) opacity(70%);
    transition: all 0.3s ease;
}

.marketplace-btn:hover img {
    filter: grayscale(0%) opacity(100%);
}

.marketplace-btn.tokopedia:hover {
    border-color: #42B549;
    background: rgba(66, 181, 73, 0.05);
    color: var(--text-dark);
}

.marketplace-btn.shopee:hover {
    border-color: #EE4D2D;
    background: rgba(238, 77, 45, 0.05);
    color: var(--text-dark);
}

/* ===== SERVING SUGGESTION BOX ===== */
.serving-suggestion {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(217, 226, 221, 0.5);
    margin-top: 16px;
}

.serving-suggestion h3 {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 15px;
    margin-bottom: 8px;
}

.serving-suggestion ul {
    list-style: disc;
    list-style-position: inside;
    font-size: 14px;
}

.serving-suggestion li {
    margin-bottom: 4px;
}

/* ===== SERVICE CARD ===== */
.service-card {
    background: #fff;
    border: 1px solid #d9e2dd;
    border-radius: 20px;
    padding: 32px;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 28px 55px rgba(15, 35, 26, 0.08);
    border-color: rgba(11, 77, 38, 0.2);
}

.icon-box {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #e8f5e9;
    color: #0b4d26;
    display: flex;
    align-items: center;
    font-size: 24px;
    margin-bottom: 24px;
    justify-content: center;
}

/* ===== TIMELINE (Sejarah) ===== */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 24px;
    width: 4px;
    background: #e8f5e9;
    border-radius: 4px;
}

@media (min-width: 768px) {
    .timeline-container::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ===== SEARCH FORM ===== */
.pptk-search-form {
    position: relative;
    width: 100%;
}

.pptk-search-form input[type="search"] {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-dark);
    outline: none;
    transition: all 0.2s ease;
}

.pptk-search-form input[type="search"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(11, 77, 38, 0.1);
}

.pptk-search-form .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* ===== SOCIAL ICON ===== */
.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-medium);
    font-size: 14px;
    transition: all 0.25s ease;
}

.social-icon:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* ===== WORDPRESS SPECIFIC ===== */
/* Align classes from Gutenberg */
.alignwide {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
    padding: 8px 0;
}

/* Screen reader text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .page-header {
        padding: 60px 0;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .hero-image {
        height: 300px;
    }

    .section-padding {
        padding: 60px 0;
    }
}

} /* end @layer components */
