/* 
 * Bao Nguoi Viet - Main Stylesheet
 * Vietnamese News Website in Philippines
 */

/* Base Styles & Variables */
:root {
  --primary: #d62828;
  --secondary: #003049;
  --accent: #f77f00;
  --light: #fcf8f3;
  --dark: #252422;
  --gray: #ebebeb;
  --gray-dark: #767676;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
  --font-heading: 'Montserrat', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --border-radius: 4px;
  --transition: all 0.3s ease;
}

/* Reset & Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--light);
  font-size: 16px;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: var(--primary);
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

section {
  padding: 80px 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--secondary);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}

h2:after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--primary);
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: #bf2121;
  color: white;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: white;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.875rem;
}

/* Header & Navigation */
header {
  background-color: white;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
}

.logo a {
  display: block;
}

.main-nav ul {
  display: flex;
  list-style: none;
}

.main-nav li {
  margin-left: 25px;
}

.main-nav a {
  color: var(--dark);
  font-weight: 500;
  padding: 5px 0;
  position: relative;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--primary);
}

.main-nav a.active:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background-color: var(--dark);
  margin: 5px 0;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 48, 73, 0.85), rgba(0, 48, 73, 0.85)), url('../images/hero-bg.jpg') no-repeat center center/cover;
  color: white;
  text-align: center;
  padding: 120px 0;
}

.hero h1 {
  color: white;
  font-size: 3.5rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 30px;
}

/* Featured News Section */
.featured-news {
  background-color: white;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.news-card {
  border-radius: var(--border-radius);
  overflow: hidden;
  background-color: white;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  height: 200px;
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .card-img img {
  transform: scale(1.05);
}

.card-content {
  padding: 20px;
}

.card-content h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.card-content .meta {
  color: var(--gray-dark);
  font-size: 0.875rem;
  margin-bottom: 15px;
}

.read-more {
  font-weight: 600;
  display: inline-block;
  margin-top: 10px;
}

.news-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.news-card.featured .card-img {
  height: 100%;
}

.view-all {
  text-align: center;
}

/* Community Updates Section */
.community-updates {
  background-color: var(--gray);
}

.updates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.update-card {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.update-card .icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background-color: rgba(214, 40, 40, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.update-card h3 {
  margin-bottom: 20px;
}

.update-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: 20px;
}

.update-card li {
  padding: 10px 0;
  border-bottom: 1px solid var(--gray);
}

.update-card .date {
  background-color: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  margin-right: 10px;
}

/* Entertainment & Games Section */
.entertainment {
  background-color: white;
}

.section-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
}

.entertainment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
}

.entertainment-card {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.entertainment-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.entertainment-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.entertainment-card h3,
.entertainment-card p {
  padding: 0 20px;
}

.entertainment-card h3 {
  padding-top: 20px;
}

.entertainment-card p {
  padding-bottom: 20px;
  font-size: 0.95rem;
}

/* Newsletter Section */
.newsletter {
  background: linear-gradient(rgba(0, 48, 73, 0.9), rgba(0, 48, 73, 0.9)), url('../images/newsletter-bg.jpg') no-repeat center center/cover;
  color: white;
  text-align: center;
}

.newsletter-content {
  max-width: 600px;
  margin: 0 auto;
}

.newsletter h2 {
  color: white;
}

.newsletter h2:after {
  background-color: white;
}

.newsletter-form {
  margin-top: 30px;
}

.form-group {
  display: flex;
  margin-bottom: 15px;
}

.form-group input {
  flex: 1;
  padding: 12px 15px;
  border: none;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  font-size: 1rem;
}

.form-group button {
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.form-check {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.form-check input {
  margin-right: 10px;
}

/* Footer */
footer {
  background-color: var(--secondary);
  color: white;
  padding-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo p {
  margin: 15px 0;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  font-size: 18px;
  transition: var(--transition);
}

.social-icons a:hover {
  background-color: var(--primary);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.link-group h4 {
  color: white;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.link-group ul {
  list-style: none;
}

.link-group li {
  margin-bottom: 8px;
}

.link-group a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.link-group a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-icon {
  opacity: 0.8;
}

/* Responsive Styles */
@media (max-width: 992px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .hero {
    padding: 80px 0;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .news-card.featured {
    grid-template-columns: 1fr;
  }
  
  .news-card.featured .card-img {
    height: 250px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .footer-links {
    gap: 15px;
  }
}

@media (max-width: 768px) {
  section {
    padding: 60px 0;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .main-nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: white;
    box-shadow: var(--shadow-md);
    padding: 20px 0;
  }
  
  .main-nav ul.active {
    display: flex;
  }
  
  .main-nav li {
    margin: 0;
  }
  
  .main-nav a {
    display: block;
    padding: 12px 20px;
  }
  
  .news-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  
  .updates-grid,
  .entertainment-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-bottom p {
    margin-bottom: 10px;
  }
}

@media (max-width: 576px) {
  .form-group {
    flex-direction: column;
  }
  
  .form-group input,
  .form-group button {
    width: 100%;
    border-radius: var(--border-radius);
  }
  
  .form-group button {
    margin-top: 10px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
}
