/* Google Font - Lora */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* =========================================================
   1. Root Variables (Design System)
   ========================================================= */
:root {
  --primary-color: #3399cc;
  --secondary-color: #33cc99;
  --primary-hover: #000000;
  --accent-color: #FFD700;
  --title-color: #FF6347;
  --text-dark: #2c3e50;
  --bg-light: #f8f9fa;

  --card-color-one: #f7fbff;
  --card-color-two: #fffbf7;
  --card-color-three: #fffff7;

  --card-nearby-border:       #D8CFC4;
  --card-nearby-h1-bg:        #FAF5EE;
  --card-nearby-h1-left:      #9B7040;
  --card-nearby-h2-bg:        #F5EEE4;
  --card-nearby-h2-left:      #7A5230;
  --card-nearby-h3-bg:        #FFF3E0;
  --card-nearby-h3-left:      #C07A1A;
  --card-nearby-body-bg:      #fffbf7;
  --card-nearby-row-divider:  #F5EEE4;
  --card-nearby-text:         #7A5230;
  --card-nearby-link:         #7A5230;
  --card-nearby-link-hover:   #5C3D22;
  --card-nearby-num:          #999;
  --card-nearby-dist:         #888;

  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* =========================================================
   2. Base Styles
   ========================================================= */
body {
  font-family: 'Lora', serif;
  font-size: 18px;
  color: var(--text-dark);
  padding-top: 0;
}

a { 
  text-decoration: none; 
}

.unselectable {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* =========================================================
   3. Layout
   ========================================================= */

/* Navbar */
.navbar {
  background-color: var(--primary-color) !important;
  position: relative;
  top: 0;
  width: 100%;
  z-index: 1030;
  transition: transform 0.3s ease-in-out;
  min-height: 70px;
}

.navbar a { 
  color: white !important; 
  font-size: 20px; 
}

.navbar-nav .nav-link:hover {
  background-color: rgba(228, 241, 254, 0.2);
  border-radius: 4px;
}

.navbar-logo {
  height: 40px; 
  width: 40px;
  border-radius: 50%; 
  object-fit: cover;
  transition: transform 0.3s ease-in-out;
}

.navbar-logo:hover { 
  transform: scale(1.2); 
}

.dropdown-menu { 
  z-index: 1050; 
}

.dropdown-menu a { 
  color: black !important; 
  font-size: 18px; 
}

.dropdown-menu .dropdown-item:hover { 
  background-color: #f8f9fa; 
}

/* Banner */
.site-banner {
  width: 100%; 
  height: 400px;
  background-image: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.2)), 
                    url('../images/banner-image.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  display: flex; 
  align-items: center; 
  justify-content: center;
  color: white; 
  text-align: center;
}

.banner-container h1,
.banner-container h2,
.banner-container h4 {
  text-shadow: 0 1px 2px rgba(0,0,0,0.9);
  font-family: 'Lora', serif;
}

/* Breadcrumbs */
.breadcrumb {
  background: var(--bg-light);
  border-radius: 0;
  font-size: 13px;
}

.breadcrumb-item a { 
  color: var(--primary-color); 
}

.breadcrumb-item a:hover { 
  color: var(--secondary-color); 
}

/* Table */
.text-wrap {
  word-break: break-word; 
  white-space: normal;
}

/* Footer */
footer {
  background: var(--primary-color);
  margin-top: 3rem;
}

/* =========================================================
   4. Components
   ========================================================= */

/* Navigation Buttons */
.navigation-buttons .btn {
  border-radius: 25px;
  padding: 10px 20px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.navigation-buttons .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(211, 211, 211, 1);
}

/* Language Toggle Button */
.btnlang {
  position: fixed; 
  bottom: 100px; 
  right: 20px;
  z-index: 1000;
  padding: 12px 15px;
  background: var(--primary-color);
  color: white; 
  border: none; 
  border-radius: 50%;
  width: 50px; 
  height: 50px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.btnlang:hover { 
  background: var(--accent-color); 
  transform: scale(1.05); 
}

/* Scroll to Top Button */
.scroll-top {
  position: fixed; 
  bottom: 40px; 
  right: 20px;
  z-index: 1000;
  border-radius: 50%;
  width: 50px; 
  height: 50px;
  opacity: 0; 
  visibility: hidden;
  transition: all 0.3s ease;
}

.scroll-top.show { 
  opacity: 1; 
  visibility: visible; 
}

/* Cards */
.card {
  border: 2px solid #e9ecef;
  border-radius: 12px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Route/content cards — no lift on hover, no overflow clipping */
.card.card-route {
  overflow: visible;
}

.card.card-route:hover {
  transform: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-title {
  color: var(--title-color) !important;
  border-bottom: 2px solid #e9ecef !important;
  font-size: 1.1rem;
}

.card-img-top {
  max-width: 200px; 
  height: auto;
  margin: 0 auto; 
  display: block;
}

/* =========================================================
   CARD BASIC INFO
   ========================================================= */

.card-basic-info {
  border: 1.5px solid #d0e8f5 !important;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --bs-card-spacer-y: 0;
  --bs-card-spacer-x: 0;
  --bs-card-cap-padding-y: 0;
  --bs-card-cap-padding-x: 0;
  padding: 0 !important;
}

.card-basic-header {
  background-color: #e4f2fa;
  border-bottom: 1px solid #b8ddf0;
  border-left: 5px solid #3399cc;
  padding: 0.85rem 1.25rem;
}

.card-basic-title {
  margin: 0;
  font-size: 18px;       /* was 15px in Tamil */
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
}

.card-basic-subtitle {
  margin: 2px 0 0;
  font-size: 13px;       /* was 12px in Tamil */
  color: #2272a0;
}

.card-basic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background-color: var(--card-color-one);
}

.card-basic-cell {
  padding: 1rem 1.25rem;
}

.card-basic-cell.border-right {
  border-right: 1px solid #d0e8f5 !important;
}

.card-basic-cell.border-bottom {
  border-bottom: 1px solid #d0e8f5 !important;
}

.card-basic-label {
  margin: 0 0 3px;
  font-size: 12px;       /* was 11px in Tamil */
  color: #2d5570;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-basic-value {
  margin: 0;
  font-size: 16px;       /* was 14px in Tamil */
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-basic-icon {
  font-size: 16px;       /* was 14px in Tamil */
  color: #3399cc;
  flex-shrink: 0;
}

/* Responsive: stack to single column on mobile */
@media screen and (max-width: 720px) {
  .card-basic-grid {
    grid-template-columns: 1fr;
  }

  .card-basic-cell.border-right {
    border-right: none !important;
  }

  .card-basic-cell.border-bottom {
    border-bottom: 1px solid #d0e8f5 !important;
  }

  .card-basic-cell:not(:last-child) {
    border-bottom: 1px solid #d0e8f5 !important;
  }
}

/* =========================================================
   CARD ADDRESS INFO
   Mirrors the Tamil address-info card layout.
   Layout: header + two-column grid (address | hours/contact)
   The right cell stacks hours on top, contact on bottom.
   ========================================================= */

.card-address-info {
  border: 1.5px solid #d0e8f5 !important;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --bs-card-spacer-y: 0;
  --bs-card-spacer-x: 0;
  --bs-card-cap-padding-y: 0;
  --bs-card-cap-padding-x: 0;
  padding: 0 !important;
}

/* ── Header bar ─────────────────────────────────────────── */
.card-address-header {
  background-color: #e4f2fa;
  border-bottom: 1px solid #b8ddf0;
  border-left: 5px solid #3399cc;
  padding: 0.85rem 1.25rem;
}

.card-address-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  display: flex;
  align-items: center;
}

/* ── Two-column grid ────────────────────────────────────── */
.card-address-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background-color: var(--card-color-one);
}


/* ── Shared cell styles ─────────────────────────────────── */
.card-address-cell {
  padding: 1rem 1.25rem;
}

.card-address-cell.border-right {
  border-right: 1px solid #d0e8f5 !important;
}

/* ── Right cell: flex column so hours + contact stack ───── */
.card-address-cell-right {
  display: flex;
  flex-direction: column;
}

.card-address-hours {
  flex: 1;           /* expands to fill height when contact is absent */
}

/* ── Section labels (Hours / Contact) ───────────────────── */
.card-address-label {
  margin: 0 0 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
}

/* ── Address block text ─────────────────────────────────── */
.card-address-block {
  font-size: 15px;
  color: var(--text-dark);
  line-height: 1.7;
}

/* ── Timing rows (icon + text inline) ──────────────────── */
.card-address-timing-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--text-dark);
}

