/* ========================================
   Sri Nanna Hridayam Trust - Stylesheet
   ======================================== */

:root {
  --saffron: #c9a84c;
  --saffron-light: #e2cf96;
  --saffron-dark: #a8873a;
  --maroon: #3b2a1a;
  --maroon-light: #5c4433;
  --cream: #faf6ef;
  --cream-dark: #f0e8da;
  --gold: #c9a84c;
  --text-dark: #2a1e12;
  --text-body: #4a3c2e;
  --text-muted: #7a6b5a;
  --white: #ffffff;
  --border: #e0d5c4;
  --shadow: 0 2px 20px rgba(59, 42, 26, 0.08);
  --shadow-lg: 0 8px 40px rgba(59, 42, 26, 0.12);
  --radius: 8px;
  --transition: 0.3s ease;
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 400;
  color: var(--text-body);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--text-dark);
  line-height: 1.3;
}

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

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

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

/* ========== Navbar ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(253, 248, 240, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--maroon);
}

.nav-logo-img {
  height: 45px;
  width: auto;
  border-radius: 50%;
  object-fit: contain;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--saffron);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--maroon);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  transition: var(--transition);
}

/* ========== Hero ========== */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b2a1a 0%, #2a1e12 50%, #1a1008 100%);
  text-align: center;
  overflow: hidden;
  margin-top: 70px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(201, 168, 76, 0.18) 0%, transparent 70%);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem 1rem;
}

.hero-sanskrit {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--saffron-light);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--white);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero-subtitle strong {
  color: var(--saffron-light);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== Buttons ========== */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  background: var(--saffron-dark);
  border-color: var(--saffron-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--maroon);
  border-color: var(--maroon);
}

.btn-secondary:hover {
  background: var(--maroon);
  color: var(--white);
  transform: translateY(-2px);
}

/* ========== Video Section ========== */
.video-section {
  background: var(--white);
}

.video-wrapper {
  max-width: 800px;
  margin: 2.5rem auto 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--cream-dark);
}

.video-wrapper video {
  width: 100%;
  display: block;
  background: #000;
}

/* ========== Sections ========== */
.section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: var(--maroon);
}

.section-title.center {
  text-align: center;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 500px;
}

.section-desc.center {
  text-align: center;
  margin: 0 auto;
}

/* ========== About Preview ========== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: center;
}

.about-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--white);
}

.about-text p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.about-text .btn {
  margin-top: 0.5rem;
}

/* ========== Photo Carousel ========== */
.photo-carousel-section {
  background: var(--cream-dark);
}

.carousel-wrapper {
  position: relative;
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.carousel-track-container {
  overflow: hidden;
  border-radius: var(--radius);
  flex: 1;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 500px;
  object-fit: contain;
  background: #2a1e12;
  border-radius: var(--radius);
}

.carousel-btn {
  position: relative;
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--maroon);
  background: var(--white);
  color: var(--maroon);
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
  line-height: 1;
  padding-bottom: 3px;
}

.carousel-btn:hover {
  background: var(--maroon);
  color: var(--white);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  padding: 0;
}

.carousel-dot.active {
  background: var(--saffron);
  transform: scale(1.2);
}

.carousel-dot:hover {
  background: var(--saffron-dark);
}

/* ========== Activities ========== */
.activities-section {
  background: var(--cream-dark);
}

.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.activity-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.activity-video-wrapper {
  width: 100%;
  background: #000;
}

