/*
Theme Name:  Jenama Digital
Theme URI:   https://jenamadigital.com
Author:      PT. Jenama Digital Nusantara
Author URI:  https://jenamadigital.com
Description: Custom WordPress theme untuk PT. Jenama Digital Nusantara. Dioptimasi untuk SEO dan Bot Auto-Post. Mobile-responsive dengan fluid typography.
Version:     1.1.0
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jenama-digital
Tags:        custom-theme, blog, business, responsive, mobile-first
*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --brand-50: #eff6ff;
    --brand-100: #dbeafe;
    --brand-500: #3b82f6;
    --brand-600: #2563eb;
    --brand-800: #1e40af;
    --brand-900: #1e3a8a;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: #1f2937;
    background-color: #f9fafb;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

::selection {
    background-color: var(--brand-500);
    color: white;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover Card Effect */
.hover-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Glass Navigation */
.glass-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

/* Prose / Bot Content Wrapper - CRITICAL FOR BOT POSTS */
.prose.bot-content-wrapper {
    color: #374151;
    font-size: 1.0625rem;
    line-height: 1.85;
    max-width: 100%;
}

.prose.bot-content-wrapper p {
    margin-bottom: 1.5rem;
}

.prose.bot-content-wrapper h1,
.prose.bot-content-wrapper h2,
.prose.bot-content-wrapper h3,
.prose.bot-content-wrapper h4,
.prose.bot-content-wrapper h5,
.prose.bot-content-wrapper h6 {
    color: #111827;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.prose.bot-content-wrapper h1 { font-size: 2rem; }
.prose.bot-content-wrapper h2 { font-size: 1.625rem; }
.prose.bot-content-wrapper h3 { font-size: 1.375rem; }
.prose.bot-content-wrapper h4 { font-size: 1.125rem; }

.prose.bot-content-wrapper a {
    color: var(--brand-600);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prose.bot-content-wrapper a:hover {
    color: var(--brand-800);
}

.prose.bot-content-wrapper ul,
.prose.bot-content-wrapper ol {
    margin-bottom: 1.5rem;
    padding-left: 1.75rem;
}

.prose.bot-content-wrapper ul { list-style-type: disc; }
.prose.bot-content-wrapper ol { list-style-type: decimal; }

.prose.bot-content-wrapper li {
    margin-bottom: 0.5rem;
}

.prose.bot-content-wrapper blockquote {
    border-left: 4px solid var(--brand-500);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: var(--brand-50);
    border-radius: 0 0.5rem 0.5rem 0;
    color: #4b5563;
    font-style: italic;
}

.prose.bot-content-wrapper img {
    border-radius: 0.75rem;
    margin: 1.5rem auto;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.07);
    display: block;
}

/* TABLE STYLING - CRITICAL FOR BOT CONTENT */
.prose.bot-content-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    font-size: 0.9375rem;
    border: 1px solid #e5e7eb;
}

.prose.bot-content-wrapper thead {
    background: var(--brand-600);
    color: white;
}

.prose.bot-content-wrapper th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    border: 1px solid var(--brand-500);
}

.prose.bot-content-wrapper td {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
}

.prose.bot-content-wrapper tbody tr:nth-child(even) {
    background: #f9fafb;
}

.prose.bot-content-wrapper tbody tr:hover {
    background: #f3f4f6;
}

.prose.bot-content-wrapper pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.prose.bot-content-wrapper code {
    background: #f3f4f6;
    color: var(--brand-800);
    padding: 0.15em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.prose.bot-content-wrapper pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: #374151;
    border: 1px solid #e5e7eb;
    background: white;
    transition: all 0.2s;
    text-decoration: none;
}

