/*
Theme Name: GeneratePress Child (Engil variant)
Description: Tez va minimal ob-havo dizayn (2025)
Author: Siz
Version: 1.2.0
Template: generatepress
*/

/* === LOCAL MONTSERRAT SHRIFTINI ULASH === */
@font-face {
  font-family: 'Montserrat';
  src: url('./fonts/Montserrat-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('./fonts/Montserrat-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('./fonts/Montserrat-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* === GLOBAL ROOT O‘ZGARUVCHILAR === */
:root {
  --c-bg-main:        #f6fcff;
  --c-bg-today-grad:  linear-gradient(135deg, #f8fbfd 70%, #f4eaea 100%);
  --c-bg-card:        #fafcff;
  --c-border:         #b5e7fa;
  --c-text-main:      #232323;
  --c-text-accent:    #07538c;
  --c-text-temp:      #ff5a1e;
  --c-text-link:      #0074b8;
  --c-shadow-strong:  rgba(0,160,255, .07);
  --c-shadow-soft:    rgba(0,160,255, .05);
  --radius-lg:        20px;
  --radius-md:        15px;
  --radius-round:     50%;
  --gap-block:        14px;
}

/* === GLOBAL TANA VA FONT === */
body {
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--c-text-main);
  background: var(--c-bg-main);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* === OBHAVO-MODERN GLOBAL KONTEYNER === */
.obhavo-modern {
  max-width: 900px;
  margin: 30px auto;
  padding: 20px;
  background: var(--c-bg-main);
  border-radius: var(--radius-lg);
  box-sizing: border-box;
}

/* === YORDAMCHI / UTIL SINFLAR === */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}

.text-center { text-align: center !important; }
.text-bold { font-weight: 700 !important; }
.text-accent { color: var(--c-text-accent) !important; }
.text-link { color: var(--c-text-link) !important; text-decoration: underline; }

/* === GOOGLE ADSENSE yoki boshqa reklama uchun universal blok === */
.adsense-block {
  min-height: 110px;
  max-width: 728px;
  margin: 24px auto;
  width: 100%;
  text-align: center;
  background: transparent;
}
@media (max-width: 768px) {
  .adsense-block {
    min-height: 90px;
    max-width: 100%;
    padding: 0 8px;
  }
}

/* === HEADER GRADIENT BACKGROUND === */
.site-header {
  background: linear-gradient(180deg, #e0f7ff 0%, #ffebe0 100%);
}

/* Transparent background for inside header */
.site-header .inside-header {
  background: transparent !important;
}

/* === MAIN NAVIGATION MENU STYLING === */
.main-navigation ul.menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0 48px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  background: none;
  width: 100%;
}

.main-navigation ul.menu > li {
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.main-navigation ul.menu > li > a {
  display: block;
  padding: 10px 0;
  font-weight: 700;
  color: #161616;
  text-decoration: none;
  transition: color 0.2s;
  line-height: 1.1;
}

.main-navigation ul.menu > li > a:hover,
.main-navigation ul.menu > li.current-menu-item > a {
  color: #1976d2;
}

/* Remove default GeneratePress dropdown icon */
.main-navigation .dropdown-menu-toggle {
  display: none !important;
}

/* Chevron for submenu – custom */
.main-navigation ul.menu > li.menu-item-has-children > a::after {
  content: '';
  border: solid #222;
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 4px;
  margin-left: 6px;
  transform: rotate(45deg);
  vertical-align: middle;
}

/* === CATEGORY YANGILIKLAR GRID STYLING FINAL === */

.news-wrapper {
  max-width: 960px;
  margin: 40px auto;
  padding: 0 15px;
}

.news-title {
  text-align: center;
  margin-bottom: 12px;
  font-size: 28px;
  font-weight: 700;
  color: #222;
}

.news-description {
  max-width: 720px;
  margin: 0 auto 32px;
  text-align: justify !important;
  font-size: 16px;
  color: #222 !important;
  line-height: 1.5;
}

/* Grid layout */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* balansli width */
  gap: 20px;
  align-items: stretch;
}

/* Card styles */
.news-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* Thumbnail image */
.news-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

/* Card content */
.news-content {
  padding: 16px 12px; /* balansli padding */
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left !important;
}

/* Card title */
.news-card-title {
  font-size: 16px !important;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #222 !important;
  line-height: 1.4;
  text-align: left !important;
}

/* Excerpt (5 satr) */
.news-excerpt {
  font-size: 15px;
  color: #222 !important;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: justify !important;
}

/* Responsive typography and card adjustments */
@media (max-width: 600px) {
  .news-card {
    border-radius: 8px;
    margin: 0 auto;
    max-width: 300px; /* mobilda kichikroq width */
  }

  .news-card-title {
    font-size: 16px !important; /* mobilda optimal */
    text-align: center !important;
  }

  .news-excerpt {
    font-size: 14px !important;
    line-height: 1.6;
    text-align: left !important; /* mobilda justify emas */
  }
}

/* === CUSTOM FOOTER STYLING FINAL === */
.custom-footer {
  background: linear-gradient(180deg, #e0f7ff 0%, #ffebe0 100%);
  padding: 20px 10px;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  border-top: 1px solid var(--c-border);
}

/* Footer links – default desktop view */
.custom-footer .footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.custom-footer .footer-links a {
  color: var(--c-text-link);
  text-decoration: none;
  font-weight: 500;
  padding: 0 6px;
  font-size: 16px; /* default desktop font size */
}

.custom-footer .footer-links a:hover {
  text-decoration: underline;
}

/* Footer copyright */
.custom-footer .footer-copy {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
}

/* Footer attribution */
.custom-footer .footer-attribution {
  margin-top: 10px;
  font-size: 12px;
  color: #777;
}

.custom-footer .footer-attribution a {
  color: #555;
  text-decoration: none;
}

.custom-footer .footer-attribution a:hover {
  text-decoration: underline;
}

/* === RESPONSIVE: Mobile optimization === */
@media (max-width: 480px) {
  .custom-footer .footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 12px;
    justify-items: center;
  }

  .custom-footer .footer-links a {
    padding: 0;
    font-size: 14px; /* mobile font size smaller */
  }
}

/* --- End of style.css --- */
