/*
Theme Name: Open News Pro
Theme URI: https://hiigsitech.com
Author: hiigsitech.com
Author URI: https://hiigsitech.com
Description: A modern, high-performance, responsive magazine and news theme. Updated for the advanced mega-grid layout, sliders, and custom news tickers.
Version: 2.0.0
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: open-news-pro
*/

/* ==========================================================================
   1. Base & Accessibility (WordPress Core Overrides)
   ========================================================================== */
html {
  scroll-behavior: smooth;
}

/* Required by WordPress for screen readers */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  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;
  clip-path: none;
  color: #0d5add;
  display: block;
  font-size: 0.875rem;
  font-weight: bold;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Gutenberg Editor Alignments */
.alignnone { margin-left: 0; margin-right: 0; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin-right: 1.5em; margin-bottom: 1.5em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1.5em; }
.alignwide { max-width: 1280px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }

/* ==========================================================================
   2. Custom UI Components (Buttons & Image Effects)
   ========================================================================== */

/* The Solid Blue Button (Sign In / Post Comment) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  background-color: #0d5add;
  border-radius: 0.25rem;
  transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  cursor: pointer;
  border: none;
}
.btn-primary:hover {
  background-color: #1d4ed8;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Hover Zoom Effect for Standard Theme Images */
.img-zoom-container {
  overflow: hidden;
  position: relative;
  display: block;
}
.img-zoom-container img {
  transition: transform 0.5s ease-in-out;
  object-fit: cover;
  width: 100%;
  height: 100%;
}
.img-zoom-container:hover img,
.group:hover .img-zoom-container img {
  transform: scale(1.05);
}

/* ==========================================================================
   3. Advanced Layout Utilities (Sliders & Tickers)
   ========================================================================== */

/* Hide Scrollbars on the Horizontal Sliders (Hero & Videos) */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Smooth Snapping for Sliders */
.snap-mandatory {
  scroll-snap-type: x mandatory;
}
.snap-center {
  scroll-snap-align: center;
}

/* Vertical News Ticker Animation (For the World News sidebar section) */
@keyframes verticalScroll {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); } /* Scrolls exactly half the height to loop perfectly */
}
.animate-vertical-scroll {
  animation: verticalScroll 30s linear infinite;
}

/* Horizontal News Ticker Animation (For the Top Stories Header bar) */
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-100%); }
}
.animate-marquee {
  animation: marquee 25s linear infinite;
}/* ==========================================================================
   4. Default WordPress Widget Styling (Making standard widgets look modern)
   ========================================================================== */
.widget-area .widget {
  margin-bottom: 2.5rem;
  background-color: #f9fafb; /* Light Gray */
  padding: 1.5rem;
  border-radius: 0.25rem;
  border: 1px solid #f3f4f6;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Dark Mode Widget Background */
.dark .widget-area .widget {
  background-color: #1a1a1a;
  border-color: #27272a;
}

/* Widget Titles */
.widget-area .widget h2, 
.widget-area .widget .widget-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0d5add; /* Brand Blue */
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
}

.dark .widget-area .widget h2, 
.dark .widget-area .widget .widget-title {
  border-bottom-color: #27272a;
}

/* The Blue Accent Line under the title */
.widget-area .widget h2::after, 
.widget-area .widget .widget-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 4rem;
  height: 2px;
  background-color: #0d5add;
}

/* Widget Lists (Categories, Archives, Recent Posts) */
.widget-area .widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.widget-area .widget ul li {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  transition: color 0.2s;
}

.dark .widget-area .widget ul li {
  border-bottom-color: #27272a;
  color: #d1d5db;
}

.widget-area .widget ul li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.widget-area .widget ul li a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.widget-area .widget ul li a:hover {
  color: #0d5add;
}

/* Style the Search Widget */
.widget-area .widget_search form {
  display: flex;
  position: relative;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.widget-area .widget_search input[type="search"] {
  flex-grow: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-right: none;
  border-radius: 0.25rem 0 0 0.25rem;
  font-size: 0.875rem;
  outline: none;
  background: white;
}

.dark .widget-area .widget_search input[type="search"] {
  background: #09090b;
  border-color: #3f3f46;
  color: white;
}

.widget-area .widget_search button[type="submit"],
.widget-area .widget_search input[type="submit"] {
  padding: 0.75rem 1.25rem;
  background-color: #0d5add;
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0 0.25rem 0.25rem 0;
  border: 1px solid #0d5add;
  cursor: pointer;
  transition: background-color 0.2s;
}

.widget-area .widget_search button:hover,
.widget-area .widget_search input[type="submit"]:hover {
  background-color: #1d4ed8;
}