.card-address-icon {
  font-size: 15px;
  flex-shrink: 0;
}

/* ── Contact divider (top border separates from hours) ──── */
.card-address-contact {
  border-top: 1px solid #dee2e6;
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

/* ── Optional full-width note below both cells ──────────── */
.card-address-note {
  border-radius: 0;
  font-size: 14px;
}

/* ── Responsive: single column on mobile ────────────────── */
@media screen and (max-width: 720px) {
  .card-address-grid {
    grid-template-columns: 1fr;
  }

  .card-address-cell.border-right {
    border-right: none !important;
    border-bottom: 1px solid #d0e8f5 !important;
  }

  .card-address-cell-right {
    border-top: none;
  }
}

/* =========================================================
   CARD-MAP — Google Maps embed card (English)
   Matches the Tamil card-map layout exactly.
   ========================================================= */

/* ── Card shell ─────────────────────────────────────────── */
.card-map {
  border: 1.5px solid #dee2e6;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ── Header ─────────────────────────────────────────────── */
.card-map__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

/* ── Header icon ────────────────────────────────────────── */
.card-map__icon {
  font-size: 1rem;
  color: #e63946;
  flex-shrink: 0;
}

/* ── Header title ───────────────────────────────────────── */
.card-map__title {
  font-size: 1rem;
  font-weight: 600;
  color: #212529;
  line-height: 1.4;
}

/* ── Map body ───────────────────────────────────────────── */
.card-map__body {
  padding: 0.75rem;
}

.card-map__body .ratio {
  border-radius: 0.375rem;
  overflow: hidden;
}

.card-map__body iframe {
  border: 0;
  width: 100%;
  height: 100%;
}

/* =========================================
   NEARBY TEMPLES CARD — English
   Same colour palette as the Tamil version.
   ========================================= */

.card-nearby-info {
  border: 1.5px solid var(--card-nearby-border);
  border-radius: 0.5rem;
  overflow: hidden;
}
.card-nearby-header-siva {
  background-color: var(--card-nearby-h1-bg);
  border-left: 5px solid var(--card-nearby-h1-left);
  border-bottom: 1.5px solid var(--card-nearby-border);
  padding: 0.55rem 1rem;
}
.card-nearby-header-vaishnava {
  background-color: var(--card-nearby-h2-bg);
  border-left: 5px solid var(--card-nearby-h2-left);
  border-bottom: 1.5px solid var(--card-nearby-border);
  border-top: 1.5px solid var(--card-nearby-border);
  padding: 0.55rem 1rem;
}
.card-nearby-header-vaipu {
  background-color: var(--card-nearby-h3-bg);
  border-left: 5px solid var(--card-nearby-h3-left);
  border-bottom: 1.5px solid var(--card-nearby-border);
  border-top: 1.5px solid var(--card-nearby-border);
  padding: 0.55rem 1rem;
}
.card-nearby-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--card-nearby-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-nearby-body {
  background-color: var(--card-nearby-body-bg);
  padding: 0.4rem 0.75rem 0.55rem;
}
.card-nearby-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.33rem 0;
  border-bottom: 1px solid var(--card-nearby-row-divider);
  font-size: 1rem;
}
.card-nearby-row:last-child {
  border-bottom: none;
}
.card-nearby-num {
  min-width: 1.4rem;
  font-size: 0.72rem;
  color: var(--card-nearby-num);
  flex-shrink: 0;
}
.card-nearby-name {
  flex: 1;
}
.card-nearby-name a {
  color: var(--card-nearby-link);
  text-decoration: none;
  transition: color 0.18s ease;
}
.card-nearby-name a:hover {
  color: var(--card-nearby-link-hover);
  text-decoration: underline;
}
.card-nearby-dist {
  font-size: 0.75rem;
  color: var(--card-nearby-dist);
  white-space: nowrap;
  flex-shrink: 0;
}
.card-nearby-map a {
  color: #c0392b;
  font-size: 0.95rem;
}

/* =========================================================
   5. Gallery Section
   ========================================================= */

.temple-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

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

.gallery-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

 .watermark {
      position: absolute;
      bottom: 80px;
      right: 10px;
      padding: 4px 10px;
      font-size: 14px;
      color: #fff;
      font-weight: 700;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8),
                   -1px -1px 2px rgba(0, 0, 0, 0.6);
      letter-spacing: 0.5px;
    }

