/* Professional News Media CSS - Modern & Clean Design */

/* CSS Variables for modern news theme */
:root {
  --primary-color: #e55a0f;
  --primary-dark: #d94d08;
  --primary-light: #ff8a4a;
  --secondary-color: #1a1a1a;
  --secondary-light: #2d2d2d;
  --text-primary: #222;
  --text-secondary: #4b5563;
  --text-light: #6b7280;
  --background: #ffffff;
  --background-light: #f9fafb;
  --background-dark: #f1f3f4;
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 8px 15px rgba(0, 0, 0, 0.07);
  --news-red: #dc2626;
  --news-blue: #2563eb;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base styles with modern typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 14px;
}

body {
  font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography - Modern News Style */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 0.65em;
}

h1 {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 1.65rem;
  letter-spacing: -0.25px;
}

h3 {
  font-size: 1.3rem;
}

h4 {
  font-size: 1.15rem;
}

h5 {
  font-size: 1rem;
}

h6 {
  font-size: 0.875rem;
}

p {
  margin-bottom: 0.9em;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background-light);
}

::-webkit-scrollbar-thumb {
  background: #c5c5c5;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Navbar Styles - Sleek & Professional */
.navbar {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  padding: 0.8rem 0;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  transition: var(--transition);
}

.navbar-logo {
  height: 36px;
  width: auto;
  transition: var(--transition);
}

.navbar-text {
  display: flex;
  flex-direction: column;
}

.navbar-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.navbar-subtitle {
  font-size: 0.7rem;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: -1px;
}

/* Navigation Links - Clean & Modern */
.nav-link {
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  transition: var(--transition);
  position: relative;
  font-size: 0.9rem;
}

.nav-link:hover {
  color: var(--primary-color);
  background-color: rgba(243, 112, 33, 0.08);
}

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

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

/* Dropdown Menu - Elegant */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  min-width: 180px;
  padding: 0.4rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: var(--transition);
  z-index: 1000;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  transition: var(--transition);
}

.dropdown-item:hover {
  background-color: var(--background-light);
  color: var(--primary-color);
}

/* Banner Slider - Professional Focus */
.banner-slider {
  position: relative;
  height: 340px;
  overflow: hidden;
  border-radius: 0 0 8px 8px;
  background: var(--background-dark);
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: var(--transition);
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-slide.active {
  opacity: 1;
  z-index: 1;
}

.banner-slide:not(.active) {
  opacity: 0;
  z-index: 0;
}

/* Article Cards - Modern & Clean */
.article-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  position: relative;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(229, 122, 33, 0.25);
}

.article-image {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.category-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--primary-color);
  color: white;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.article-content {
  padding: 1.25rem;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-light);
}

.article-author {
  font-weight: 600;
  color: var(--primary-color);
}

.article-date {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.article-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
  line-height: 1.35;
  transition: var(--transition);
}

.article-card:hover .article-title {
  color: var(--primary-color);
}

