/* =============================================
   WorldGreyNews — CNN-inspired Design
   ============================================= */

/* --- Variables --- */
:root {
  --red:        #c00;
  --red-dark:   #a00;
  --black:      #0c0c0c;
  --dark:       #1a1a1a;
  --gray-dark:  #262626;
  --gray-mid:   #404040;
  --gray:       #6b6b6b;
  --gray-light: #cacaca;
  --gray-bg:    #f2f2f2;
  --white:      #ffffff;
  --font:       -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font);
  color: var(--gray-dark);
  background: var(--white);
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }

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

.fontello-icon {
  font-family: var(--font);
  font-style: normal;
  font-weight: normal;
  display: inline-block;
  text-decoration: inherit;
  font-variant: normal;
  text-transform: none;
  line-height: 1em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.icon-down-open:before  { content: 'v'; }
.icon-left-open:before  { content: '<'; }
.icon-right-open:before { content: '>'; }
.icon-up-open:before    { content: '^'; }
.icon-mail:before       { content: '@'; }
.icon-heart-empty:before{ content: 'heart'; }
.icon-heart:before      { content: 'heart'; }
.icon-star:before       { content: '*'; }
.icon-star-empty:before { content: '*'; }
.icon-clock:before      { content: '-'; }
.icon-phone:before      { content: 'tel'; }
.icon-calendar:before   { content: 'cal'; }
.icon-twitter:before    { content: 't'; }
.icon-facebook:before   { content: 'f'; }
.icon-instagram:before  { content: 'ig'; }

/* =============================================
   HEADER
   ============================================= */
.site-header {
  background: var(--black);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  gap: 1rem;
}

/* Logo */
.header-logo a { display: flex; align-items: center; }

.header-logo-text {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--white);
  text-transform: uppercase;
  line-height: 1;
}
.header-logo-text .logo-grey { color: var(--red); }

.header-logo-img {
  max-height: 42px;
  width: auto;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  flex-wrap: wrap;
}

.nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  color: #ccc;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.15s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--red); }
.nav-link-special { color: var(--red); }
.nav-link-special:hover { color: #ff4444; }

.nav-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid #333;
}
.nav-social-link {
  color: #ccc;
  font-size: 1.1rem;
  transition: color 0.15s;
}
.nav-social-link:hover { color: var(--red); }

.btn-create-news {
  background: var(--red);
  color: var(--white) !important;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-create-news:hover { background: var(--red-dark); color: var(--white) !important; }

/* Red accent bar */
.header-accent-bar {
  height: 3px;
  background: var(--red);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all 0.2s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--black);
    padding: 1rem;
    border-top: 3px solid var(--red);
    gap: 0.5rem;
  }
  .site-nav.nav-open { display: flex; }
  .nav-list { flex-direction: column; width: 100%; }
  .nav-link { padding: 0.6rem 0; border-bottom: 1px solid #222; width: 100%; }
  .nav-social { border-left: none; border-top: 1px solid #333; padding-left: 0; padding-top: 0.75rem; width: 100%; }
  .header-inner { position: relative; }
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.site-main {
  padding-top: 2rem;
  padding-bottom: 2rem;
  min-height: 60vh;
}

/* =============================================
   SHARED COMPONENTS
   ============================================= */

/* Section label — red uppercase tag above content */
.section-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--red);
  display: inline-block;
  padding: 0.25rem 0.6rem;
  margin-bottom: 1rem;
}

/* Section header with left red border */
.section-header {
  border-left: 4px solid var(--red);
  padding-left: 0.75rem;
  margin-bottom: 1.5rem;
  margin-top: 2.5rem;
}
.section-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--black);
  margin: 0;
}

/* Article meta (date, icon) */
.article-meta {
  font-size: 0.75rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

/* News card tag */
.news-card-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 0.35rem;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero-section {
  margin-bottom: 1rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

/* Hero main card */
.hero-card {
  display: block;
  color: inherit;
}
.hero-card:hover .hero-title { color: var(--red); }

.hero-img-wrap {
  position: relative;
  overflow: hidden;
}
.hero-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.3s ease;
}
.hero-card:hover .hero-img { transform: scale(1.02); }

.hero-label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--red);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
}

.hero-card-body {
  padding: 1rem 0 0.5rem;
}
.hero-title {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--black);
  margin: 0 0 0.5rem;
  transition: color 0.15s;
}
.hero-intro {
  font-size: 1rem;
  color: var(--gray-mid);
  line-height: 1.6;
  margin: 0 0 0.5rem;
}
.hero-share {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-light);
}