.activity-video-wrapper video {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.activity-card-body {
  padding: 1.5rem;
}

.activity-card-body h3 {
  font-size: 1.3rem;
  color: var(--maroon);
  margin-bottom: 0.5rem;
}

.activity-card-body p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ========== Mission ========== */
.mission-section {
  background: var(--cream-dark);
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.mission-card {
  background: var(--white);
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform var(--transition);
}

.mission-card:hover {
  transform: translateY(-4px);
}

.mission-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.mission-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: var(--maroon);
}

.mission-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ========== Blog Preview ========== */
.blog-preview-section {
  background: var(--white);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.blog-card {
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-card-body {
  padding: 1.5rem;
}

.blog-card-date {
  font-size: 0.8rem;
  color: var(--saffron-dark);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.blog-card-title {
  font-size: 1.3rem;
  margin: 0.5rem 0;
  color: var(--maroon);
}

.blog-card-excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.blog-card-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--saffron-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.blog-card-link:hover {
  color: var(--maroon);
}

.no-posts {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  grid-column: 1 / -1;
  padding: 3rem 0;
}

/* ========== Quote Section ========== */
.quote-section {
  background: linear-gradient(135deg, #3b2a1a 0%, #2a1e12 100%);
  padding: 5rem 0;
  text-align: center;
}

.featured-quote p {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-style: italic;
  color: var(--white);
  max-width: 700px;
  margin: 0 auto 1.5rem;
  line-height: 1.5;
}

.featured-quote cite {
  font-style: normal;
  font-size: 1rem;
  color: var(--saffron-light);
  letter-spacing: 0.05em;
}

/* ========== Footer ========== */
.footer {
  background: var(--text-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer h4 {
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.footer p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer ul a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer ul a:hover {
  color: var(--saffron-light);
}

.footer-bottom {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
}

/* ========== Blog Page ========== */
.page-header {
  background: linear-gradient(135deg, #3b2a1a 0%, #2a1e12 100%);
  padding: 8rem 0 3rem;
  text-align: center;
  margin-top: 70px;
}

.page-header h1 {
  color: var(--white);
  font-size: 2.5rem;
}

.page-header p {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.5rem;
}

.blog-list-section {
  padding: 3rem 0 5rem;
}

/* ========== Blog Post Page ========== */
.blog-post-header {
  background: linear-gradient(135deg, #3b2a1a 0%, #2a1e12 100%);
  padding: 8rem 0 3rem;
  margin-top: 70px;
}

.blog-post-header .container {
  max-width: 800px;
}

.blog-post-header h1 {
  color: var(--white);
  font-size: 2.2rem;
  line-height: 1.3;
}

.blog-post-meta {
  color: var(--saffron-light);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.blog-post-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.blog-post-content .post-image {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.blog-post-content p {
  font-size: 1.08rem;
  margin-bottom: 1.5rem;
  line-height: 1.85;
}

.blog-post-content h2 {
  font-size: 1.6rem;
  margin: 2rem 0 1rem;
  color: var(--maroon);
}

.blog-post-content blockquote {
  border-left: 3px solid var(--saffron);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--cream-dark);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--maroon);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--saffron-dark);
  font-weight: 500;
  margin-bottom: 2rem;
}

.back-link:hover {
  color: var(--maroon);
}

/* ========== About Page ========== */
.about-section {
  padding: 4rem 0;
}

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

.about-section .about-full p {
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}

.about-section .about-full h2 {
  font-size: 1.8rem;
  color: var(--maroon);
  margin: 2.5rem 0 1rem;
}

.about-image-large {
  width: 100%;
  max-width: 500px;
  margin: 0 auto 2rem;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--white);
}

/* ========== Gallery Page ========== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 3rem 0 5rem;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform var(--transition);
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

/* ========== Contact Page ========== */
.contact-section {
  padding: 3rem 0 5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.contact-info h3 {
  font-size: 1.4rem;
  color: var(--maroon);
  margin-bottom: 1rem;
}

.contact-info p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.contact-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  color: var(--text-dark);
}

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

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--saffron);
}

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

/* ========== Admin Page ========== */
.admin-section {
  padding: 3rem 0 5rem;
}

.admin-form {
  max-width: 700px;
  margin: 0 auto;
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.admin-form h2 {
  font-size: 1.8rem;
  color: var(--maroon);
  margin-bottom: 1.5rem;
}

.admin-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  color: var(--text-dark);
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  background: var(--cream);
  transition: border-color var(--transition);
}

.admin-form input:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: var(--saffron);
  background: var(--white);
}

.admin-form textarea {
  min-height: 250px;
  resize: vertical;
}

.admin-form .btn {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  border: none;
}

.admin-posts {
  max-width: 700px;
  margin: 2rem auto 0;
}

.admin-post-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
}

.admin-post-item h4 {
  font-size: 1rem;
  color: var(--text-dark);
}

.admin-post-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-delete-btn {
  background: none;
  border: 1px solid #d44;
  color: #d44;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all var(--transition);
}

.admin-delete-btn:hover {
  background: #d44;
  color: var(--white);
}

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--maroon);
  color: var(--white);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 9999;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-image {
    text-align: center;
  }

  .about-image img {
    max-width: 300px;
    margin: 0 auto;
  }

  .mission-grid {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .activities-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 70vh;
  }

  .carousel-slide img {
    height: 300px;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
  }
}
