/* CSS Custom Properties */
:root {
  --primary-color: #355E3B;
  --primary-dark: #2A4A2F;
  --primary-light: #4A7350;
  --secondary-color: #D4AF37;
  --accent-color: #8B4513;
  --text-dark: #2C3E50;
  --text-light: #FFFFFF;
  --text-muted: #6C757D;
  --background-light: #F8F9FA;
  --background-dark: #1A1A1A;
  --border-color: #E5E5E5;
  --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.2);
  --border-radius: 8px;
  --transition: all 0.3s ease;
  --font-primary: 'Cinzel', serif;
  --font-secondary: 'Inter', sans-serif;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-secondary);
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--background-light);
  overflow-x: hidden;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  opacity: 0.9;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border: none;
  border-radius: var(--border-radius);
  font-family: var(--font-secondary);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--text-light);
  box-shadow: var(--shadow-light);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-secondary {
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--text-light);
}

.btn-secondary:hover {
  background: var(--text-light);
  color: var(--primary-color);
}

.btn-nav {
  background: var(--secondary-color);
  color: var(--text-dark);
  padding: 8px 20px;
  border-radius: 20px;
}

.btn-nav:hover {
  background: #B8941F;
  transform: scale(1.05);
}

/* Hero Slider */
.hero-slider {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(53, 94, 59, 0.7) 0%,
    rgba(42, 74, 47, 0.8) 50%,
    rgba(26, 26, 26, 0.9) 100%
  );
}

/* Header */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(53, 94, 59, 0.95);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  padding: 1rem 0;
}

.main-header.scrolled {
  background: rgba(53, 94, 59, 0.98);
  box-shadow: var(--shadow-medium);
}

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

.logo {
  color: var(--text-light);
}

.diocese {
  font-size: 0.875rem;
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

.logo h1 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  margin: 0;
  font-weight: 700;
}

/* Navigation */
.main-nav {
  position: relative;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-menu a:not(.btn-nav):hover {
  color: var(--secondary-color);
}

.nav-menu a:not(.btn-nav)::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: width 0.3s ease;
}

.nav-menu a:not(.btn-nav):hover::after {
  width: 100%;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-light);
  transition: var(--transition);
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Section */
.hero-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.hero-content {
  text-align: center;
  color: var(--text-light);
  max-width: 800px;
  padding: 2rem;
}

.hero-title {
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease 0.3s both;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: fadeInUp 1s ease 0.6s both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease 0.9s both;
}

/* Section Styles */
section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.section-divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  margin: 0 auto;
  border-radius: 2px;
}

/* About Section */
.about-section {
  background: var(--text-light);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-text p {
  font-size: 1.125rem;
  text-align: center;
  color: var(--text-dark);
  opacity: 0.8;
}

/* Schedule Section */
.schedule-section {
  background: var(--background-light);
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.schedule-item {
  background: var(--text-light);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  border-left: 4px solid var(--primary-color);
  transition: var(--transition);
}

.schedule-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.schedule-item h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.schedule-date {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.schedule-note {
  text-align: center;
  background: var(--primary-color);
  color: var(--text-light);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  max-width: 600px;
  margin: 0 auto;
}

/* Events Section */
.events-section {
  background: var(--text-light);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.event-item {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--text-light);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.event-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--secondary-color);
}

.event-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-heavy);
}