.article-excerpt {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Social Media Sharing Styles */
.article-share {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 0px solid #f3f4f6;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0px solid #374151;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #374151;
  background-color: white;
  flex-shrink: 0;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  background-color: #374151;
  color: white;
}

.share-btn.facebook {
  border-color: #374151;
  color: #374151;
}

.share-btn.facebook:hover {
  background-color: #374151;
  color: white;
}

.share-btn.instagram {
  border-color: #374151;
  color: #374151;
}

.share-btn.instagram:hover {
  background-color: #374151;
  color: white;
}

.share-btn.general {
  border-color: #374151;
  color: #374151;
}

.share-btn.general:hover {
  background-color: #374151;
  color: white;
}

/* Category Cards - Elegant */
.category-card {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  position: relative;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(229, 122, 33, 0.25);
}

.category-icon {
  width: 52px;
  height: 52px;
  background: var(--primary-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  transition: var(--transition);
}

.category-card:hover .category-icon {
  transform: scale(1.05) rotate(5deg);
  background: var(--primary-dark);
}

.category-icon svg {
  width: 26px;
  height: 26px;
  color: white;
}

.category-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.category-card:hover .category-title {
  color: var(--primary-color);
}

.category-description {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.category-count {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.875rem;
}

/* Forms - Modern Elegant */
.form-container {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.form-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.form-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.form-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: var(--transition);
  background: var(--background);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(243, 112, 33, 0.15);
  background: white;
}

.form-button {
  width: 100%;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.9rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.25px;
}

.form-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.form-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Footer - Professional & Clean */
.footer {
  background: var(--secondary-color);
  color: white;
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-section h3::after,
.footer-section h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 1px;
}

.footer-section p,
.footer-section a {
  color: #d1d5db;
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-section a:hover {
  color: var(--primary-color);
  padding-left: 3px;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1.5rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.85rem;
}

/* Loading Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-spinner {
  border: 2px solid var(--border-light);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

/* Utility Classes */
.text-primary {
  color: var(--primary-color);
}
.text-secondary {
  color: var(--text-secondary);
}
.bg-primary {
  background-color: var(--primary-color);
}
.shadow-sm {
  box-shadow: var(--shadow-sm);
}
.shadow-md {
  box-shadow: var(--shadow-md);
}
.shadow-lg {
  box-shadow: var(--shadow-lg);
}

/* Line Clamp */
.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;
}

/* Responsive Design - Enhanced for all devices */
@media (max-width: 1024px) {
  .banner-slider {
    height: 300px;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .navbar {
    padding: 0.7rem 0;
  }

  .navbar-title {
    font-size: 1.45rem;
  }

  .navbar-subtitle {
    font-size: 0.75rem;
  }

  .nav-link {
    font-size: 0.95rem;
    padding: 0.65rem 0.85rem;
  }

  .banner-slider {
    height: 260px;
  }

  .banner-overlay {
    padding-bottom: 2rem;
  }

  .banner-title {
    font-size: 1.7rem;
  }

  .banner-subtitle {
    font-size: 0.95rem;
  }

  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.6rem;
  }
  h3 {
    font-size: 1.35rem;
  }
  h4 {
    font-size: 1.15rem;
  }

  p {
    font-size: 0.95rem;
  }

  .article-title {
    font-size: 1.15rem;
  }

  .article-excerpt {
    font-size: 0.9rem;
  }

  .article-meta {
    font-size: 0.8rem;
  }

  .category-badge {
    font-size: 0.8rem;
  }

  .form-container {
    padding: 1.75rem;
  }

  .slider-btn {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 640px) {
  .navbar-logo {
    height: 34px;
  }

  .banner-slider {
    height: 220px;
  }

  .banner-title {
    font-size: 1.5rem;
  }

  .banner-subtitle {
    font-size: 0.9rem;
  }

  .category-card {
    padding: 1.5rem;
  }

  .article-image {
    height: 180px;
  }

  .article-content {
    padding: 1.5rem;
  }

  .news-item-compact {
    padding: 1rem;
  }

  .news-item-title {
    font-size: 0.95rem;
  }
}

/* Touch-friendly improvements */
@media (max-width: 768px) {
  button,
  .nav-link,
  .dropdown-item,
  .form-button {
    min-height: 44px;
  }

  .space-y-1 > * + * {
    margin-top: 0.6rem;
  }

  .space-y-2 > * + * {
    margin-top: 0.9rem;
  }

  .space-y-4 > * + * {
    margin-top: 1.75rem;
  }

  .space-y-6 > * + * {
    margin-top: 2.25rem;
  }

  .news-grid {
    gap: 1.25rem;
  }

  .px-4 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .py-12 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .footer,
  .slider-btn,
  .slider-indicators,
  .mobile-menu-btn {
    display: none !important;
  }

  body {
    font-size: 11pt;
    line-height: 1.4;
  }

  .article-card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}

/* News-specific enhancements */
.breaking-news {
  background: var(--news-red);
  color: white;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.trending-badge {
  background: var(--news-blue);
  color: white;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Compact layout for news density */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.news-item-compact {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.news-item-compact:hover {
  background: rgba(243, 112, 33, 0.03);
}

.news-item-compact:last-child {
  border-bottom: none;
}

.news-item-image {
  width: 90px;
  height: 70px;
  border-radius: 5px;
  overflow: hidden;
  flex-shrink: 0;
}

.news-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.news-item-compact:hover .news-item-image img {
  transform: scale(1.05);
}

.news-item-content {
  flex: 1;
}

.news-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.3rem;
  transition: var(--transition);
}

.news-item-compact:hover .news-item-title {
  color: var(--primary-color);
}

.news-item-meta {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Footer Logo Text Fix - Tambahan CSS */
.footer-section .flex.items-center > div {
  line-height: 1.1;
}

.footer-section h3 {
  margin-bottom: 0.1rem;
  font-size: 1rem;
}

.footer-section p.text-xs {
  font-size: 0.75rem;
  margin: 0;
  color: #d1d5db;
}

.footer-section .flex.items-center {
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
/* Perbaikan Slider Indicator di Mobile */
.slider-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  aspect-ratio: 1 / 1; /* NEW: jaga tetap bulat */
}
.slider-indicator:focus-visible {
  outline: 2px dashed var(--primary-light);
  outline-offset: 2px;
}

/* Search Input Styles */
#search-input {
  transition: all 0.3s ease;
}

#search-input:focus {
  box-shadow: 0 0 0 3px rgba(243, 112, 33, 0.1);
  border-color: var(--primary-color);
}

#clear-search {
  transition: all 0.2s ease;
}

#clear-search:hover {
  color: var(--primary-color);
}

#search-info {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