/* Hero sidebar */
.hero-sidebar {
  border-left: 1px solid var(--gray-light);
  padding-left: 1.5rem;
}

.sidebar-card {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--gray-bg);
  color: inherit;
  align-items: start;
}
.sidebar-card:first-of-type { padding-top: 0; }
.sidebar-card:hover .sidebar-title { color: var(--red); }

.sidebar-img-wrap { overflow: hidden; }
.sidebar-img {
  width: 90px;
  height: 65px;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.2s;
}
.sidebar-card:hover .sidebar-img { transform: scale(1.05); }

.sidebar-card-body { display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-title {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--gray-dark);
  margin: 0;
  transition: color 0.15s;
}

/* =============================================
   CARDS GRID
   ============================================= */
.more-stories { margin-top: 0; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-bottom: 3px solid transparent;
  transition: border-color 0.15s;
}
.news-card:hover { border-bottom-color: var(--red); }

.news-card-img-link { overflow: hidden; display: block; }
.news-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.3s;
}
.news-card:hover .news-card-img { transform: scale(1.04); }

.news-card-body { padding: 0.85rem 0 0; flex: 1; display: flex; flex-direction: column; }

.news-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.4rem;
  color: var(--black);
}
.news-card-title a { color: inherit; }
.news-card-title a:hover { color: var(--red); }

.news-card-desc {
  font-size: 0.875rem;
  color: var(--gray-mid);
  line-height: 1.5;
  margin: 0 0 0.4rem;
  flex: 1;
}

/* =============================================
   ARTICLE DETAIL
   ============================================= */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}

.detail-header { margin-bottom: 1.25rem; }

.detail-title {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.2;
  color: var(--black);
  margin: 0.4rem 0 0.75rem;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--gray-light);
  border-bottom: 1px solid var(--gray-light);
  margin-bottom: 1.25rem;
}

.share-buttons-detail {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.detail-figure { margin: 0 0 1.5rem; }
.detail-img {
  width: 100%;
  height: auto;
}

.detail-intro {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gray-dark);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--gray-light);
}

.detail-content {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--gray-dark);
}
.detail-content p { margin-bottom: 1.25rem; }
.detail-content img { max-width: 100%; margin: 1rem 0; }

.detail-sidebar {
  border-left: 1px solid var(--gray-light);
  padding-left: 1.5rem;
  position: sticky;
  top: 80px;
}

/* =============================================
   FAVORITE / POPULAR NEWS
   ============================================= */
.fav-img {
  height: 160px;
  width: 100%;
  object-fit: cover;
  object-position: top center;
}
.fav-img-down {
  height: 200px;
  width: 100%;
  object-fit: cover;
  object-position: top center;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--dark);
  color: #ccc;
  margin-top: 3rem;
}

.footer-weather {
  padding: 1.5rem 0;
  border-bottom: 1px solid #333;
}

.weather-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.weather-city {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.weather-icon {
  width: 40px;
  height: 40px;
  filter: brightness(0) invert(0.8);
}

.weather-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.weather-city-name {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
}

.weather-temp {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}

.footer-bottom { padding: 1.5rem 0; }

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo-text {
  font-size: 1.2rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--white);
  letter-spacing: -0.5px;
}
.footer-logo-text .logo-red { color: var(--red); }

.footer-tagline {
  font-size: 0.8rem;
  color: #888;
  margin: 0.25rem 0 0;
}
.footer-tagline a { color: var(--red); }
.footer-tagline a:hover { color: #ff4444; }

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--red); }

/* =============================================
   ADD NEWS / FORMS
   ============================================= */
.img_option { width: 120px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 280px; }
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-sidebar {
    border-left: none;
    border-top: 1px solid var(--gray-light);
    padding-left: 0;
    padding-top: 1.5rem;
  }
  .hero-img { height: 260px; }
  .hero-title { font-size: 1.4rem; }

  .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-sidebar {
    border-left: none;
    border-top: 1px solid var(--gray-light);
    padding-left: 0;
    padding-top: 1.5rem;
    position: static;
  }
  .detail-title { font-size: 1.5rem; }

  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }

  .weather-grid { gap: 1rem; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
  .hero-img { height: 200px; }
  .header-logo-text { font-size: 1.2rem; }
  .weather-grid { gap: 0.75rem; }
  .fav-img, .fav-img-down { height: 220px; }
}
