/*====================================================================
  assets/css/news.css – PROFESSIONAL MAGAZINE LAYOUT
  (November 2025 Edition)
====================================================================*/

:root {
  --primary: #f58217;
  --text: #1a1a1a;
  --text-light: #555;
  --bg: #f4f4f6; /* Slightly grey for better card contrast */
  --card-bg: #ffffff;
  --radius: 16px;
  --transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); /* Apple-style easing */
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-hover: 0 20px 40px rgba(0,0,0,0.12);
}

.dark {
  --bg: #050505;
  --card-bg: #141414;
  --text: #ffffff;
  --text-light: #a0a0a0;
  --shadow: 0 4px 20px rgba(0,0,0,0.5);
  --shadow-hover: 0 20px 40px rgba(0,0,0,0.8);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; overflow-x: hidden; scroll-behavior: smooth; }

body { 
  font-family: 'Montserrat', sans-serif; 
  background: var(--bg); 
  color: var(--text); 
  line-height: 1.6; 
  transition: background 0.3s ease, color 0.3s ease;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ============================================================
   1. HEADER (Keep Logic Intact)
   ============================================================ */
.header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  height: 80px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(16px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  transition: background 0.3s ease;
}
.dark .header { background: rgba(10,10,10,0.9); border-color: rgba(255,255,255,0.05); }

.nav { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 100%; }

/* Logo */
.nav__logo .logo-img, #nav-logo {
  height: 50px !important;
  width: auto;
  display: block;
}

/* Back Button */
.back-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(128,128,128,0.3);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.3s ease;
}
.back-btn i { font-size: 1.1rem; color: var(--primary); transition: 0.3s; }