.pagination .page-numbers:hover {
    background: var(--brand-600);
    color: white;
    border-color: var(--brand-600);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.pagination .page-numbers.current {
    background: var(--brand-600);
    color: white;
    border-color: var(--brand-600);
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.pagination .page-numbers.dots {
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: default;
}

.pagination .page-numbers.dots:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
    padding: 0 1rem;
    font-weight: 500;
}

.pagination .page-numbers.prev i,
.pagination .page-numbers.next i {
    font-size: 0.75rem;
}

.pagination .page-numbers.prev span,
.pagination .page-numbers.next span {
    display: inline-block;
}

/* Responsive Pagination */
@media (max-width: 640px) {
    .pagination .page-numbers.prev span,
    .pagination .page-numbers.next span {
        display: none;
    }
    
    .pagination .page-numbers.prev,
    .pagination .page-numbers.next {
        padding: 0 0.75rem;
    }
}

/* Mobile Menu Styles */
.mobile-menu {
    display: none;
    flex-direction: column;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 1rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    padding: 1rem 1.5rem;
    color: #374151;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.mobile-menu a:hover,
.mobile-menu a:active {
    background: #f9fafb;
    border-left-color: #2563eb;
    color: #2563eb;
}

.mobile-menu .mobile-cta {
    margin: 0.75rem 1rem 0;
    background: #2563eb;
    color: white !important;
    text-align: center;
    border-radius: 9999px;
    padding: 1rem 1.5rem !important;
    border-left: none !important;
    font-weight: 600;
    justify-content: center;
}

.mobile-menu .mobile-cta:hover,
.mobile-menu .mobile-cta:active {
    background: #1e40af;
}

/* Hamburger button - better touch target */
.nav-hamburger {
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    /* Hero Section */
    .hero-section {
        padding-top: 7rem;
        padding-bottom: 3rem;
    }
    
    /* About Section */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-image-wrap img {
        height: 20rem;
    }
    
    .about-badge-card {
        bottom: -1rem;
        left: -1rem;
        padding: 1rem;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* News Grid */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Blog Grid - Better mobile layout */
    .grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    /* Typography */
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-desc {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Buttons */
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons a {
        width: 100%;
        text-align: center;
    }
    
    /* Cards */
    .service-card,
    .news-card {
        padding: 1.5rem;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    /* Blog Page */
    .blog-page-header h1 {
        font-size: 2rem;
    }
    
    /* Single Post */
    .single-post-title {
        font-size: 1.75rem;
    }
    
    .single-post-meta {
        font-size: 0.8125rem;
    }
    
    /* Prose Content */
    .prose.bot-content-wrapper {
        font-size: 1rem;
        padding: 1.5rem;
    }
    
    .prose.bot-content-wrapper h1 {
        font-size: 1.5rem;
    }
    
    .prose.bot-content-wrapper h2 {
        font-size: 1.375rem;
    }
    
    .prose.bot-content-wrapper h3 {
        font-size: 1.125rem;
    }
    
    .prose.bot-content-wrapper table {
        font-size: 0.8125rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .prose.bot-content-wrapper pre {
        font-size: 0.8125rem;
        padding: 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Pagination */
    .pagination .page-numbers {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.8125rem;
        padding: 0 0.5rem;
    }
    
    .pagination .page-numbers.prev span,
    .pagination .page-numbers.next span {
        display: none;
    }
    
    /* Blog Grid - Single column on tablet */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    /* Better card spacing */
    article.hover-card {
        margin-bottom: 0;
    }
}

@media (max-width: 640px) {
    /* Container Padding */
    .container,
    .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Navigation */
    .nav-inner {
        height: 70px;
    }
    
    .nav-logo {
        font-size: 1.25rem;
    }
    
    /* Hero */
    .hero-section {
        padding-top: 6rem !important;
        padding-bottom: 2rem !important;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .hero-desc {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    /* About */
    .about-title {
        font-size: 1.5rem;
    }
    
    .about-text {
        font-size: 1rem;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .about-image-wrap img {
        height: 16rem;
    }
    
    .about-badge-card {
        position: static;
        margin-top: 1rem;
    }
    
    /* Services */
    .service-card {
        padding: 1.25rem;
    }
    
    .service-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }
    
    .service-card h4 {
        font-size: 1.125rem;
    }
    
    /* News */
    .news-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .news-card-body {
        padding: 1.25rem;
    }
    
    /* Footer */
    .footer-logo {
        font-size: 1.5rem;
    }
    
    .footer-desc {
        font-size: 0.8125rem;
    }
    
    .footer-socials a {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.875rem;
    }
    
    /* Blog Cards */
    .news-card-thumb,
    .news-card-thumb-placeholder {
        height: 10rem;
    }
    
    /* Single Post */
    .single-post-container {
        padding: 0 1rem;
    }
    
    .single-post-hero img {
        max-height: 16rem;
    }
    
    /* Share Buttons */
    .single-post-share {
        gap: 0.5rem;
    }
    
    .single-post-share a {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 0.875rem;
    }
    
    /* Pagination */
    .pagination {
        gap: 0.25rem;
        margin-top: 2rem;
    }
    
    .pagination .page-numbers {
        min-width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }
    
    /* Blog Grid - Ensure single column */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
    
    /* Blog article cards - better mobile spacing */
    article.hover-card {
        margin-bottom: 0;
    }
    
    /* Blog page header - better mobile spacing */
    div[style*="padding-top: 8rem"] {
        padding-top: 6rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Single post - better mobile padding */
    article.pt-32 {
        padding-top: 6rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Prose content - better mobile readability */
    .prose.bot-content-wrapper {
        padding: 1.25rem !important;
        font-size: 0.9375rem !important;
        line-height: 1.75 !important;
    }
    
    .prose.bot-content-wrapper h1 {
        font-size: 1.375rem !important;
        margin-top: 1.5rem !important;
    }
    
    .prose.bot-content-wrapper h2 {
        font-size: 1.25rem !important;
        margin-top: 1.5rem !important;
    }
    
    .prose.bot-content-wrapper h3 {
        font-size: 1.0625rem !important;
        margin-top: 1.25rem !important;
    }
    
    .prose.bot-content-wrapper p {
        margin-bottom: 1.25rem !important;
    }
    
    .prose.bot-content-wrapper img {
        margin: 1.25rem auto !important;
        border-radius: 0.5rem !important;
    }
    
    /* Single post title - better mobile size */
    article header h1 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1.25rem !important;
    }
    
    /* Single post meta - better mobile spacing */
    article header div.flex {
        font-size: 0.8125rem !important;
        gap: 0.75rem !important;
    }
    
    /* Back button - better mobile touch target */
    article a[href*="/blog"] {
        padding: 0.75rem 0 !important;
        font-size: 0.875rem !important;
    }
}

/* Landscape Mobile */
@media (max-width: 896px) and (orientation: landscape) {
    .hero-section {
        padding-top: 5rem;
        padding-bottom: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .nav-links a,
    .mobile-menu a {
        padding: 1rem;
    }
    
    .pagination .page-numbers {
        min-width: 2.75rem;
        height: 2.75rem;
    }
    
    /* Remove hover effects on touch devices */
    .hover-card:hover {
        transform: none;
        box-shadow: 0 1px 3px rgba(0,0,0,.1);
    }
}
