/* CSS Custom Properties (Variables) for Blue Christmas and White */
:root {
  --primary-color: #1E90FF; /* Dodger blue as dominant */
  --secondary-color: #4682B4; /* Steel blue for depth */
  --accent-red: #DC143C; /* Christmas red for accents */
  --accent-green: #228B22; /* Christmas green for highlights */
  --white-bg: #FFFFFF; /* Pure white for backgrounds */
  --light-blue: #E0F6FF; /* Light blue-tinted white */
  --text-color: #2C2C2C; /* Charcoal for contrast on white */
  --shadow-light: 0 6px 18px rgba(30, 144, 255, 0.2); /* Blue-tinted shadows */
  --shadow-deep: 0 12px 36px rgba(30, 144, 255, 0.3); /* Deeper blue shadows */
  --border-radius: 16px;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Roboto', sans-serif;
  --transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-green) 100%);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  line-height: 1.8;
  color: var(--text-color);
  background: var(--white-bg); /* Clean white base */
  background-image: var(--gradient-primary); /* Subtle blue gradient overlay */
  background-blend-mode: multiply;
  font-size: 16px;
  overflow-x: hidden;
  animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(30, 144, 255, 0.3);
}

p, li {
  margin-bottom: 1.2rem;
  color: var(--text-color);
}

a {
  color: var(--accent-red);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
  position: relative;
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: width 0.3s ease;
}

a:hover::after, a:focus::after {
  width: 100%;
}

/* Header */
header {
  background: var(--gradient-primary);
  color: var(--white-bg);
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-deep);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(15px);
  border-bottom: 3px solid var(--accent-red);
}

.logo {
  display: flex;
  align-items: center;
  position: relative;
}

.logo img {
  max-height: 70px;
  width: auto;
  margin-right: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  border: 2px solid rgba(255, 255, 255, 0.8);
  display: block !important; /* Ensure visibility */
  opacity: 1 !important;
  visibility: visible !important;
}

.logo img:hover {
  transform: scale(1.1) rotate(2deg);
  box-shadow: var(--shadow-deep);
}

nav {
  display: flex;
  gap: 2.5rem;
}

nav a {
  color: var(--white-bg);
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  background: rgba(255, 255, 255, 0.15);
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-accent);
  transition: left 0.4s ease;
  z-index: -1;
}

nav a:hover::before, nav a:focus::before {
  left: 0;
}

nav a:hover, nav a:focus {
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* Main Content */
main {
  max-width: 1500px;
  margin: 0 auto;
  padding: 4rem 3rem;
  display: grid;
  gap: 4rem;
}

/* Intro Section */
#intro {
  text-align: center;
  background: var(--white-bg);
  padding: 4rem 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-deep);
  position: relative;
  overflow: hidden;
  border: 2px solid var(--primary-color);
}

#intro::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(30, 144, 255, 0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#intro h2 {
  font-size: 3rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
  text-shadow: 2px 2px 4px rgba(30, 144, 255, 0.3);
}

#intro img {
  margin-top: 2rem;
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: var(--transition);
}

#intro img:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-deep);
}

/* Featured Articles */
#featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 3rem;
}

.article {
  background: var(--white-bg);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  border: 1px solid rgba(30, 144, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-accent);
}

.article:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-deep);
}

.article img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.article img:hover {
  filter: brightness(1.2) contrast(1.1);
}

.article h3 {
  color: var(--primary-color);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 3rem;
}

.gallery-item {
  background: var(--white-bg);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--light-blue);
  position: relative;
}

.gallery-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.gallery-item:hover::after {
  transform: scaleX(1);
}

.gallery-item:hover {
  transform: translateY(-8px) rotate(1deg);
  box-shadow: var(--shadow-deep);
}

.gallery-item img {
  max-height: 200px;
  width: auto;
  margin-bottom: 1.5rem;
  border-radius: var(--border-radius);
  filter: sepia(0.1) brightness(1.1);
  transition: var(--transition);
}

.gallery-item img:hover {
  filter: sepia(0) brightness(1.3);
}

.gallery-item h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  max-width: 700px;
  gap: 1.5rem;
  background: var(--white-bg);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-deep);
  border: 2px solid var(--primary-color);
}

input, textarea, select, button {
  padding: 1.2rem;
  border: 2px solid var(--light-blue);
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  font-family: var(--font-body);
  transition: var(--transition);
  background: var(--white-bg);
  position: relative;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 12px rgba(30, 144, 255, 0.4);
  background: var(--light-blue);
  transform: translateY(-2px);
}

button {
  background: var(--gradient-primary);
  color: var(--white-bg);
  border: none;
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: var(--shadow-light);
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-accent);
  transition: left 0.4s ease;
}

button:hover::before {
  left: 0;
}

button:hover, button:focus {
  transform: translateY(-3px);
  box-shadow: var(--shadow-deep);
}

/* Comments */
#comments-list p {
  background: var(--white-bg);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  border-left: 6px solid var(--accent-red);
  font-style: italic;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
}

#comments-list p:hover {
  transform: translateX(5px);
}

/* Call-to-Action */
#cta {
  background: var(--gradient-accent);
  color: var(--white-bg);
  padding: 3rem;
  text-align: center;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-deep);
  margin: 3rem 0;
  position: relative;
  overflow: hidden;
}

#cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

#cta h2 {
  color: var(--white-bg);
  margin-bottom: 1.5rem;
  font-size: 2.2rem;
}

/* Footer */
footer {
  background: var(--gradient-primary);
  color: var(--white-bg);
  text-align: center;
  padding: 3rem;
  margin-top: 4rem;
  position: relative;
  border-top: 4px solid var(--accent-red);
}

footer p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

footer a {
  color: var(--accent-red);
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
  main {
    padding: 3rem 2rem;
  }
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
  nav {
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
  }
  main {
    padding: 2rem 1rem;
    gap: 3rem;
  }
  #intro h2 {
    font-size: 2.5rem;
  }
  .article {
    padding: 2rem;
  }
  .gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1, h2 {
    font-size: 2rem;
  }
  nav a {
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
  }
  form {
    padding: 2rem;
  }
  footer {
    padding: 2rem;
  }
}