/* Base Styles */
:root {
    --primary-color: #d32f2f;
    --secondary-color: #f44336;
    --accent-color: #ff9800;
    --dark-color: #212121;
    --light-color: #f5f5f5;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --warning-color: #ffc107;
    --info-color: #2196f3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #f9f9f9;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    color: var(--dark-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.date-display {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* --- Animation Keyframes --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px);}
  to { opacity: 1; transform: translateY(0);}
}
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.92);}
  100% { opacity: 1; transform: scale(1);}
}
@keyframes ticker {
  0% { transform: translateX(100%);}
  100% { transform: translateX(-100%);}
}
@keyframes glow {
  0% { box-shadow: 0 0 0px var(--accent-color);}
  50% { box-shadow: 0 0 16px var(--accent-color);}
  100% { box-shadow: 0 0 0px var(--accent-color);}
}

/* --- News Ticker --- */
.news-ticker {
  background: var(--dark-color);
  color: white;
  padding: 0.5rem 0;
  font-size: 1rem;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  animation: fadeInUp 0.7s;
}
.ticker-label {
  background: var(--accent-color);
  color: var(--dark-color);
  padding: 0.2rem 0.8rem;
  font-weight: 700;
  display: inline-block;
  margin-right: 1rem;
  border-radius: 3px;
  position: relative;
  z-index: 2;
  animation: glow 2s infinite;
}
.news-ticker span {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker 18s linear infinite;
  font-size: 1.08rem;
  letter-spacing: 0.5px;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 2rem auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 0 20px;
}

/* Left Section */
.left-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.headernews {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem;
    margin-bottom: 1rem;
}

.headernews h2 {
    margin: 0;
    font-size: 1.5rem;
}

.headernews i {
    margin-right: 0.5rem;
}

/* News Articles */
.news-category {
    margin-bottom: 2rem;
}

.category-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #f5f5f5;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 1rem;
}

.category-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.category-header i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.news-article {
  display: flex;
  padding: 1.2rem;
  border-bottom: 1px solid var(--border-color);
  background: #fff;
  border-radius: 10px;
  margin-bottom: 1.2rem;
  box-shadow: 0 2px 12px rgba(44,62,80,0.07);
  transition: box-shadow 0.3s, transform 0.3s, background 0.3s;
  animation: fadeInUp 0.7s cubic-bezier(.39,.575,.565,1) both;
}

.news-article:hover {
  box-shadow: 0 8px 32px rgba(44,62,80,0.13);
  transform: translateY(-6px) scale(1.02);
  background: #f5faff;
}

.article-icon {
  font-size: 2rem;
  margin-right: 1.2rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px #ff980055);
  animation: popIn 0.7s;
}

.article-content h4 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  animation: fadeInUp 0.8s;
}

.article-content p {
  margin-bottom: 1.2rem;
  color: var(--text-color);
  font-size: 1.05rem;
  line-height: 1.8;
  text-shadow: 0 1px 1px rgba(92, 41, 41, 0.05);
  transition: background-color 0.3s;
}

.article-content p:hover {
  background-color: rgba(109, 11, 11, 0.05);
  border-radius: 3px;
}

/* Newsletter Form */
.newsletter-form {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin: 2rem 0;
    text-align: center;
    border: 1px solid var(--border-color);
}

.newsletter-form h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.newsletter-form p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.form-group {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.newsletter-form input {
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    width: 70%;
    max-width: 400px;
    outline: none;
    transition: border 0.3s ease;
}

.newsletter-form input:focus {
    border-color: var(--primary-color);
}

.newsletter-form button {
    padding: 0.8rem 1.5rem;
    background: var(--primary-color);
    border: none;
    border-radius: 0 4px 4px 0;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: var(--secondary-color);
}

.privacy-note {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Right Section */
.right-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.right-section .header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem;
    border-radius: 8px 8px 0 0;
}

.right-section .header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.right-section .header i {
    margin-right: 0.5rem;
}

.video-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.video-wrapper {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  animation: fadeInUp 0.7s;
}

.video-wrapper iframe {
    width: 100%;
    height: 300px;
    border: none;
}

.video-caption {
  padding: 0.8rem;
  background: #f5f5f5;
  font-size: 1rem;
  color: var(--text-light);
  text-align: center;
}

/* Trending Now */
.trending-now {
  background: #fff;
  border-radius: 10px;
  padding: 1.2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  animation: fadeInUp 0.7s;
}

.trending-now h3 {
  margin-bottom: 1rem;
  font-size: 1.18rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
}

.trending-now i {
    margin-right: 0.5rem;
}

.trending-list {
    list-style: none;
}

.trending-list li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border-color);
  display: flex;
  align-items: center;
  font-size: 1.05rem;
  transition: background 0.2s;
}

.trending-list li:hover {
  background: #fff3e0;
}

.trending-list li:before {
  content: "•";
  color: var(--primary-color);
  margin-right: 0.5rem;
}

.trending-list li:last-child {
    border-bottom: none;
}

/* Loading Spinner */
.loading-spinner {
  background: #fff;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  animation: fadeInUp 0.7s;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 4px solid var(--primary-color);
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}

/* --- News Popup --- */
.news-popup {
  position: fixed;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  background: #fff;
  border: 2px solid #444;
  box-shadow: 0px 8px 32px rgba(0,0,0,0.18);
  padding: 24px 18px;
  z-index: 1000;
  display: none;
  border-radius: 14px;
  animation: popIn 0.5s;
}

.news-popup h3 {
  margin-top: 0;
  color: var(--primary-color);
}

.news-popup-close {
  float: right;
  cursor: pointer;
  font-weight: bold;
  font-size: 20px;
  color: red;
  transition: color 0.2s;
}

.news-popup-close:hover {
  color: var(--primary-color);
}

/* Footer */
.site-footer {
  background: var(--dark-color);
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
  animation: fadeInUp 0.7s;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.footer-links a {
  color: white;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

.social-links {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.social-links a {
  color: white;
  font-size: 1.2rem;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.social-links a:hover {
  opacity: 1;
  color: var(--accent-color);
}

.copyright {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 1rem;
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--primary-color);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 999;
  animation: fadeInUp 0.7s;
}

.back-to-top:hover {
  background: var(--secondary-color);
  transform: scale(1.1);
}

.back-to-top i {
  font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 992px) {
  .main-container {
    grid-template-columns: 1fr;
  }
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .social-links {
    justify-content: center;
  }
}
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 0.5rem;
  }
  .form-group {
    flex-direction: column;
    align-items: center;
  }
  .newsletter-form input {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 0.5rem;
  }
  .newsletter-form button {
    border-radius: 4px;
    width: 100%;
    max-width: 400px;
  }
  .video-wrapper iframe {
    height: 220px;
  }
  .main-container {
    padding: 0 5px;
    gap: 1rem;
  }
  .news-article {
    padding: 0.7rem;
    font-size: 0.98rem;
  }
  .trending-now {
    padding: 0.7rem;
  }
}
@media (max-width: 576px) {
  .news-article {
    flex-direction: column;
    padding: 0.6rem;
  }
  .article-icon {
    margin-bottom: 0.5rem;
  }
  .video-wrapper iframe {
    height: 140px;
  }
  .trending-now {
    padding: 0.5rem;
  }
  .buttonhome {
    width: 100%;
    font-size: 1.1rem;
    margin-bottom: 10px;
  }
}