.back-btn:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.back-btn:hover i { color: #fff; }

/* ============================================================
   2. PAGE HERO
   ============================================================ */
.page-hero {
  height: 45vh;
  min-height: 400px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: 80px;
}

.page-hero .hero-overlay {  
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(30,30,30,0.8), #000);
  z-index: 1;
}

.page-hero .hero-content {
  position: relative; z-index: 2;
  max-width: 800px; padding: 0 2rem;
  animation: fadeUp 1s ease-out;
}

.page-hero .hero-title { 
  font-size: 3.5rem; font-weight: 800; margin-bottom: 0.5rem; color: #fff;
  letter-spacing: -1px;
}
.page-hero .hero-subtitle { 
  font-size: 1.1rem; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: 2px;
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   3. PROFESSIONAL CARD LAYOUT
   ============================================================ */
.news-full { 
  padding: 5rem 0; 
  background: var(--bg); 
  min-height: 60vh;
}

/* Card Container */
.news-article {
  margin-bottom: 3rem;
  opacity: 0; transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.news-article.visible { opacity: 1; transform: translateY(0); }

/* The Link Wrapper (The Card Itself) */
.news-link-wrapper {
  display: grid;
  grid-template-columns: 350px 1fr; /* Image width fixed, content fills rest */
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  height: 400px; /* Fixed height for uniformity */
  border: 1px solid rgba(0,0,0,0.03);
  position: relative;
}
.dark .news-link-wrapper { border: 1px solid rgba(255,255,255,0.08); }

/* Hover State */
.news-link-wrapper:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

/* Image Area */
.news-img-wrapper {
  width: 100%; height: 100%;
  overflow: hidden;
  position: relative;
}
.news-img-wrapper img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease; /* Smooth zoom */
}
.news-link-wrapper:hover .news-img-wrapper img {
  transform: scale(1.08);
}

/* Text Content Area */
.news-content-full {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

/* Date Tag */
.news-date { 
  font-size: 0.75rem; 
  font-weight: 700; 
  color: var(--primary); 
  text-transform: uppercase; 
  letter-spacing: 1px;
  margin-bottom: 1rem;
  display: inline-block;
  background: rgba(245, 130, 23, 0.1);
  padding: 4px 10px;
  border-radius: 4px;
  width: fit-content;
}

/* Title */
.news-content-full h2 { 
  font-size: 1.6rem; 
  margin-bottom: 1rem; 
  line-height: 1.3;
  color: var(--text);
  font-weight: 800;
  transition: color 0.3s ease;
}
.news-link-wrapper:hover h2 { color: var(--primary); }

/* Summary (Excerpt) */
.news-excerpt { 
  font-size: 1rem; 
  color: var(--text-light); 
  margin-bottom: 2rem;
  line-height: 1.6;
  
  /* Truncate after 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Button inside Card */
.btn-primary {
  align-self: flex-start; /* Stop stretching */
  padding: 0.8rem 1.8rem;
  font-size: 0.9rem;
  background: var(--text); /* Black button by default */
  color: #fff;
  border-radius: 50px;
  transition: 0.3s;
  box-shadow: none;
  margin-top: auto; /* Push to bottom */
}
.dark .btn-primary { background: #333; }

.news-link-wrapper:hover .btn-primary {
  background: var(--primary); /* Orange on hover */
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(245, 130, 23, 0.4);
}

/* Divider (Hidden now) */
.article-divider { display: none; }

/* --- MOBILE RESPONSIVE (Stacking) --- */
@media (max-width: 900px) {
  .news-link-wrapper {
    grid-template-columns: 1fr; /* Stack vertically */
    grid-template-rows: 240px auto; /* Image height fixed */
    height: auto; /* Allow growth */
    flex-direction: column;
  }
  
  .news-img-wrapper { height: 100%; }
  
  .news-content-full {
    padding: 2rem;
  }
  
  .news-content-full h2 { font-size: 1.4rem; }
  
  .page-hero .hero-title { font-size: 2.5rem; }
}

/* ============================================================
   4. CTA & FOOTER
   ============================================================ */
.cta {
  padding: 6rem 0;
  text-align: center;
  background: linear-gradient(to bottom, var(--bg), var(--card-bg));
}
.cta h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.cta p { margin-bottom: 2rem; opacity: 0.7; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Large CTA Button override */
#cta-btn {
  background: var(--primary);
  font-size: 1.1rem;
  padding: 1rem 3rem;
}
#cta-btn:hover {
  box-shadow: 0 10px 30px rgba(245, 130, 23, 0.4);
}

/* Footer */
.footer {
  padding: 4rem 1.5rem 2rem;
  text-align: center;
  background: var(--card-bg);
  border-top: 1px solid rgba(0,0,0,0.05);
}
.dark .footer { border-color: rgba(255,255,255,0.05); }

.footer__logo img, #footer-logo {
  height: 100px !important;
  width: auto;
  margin: 0 auto 2rem;
}

.footer__social {
  display: flex; justify-content: center; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap;
}

.footer__icon {
  display: inline-flex; align-items: center; gap: 0;
  color: var(--text); font-size: 1.5rem; text-decoration: none !important;
  transition: all 0.3s ease; position: relative; padding: 8px; border-radius: 50px;
}
.footer__icon span {
  font-size: 0.9rem; font-weight: 600; display: inline-block; max-width: 0; overflow: hidden; opacity: 0; white-space: nowrap; transition: 0.3s;
}
.footer__icon:hover { background: rgba(0,0,0,0.05); gap: 8px; }
.dark .footer__icon:hover { background: rgba(255,255,255,0.1); }
.footer__icon:hover span { max-width: 120px; opacity: 1; }

/* Icon Colors */
.footer__icon.facebook:hover { color: #1877F2; }
.footer__icon.instagram:hover { color: #E1306C; }
.footer__icon.twitter:hover { color: #1DA1F2; }
.footer__icon.youtube:hover { color: #FF0000; }
.footer__icon.linkedin:hover { color: #0077b5; }

.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.6rem;
    color: #1a1a1a;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 9999;
    overflow: hidden;
    border: 3px solid transparent;
    backdrop-filter: blur(12px);
}
.theme-toggle i { position: absolute; transition: 0.3s; }
.theme-toggle .bx-sun { opacity: 0; transform: rotate(90deg); }
.theme-toggle.active .bx-sun { opacity: 1; transform: rotate(0); }
.theme-toggle.active .bx-moon { opacity: 0; transform: rotate(-90deg); }