.event-item h3 {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.event-description {
  margin-bottom: 1.5rem;
  line-height: 1.6;
  opacity: 0.9;
}

.event-date {
  font-weight: 500;
  color: var(--secondary-color);
}

/* Footer */
.main-footer {
  background: var(--primary-dark);
  color: var(--text-light);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-info h3,
.footer-contact h4 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.footer-info p,
.footer-contact p {
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.social-links {
  margin-top: 1rem;
}

.social-links a {
  color: var(--text-light);
  text-decoration: none;
  margin-right: 1rem;
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.7;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.8s ease both;
}

/* Loading States */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  color: var(--text-muted);
}

.loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error States */
.error-message {
  background: #FFF5F5;
  color: #C53030;
  padding: 1rem;
  border-radius: var(--border-radius);
  border-left: 4px solid #C53030;
  text-align: center;
  margin: 2rem auto;
  max-width: 500px;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.empty-state h3 {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  /* Header Mobile */
  .hamburger {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--primary-dark);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.3s ease;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-menu li {
    opacity: 0;
    animation: fadeInRight 0.3s ease forwards;
  }
  
  .nav-menu.active li {
    animation-delay: calc(var(--i) * 0.1s);
  }
  
  .nav-menu a {
    font-size: 1.25rem;
  }
  
  /* Hero Mobile */
  .hero-content {
    padding: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 250px;
  }
  
  /* Sections Mobile */
  section {
    padding: 4rem 0;
  }
  
  .section-header {
    margin-bottom: 3rem;
  }
  
  /* Grid Mobile */
  .schedule-grid,
  .events-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* CSS Variables for Mobile Menu Animation */
.nav-menu li:nth-child(1) { --i: 0; }
.nav-menu li:nth-child(2) { --i: 1; }
.nav-menu li:nth-child(3) { --i: 2; }
.nav-menu li:nth-child(4) { --i: 3; }
.nav-menu li:nth-child(5) { --i: 4; }
.nav-menu li:nth-child(6) { --i: 5; }

/* Contact Page Specific Styles */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.contact-form {
  background: var(--text-light);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
}

.contact-form h2 {
  color: var(--primary-color);
  margin-bottom: 2rem;
  text-align: center;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-family: var(--font-secondary);
  font-size: 1rem;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(53, 94, 59, 0.1);
}

.contact-form textarea {
  height: 120px;
  resize: vertical;
}

.contact-form button {
  width: 100%;
  background: var(--primary-color);
  color: var(--text-light);
  padding: 1rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.contact-form button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.contact-map {
  background: var(--text-light);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
}

.contact-map h2 {
  color: var(--primary-color);
  margin-bottom: 2rem;
  text-align: center;
}

.contact-map iframe {
  border-radius: var(--border-radius);
  width: 100%;
  height: 400px;
}

@media (max-width: 768px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Admin/Manage Page Styles */
.manage-container {
  max-width: 1000px;
  margin: 120px auto 2rem;
  padding: 2rem;
}

.manage-form {
  background: var(--primary-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-medium);
}

.manage-form h2 {
  color: var(--text-light);
  margin-bottom: 2rem;
  text-align: center;
}

.manage-form input,
.manage-form textarea {
  width: 100%;
  padding: 1rem;
  margin: 0.5rem 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--border-radius);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-dark);
  font-size: 1rem;
  transition: var(--transition);
}

.manage-form input:focus,
.manage-form textarea:focus {
  outline: none;
  border-color: var(--text-light);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.manage-form textarea {
  min-height: 120px;
  resize: vertical;
}

.manage-form button {
  background: var(--text-light);
  color: var(--primary-color);
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 1rem;
}

.manage-form button:hover {
  background: var(--background-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

.events-list {
  background: var(--primary-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  color: var(--text-light);
  box-shadow: var(--shadow-medium);
  margin-bottom: 2rem;
}

.events-list h2 {
  color: var(--text-light);
  margin-bottom: 2rem;
  text-align: center;
}

.event-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.5rem 0;
}

.event-item:last-child {
  border-bottom: none;
}

.event-item button {
  background: var(--secondary-color);
  color: var(--text-dark);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  margin-right: 0.5rem;
  margin-top: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.event-item button:hover {
  background: #B8941F;
  transform: scale(1.05);
}

/* Success/Thank you message styles */
#thankyou_message {
  background: var(--primary-color);
  color: var(--text-light);
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow-medium);
}

#thankyou_message h3 {
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* 404 Page Integration */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--text-light);
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease;
}

.error-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease 0.2s both;
}

.error-description {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 500px;
  animation: fadeInUp 1s ease 0.4s both;
}

.error-actions {
  animation: fadeInUp 1s ease 0.6s both;
}