.gallery-caption {
  position: static;
  background: #f8f9fa;
  color: #000;
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/*=========================================
6. Pillar Gallery - uses same grid as temple-gallery
========================================= */

.gallery-item-pillar {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

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

.gallery-item-pillar img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  transition: transform 0.3s ease;
  border: 3px solid #2c3e50;  /* Professional dark slate */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.gallery-item-pillar:hover img {
  transform: scale(1.1);
}

.gallery-item-pillar {
  position: static;
  background: #f8f9fa;
  color: #000;
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.gallery-item-pillar img {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Optional: Enhance shadow on hover */
.gallery-item-pillar:hover img {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}


/* =========================================================
   7. Decorative Elements
   ========================================================= */

/* Divider */
.divider {
  display: flex; 
  align-items: center; 
  justify-content: center;
  margin: 1rem 0;
}

.divider::before,
.divider::after {
  content: ""; 
  flex: 1;
  border-bottom: 2px solid #fff;
  margin: 0 1rem;
}

.divider-icon {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
}

.travel-tips {background-color: #fef1e4 !important;
              padding:10px; }

/* for ashta veerattan sthalam info card*/
.avsection {background-color: #fef1e4 !important;
              padding:10px; }

/* =========================================================
   8. Animations
   ========================================================= */

.animate {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s forwards;
}

@keyframes fadeInUp {
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }
.delay-3 { animation-delay: 0.9s; }
.delay-4 { animation-delay: 1.2s; }
.delay-5 { animation-delay: 1.5s; }

/* =========================================================
   9. Card Color Utilities
   ========================================================= */

.one, .four, .seven, .ten, .thirteen { 
  background-color: var(--card-color-one); 
  padding: 10px; 
}

.two, .five, .eight, .eleven { 
  background-color: var(--card-color-two); 
  padding: 10px; 
}

.three, .six, .nine, .twelve { 
  background-color: var(--card-color-three); 
  padding: 10px; 
}

/* =========================================================
   10. Shared Route Stop Card Styles
   ========================================================= */


        .route-stops {
          display: grid;
          grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
          gap: 0.75rem;
          margin-top: 0.5rem;
        }
        .route-stop-card {
          display: flex;
          align-items: flex-start;
          gap: 0.65rem;
          background: #fff5f5;
          border: 1px solid #f5c2c7;
          border-left: 4px solid #dc3545;
          border-radius: 0.5rem;
          padding: 0.6rem 0.75rem;
          transition: box-shadow 0.15s, background 0.15s;
        }
        .route-stop-card:hover {
          box-shadow: 0 2px 8px rgba(220,53,69,0.15);
          background: #fde8ea;
        }
        .route-stop-card.ncn {
          background: #f0f4ff;
          border-color: #c7d4f5;
          border-left-color: #0d6efd;
        }
        .route-stop-card.ncn:hover {
          box-shadow: 0 2px 8px rgba(13,110,253,0.15);
          background: #dce6ff;
        }
        .route-stop-num {
          flex-shrink: 0;
          width: 1.6rem;
          height: 1.6rem;
          background: #dc3545;
          color: #fff;
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 0.72rem;
          font-weight: 700;
          margin-top: 1px;
        }
        .route-stop-num.ncn {
          background: #0d6efd;
        }
        .route-stop-info {
          min-width: 0;
        }
        .route-stop-info .badge {
          font-size: 0.7rem;
          letter-spacing: 0.03em;
          margin-bottom: 0.2rem;
          display: inline-block;
        }
        .route-stop-info a {
          display: block;
          font-size: 0.82rem;
          font-weight: 600;
          color: #842029;
          text-decoration: none;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        .route-stop-card.ncn .route-stop-info a {
          color: #084298;
        }
        .route-stop-info a:hover {
          text-decoration: underline;
          color: #dc3545;
        }
        .route-stop-card.ncn .route-stop-info a:hover {
          color: #0d6efd;
        }
        .route-stop-info a .bi {
          font-size: 0.7rem;
          opacity: 0.7;
        }

/* =========================================================
   10. Responsive Design
   ========================================================= */

@media (max-width: 720px) {
  /* Banner adjustments */
  .site-banner { 
    min-height: 250px; 
  }
  
  .site-banner h1 { 
    font-size: 1.8rem; 
  }
  
  .site-banner h2 { 
    font-size: 1.5rem; 
  }
  
  .site-banner h4 { 
    font-size: 1.4rem; 
  }

  /* Button adjustments */
  .btnlang { 
    bottom: 100px; 
    right: 15px; 
    width: 45px; 
    height: 45px; 
  }
  
  .scroll-top { 
    width: 45px; 
    height: 45px; 
    bottom: 15px; 
    right: 15px; 
  }

  /* Gallery adjustments */
  .gallery-item img {
    height: 200px;
  }
  
  /* Watermark adjustments for mobile */
  .watermark {
    bottom: 60px;
    right: 8px;
    font-size: 10px;
    padding: 3px 8px;
    letter-spacing: 0.3px;
  }

  .gallery-item-pillar img {
    height: 450px;
  }
}