/*
Theme Name: Parto
Theme URI: https://demo.rizqy.id/
Author: Rizqy
Author URI: https://demo.rizqy.id/
Description: Theme portal berita modern dengan performa tinggi, SEO-optimized, dan fully customizable. Dibuat khusus untuk media dan portal berita Indonesia.
Version: 2.6.8
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: parto
Tags: news, magazine, blog, two-columns, custom-colors, custom-menu, editor-style, featured-images, footer-widgets, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready

Parto WordPress Theme, Copyright 2025
Parto is distributed under the terms of the GNU GPL
*/

/* ==========================================================================
   TIRTO.ID EXACT CLONE - Design System
   ========================================================================== */
   
/* Typography - Tirto.id menggunakan system font stack */
:root {
  /* Colors - Exact Tirto.id Palette (Dapat diubah via Customizer > Pengaturan Warna) */
  --color-primary: #1a73e8;        /* Blue primary */
  --color-secondary: #d32f2f;      /* Red accent */
  --color-text-primary: #1a1a1a;   /* Main text */
  --color-text-secondary: #666;    /* Secondary text */
  --color-text-tertiary: #999;     /* Meta/time */
  --color-bg-primary: #ffffff;     /* White bg */
  --color-bg-secondary: #f5f5f5;   /* Light gray bg */
  --color-bg-tertiary: #f0f0f0;    /* Lighter gray */
  --color-border: #e5e5e5;         /* Border color */
  --color-border-light: #f0f0f0;   /* Light border */
  
  /* Header Colors (Dapat diubah via Customizer) */
  --color-header-bg: #1a1a1a;
  --color-header-text: #ffffff;
  --color-header-link: rgba(255,255,255,0.85);
  --color-header-link-hover: #ffffff;
  --color-header-accent: #d32f2f;
  --color-header-search-bg: rgba(255,255,255,0.08);
  
  /* Navigation Colors (Dapat diubah via Customizer) */
  --color-nav-bg: #ffffff;
  --color-nav-link: #424242;
  --color-nav-link-hover: #1a73e8;
  --color-nav-border: #e5e5e5;
  
  /* Content Colors (Dapat diubah via Customizer) */
  --color-link: #1a73e8;
  --color-link-hover: #1557b0;
  --color-entry-title: #1a1a1a;
  --color-entry-title-hover: #1a73e8;
  
  /* Category Badge Colors - Tirto.id Style (Dapat diubah via Customizer) */
  --color-badge-blue: #1a73e8;
  --color-badge-red: #d32f2f;
  --color-badge-orange: #f57c00;
  --color-badge-green: #7cb342;
  --color-badge-gray: #666;
  --color-badge-purple: #9c27b0;
  
  /* Button Colors (Dapat diubah via Customizer) */
  --color-btn-primary-bg: #1a73e8;
  --color-btn-primary-text: #ffffff;
  --color-btn-primary-hover: #1557b0;
  --color-btn-secondary-bg: #d32f2f;
  --color-btn-secondary-text: #ffffff;
  --color-btn-secondary-hover: #b71c1c;
  
  /* Sidebar Colors (Dapat diubah via Customizer) */
  --color-sidebar-bg: #ffffff;
  --color-widget-title: #1a1a1a;
  --color-widget-title-border: #d32f2f;
  
  /* Footer Colors (Dapat diubah via Customizer) */
  --color-footer-social-bg: #f5f5f5;
  --color-footer-main-bg: #1a1a1a;
  --color-footer-text: rgba(255,255,255,0.7);
  --color-footer-link: rgba(255,255,255,0.85);
  --color-footer-link-hover: #ffffff;
  --color-footer-bottom-bg: #121212;
  --color-footer-bottom-text: rgba(255,255,255,0.5);
  --color-back-to-top-bg: #d32f2f;
  
  /* Section Colors (Dapat diubah via Customizer) */
  --color-section-title: #1a1a1a;
  --color-section-title-border: #d32f2f;
  --color-section-alt-bg: #f5f5f5;
  
  /* Typography - System Font Stack (Tirto.id Style) */
  --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  
  /* Font Sizes - Tirto.id Scale */
  --font-size-xs: 0.6875rem;     /* 11px - tiny */
  --font-size-sm: 0.75rem;       /* 12px - small */
  --font-size-base: 0.875rem;    /* 14px - base */
  --font-size-md: 0.9375rem;     /* 15px - medium */
  --font-size-lg: 1rem;          /* 16px - large */
  --font-size-xl: 1.125rem;      /* 18px - xl */
  --font-size-2xl: 1.25rem;      /* 20px - 2xl */
  --font-size-3xl: 1.5rem;       /* 24px - 3xl */
  --font-size-4xl: 1.625rem;     /* 26px - 4xl */
  --font-size-5xl: 2rem;         /* 32px - 5xl */
  
  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Line Heights */
  --line-height-tight: 1.3;
  --line-height-snug: 1.4;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.6;
  --line-height-loose: 1.75;
  
  /* Spacing - Tirto.id Grid */
  --space-1: 0.25rem;    /* 4px */
  --space-2: 0.5rem;     /* 8px */
  --space-3: 0.75rem;    /* 12px */
  --space-4: 1rem;       /* 16px */
  --space-5: 1.25rem;    /* 20px */
  --space-6: 1.5rem;     /* 24px */
  --space-8: 2rem;       /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  
  /* Layout - Tirto.id Widths */
  --container-max: 1320px;       /* Main container */
  --container-content: 750px;    /* Article content */
  --container-wide: 1440px;      /* Wide sections */
  --sidebar-width: 300px;        /* Sidebar */
  
  /* Border Radius - Tirto.id uses subtle radius */
  --radius-xs: 2px;
  --radius-sm: 3px;
  --radius: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  
  /* Shadows - Tirto.id subtle shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 2px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 16px rgba(0,0,0,0.1);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-index Stack */
  --z-base: 1;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-tooltip: 1070;
}

/* ==========================================================================
   RESET & BASE STYLES - TIRTO.ID EXACT
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  margin: 0;
  padding: 0;
}

#page {
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Typography - Tirto.id Style */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
  margin: 0;
}

h1 { font-size: var(--font-size-5xl); line-height: 1.2; }
h2 { font-size: var(--font-size-4xl); line-height: 1.25; }
h3 { font-size: var(--font-size-3xl); line-height: 1.3; }
h4 { font-size: var(--font-size-2xl); line-height: 1.35; }
h5 { font-size: var(--font-size-xl); line-height: 1.4; }
h6 { font-size: var(--font-size-lg); line-height: 1.45; }

p {
  margin: 0 0 var(--space-4) 0;
  line-height: var(--line-height-relaxed);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

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

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  margin: 0;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   CONTAINER & LAYOUT - TIRTO.ID EXACT
   ========================================================================== */
.container,
.container-fluid {
  width: 100%;
  margin: 0 auto;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

.container {
  max-width: var(--container-max);
}

.container-wide {
  max-width: var(--container-wide);
}

.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(var(--space-4) * -0.5);
}

.col {
  flex: 1;
  padding: 0 calc(var(--space-4) * 0.5);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Article Card Component
   ========================================================================== */
.article-card {
  display: block;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
  height: 100%;
}

.article-card:hover {
  box-shadow: var(--shadow-md);
}

.article-card__thumbnail {
  position: relative;
  padding-top: 56.25%; /* 16:9 ratio */
  background: var(--color-bg-alt);
  overflow: hidden;
}

.article-card__thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.article-card:hover .article-card__thumbnail img {
  transform: scale(1.05);
}

.article-card__category {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 1;
}

.article-card__content {
  padding: var(--space-4);
}

.article-card__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__excerpt {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.article-card__meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Category Pill */
.category-pill {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-full);
  transition: background-color var(--transition-fast);
}

.category-pill:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-muted { color: var(--color-text-muted); }
.text-light { color: var(--color-text-light); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
