body {
        font-family: 'Noto Sans Malayalam', 'Noto Sans Devanagari', 'Noto Sans Kannada', 'Poppins', 'Georgia', 'Times New Roman', serif;
    }

    /* language block visibility */
    .lang {
        display: none;
    }

    .lang.en {
        display: block;
        font-family: 'Poppins', sans-serif;
    }

    /* Malayalam Language Font */
    .lang.ml {
        font-family: 'Noto Sans Malayalam', sans-serif !important;
    }

    /* Hindi/Devanagari Language Font */
    .lang.hi {
        font-family: 'Noto Sans Devanagari', sans-serif !important;
    }

    /* Kannada Language Font */
    .lang.kn {
        font-family: 'Noto Sans Kannada', sans-serif !important;
    }

    /* Rest of your existing styles remain unchanged */
    .madayi-navbar {
      background: linear-gradient(90deg, #6b0f0f, #8b1a1a);
      padding: 20px 0;
      border-bottom: 5px solid #d4a94f;
      position: sticky;
      top: 0;
      z-index: 1000;
    }

    .madayi-navbar .navbar-brand {
      display: flex;
      align-items: center;
      gap: 10px;
      color: #fff;
      font-weight: 600;
      font-size: 18px;
    }

    .madayi-navbar .navbar-brand img {
      height: 42px;
    }

    .madayi-navbar .nav-link {
        color: #f5e6c8 !important;
        font-weight: 100;
        font-size: 15px;
        margin: 0 8px;
        position: relative;
    }

    .madayi-navbar .nav-link:hover,
    .madayi-navbar .nav-link.active {
      color: #ffd27d !important;
    }

    .madayi-navbar .nav-link.active::after {
      content: "";
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 2px;
      background-color: #ffd27d;
    }

    .madayi-navbar .nav-link:hover {
      color: #ffd27d !important;
    }

    .book-pooja-btn {
      background: #d4a94f;
      color: #4a2a00;
      font-weight: 600;
      padding: 8px 18px;
      border-radius: 6px;
      text-decoration: none;
    }

    .book-pooja-btn:hover {
      background: #e6bd63;
      color: #4a2a00;
    }

    .madayi-navbar .navbar-toggler {
      border: 1px solid rgba(245, 230, 200, 0.45);
      padding: 0.45rem 0.7rem;
    }

    .madayi-navbar .navbar-toggler:focus {
      box-shadow: 0 0 0 0.2rem rgba(212, 169, 79, 0.3);
    }

    .madayi-navbar .navbar-toggler-icon {
      background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28245, 230, 200, 0.95%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    .madayi-navbar .navbar-nav {
      align-items: center;
    }

    .madayi-navbar .dropdown-menu {
      min-width: 11rem;
    }

    /* Navbar responsive fixes for longer text in other languages */
    @media (max-width: 1200px) {
      .madayi-navbar .nav-link {
        margin: 0 3px;
        font-size: 14px;
        padding: 8px 6px;
      }

      .madayi-navbar .navbar-brand {
        font-size: 16px;
      }
    }

    @media (max-width: 991.98px) {
      .madayi-navbar {
        padding: 14px 0;
      }

      .madayi-navbar .container {
        align-items: flex-start;
      }

      .madayi-navbar .navbar-brand {
        max-width: calc(100% - 72px);
        font-size: 15px;
        line-height: 1.3;
        white-space: normal;
      }

      .madayi-navbar .navbar-collapse {
        width: 100%;
        margin-top: 14px;
        padding: 14px;
        background: rgba(58, 7, 7, 0.96);
        border: 1px solid rgba(212, 169, 79, 0.28);
        border-radius: 14px;
      }

      .madayi-navbar .navbar-nav {
        width: 100%;
        align-items: stretch;
        text-align: center;
      }

      .madayi-navbar .nav-item {
        width: 100%;
        margin-bottom: 4px;
      }

      .madayi-navbar .nav-link {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin: 0;
        padding: 10px 14px;
        font-size: 14px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        max-width: none;
        border-radius: 10px;
      }

      .madayi-navbar .nav-link.active {
        background: rgba(212, 169, 79, 0.12);
      }

      .madayi-navbar .nav-link.active::after {
        display: none;
      }

      .madayi-navbar .dropdown-menu {
        position: static !important;
        width: 100%;
        margin-top: 8px;
        text-align: center;
        transform: none !important;
      }
    }

    @media (max-width: 576px) {
      .madayi-navbar .navbar-brand {
        font-size: 13px;
      }

      .book-pooja-btn {
        padding: 6px 12px;
        font-size: 12px;
      }
    }

    .hero-section {
      position: relative;
      height: 90vh;
      background: #000;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      color: #fff;
      overflow: hidden;
    }

    .hero-carousel {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 0;
    }

    .hero-carousel .carousel-item {
      height: 90vh;
    }

    .hero-carousel img {
      object-fit: cover;
      height: 100%;
      width: 100%;
    }

    .hero-overlay {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.55);
    }

    .hero-content {
      position: relative;
      z-index: 2;
      max-width: 900px;
      padding: 0 20px;
    }

    .hero-title {
      font-family: Arial, sans-serif;
      font-size: 64px;
      font-weight: 700;
      color: #f5d28b;
      letter-spacing: 2px;
    }

    .hero-subtitle {
      margin-top: 15px;
      font-size: 18px;
      color: #f5e6c8;
    }

    .hero-btn {
      margin-top: 30px;
      background: #d4a94f;
      color: #4a2a00;
      font-weight: 600;
      padding: 12px 28px;
      border-radius: 6px;
      text-decoration: none;
      display: inline-block;
    }

    .hero-btn:hover {
      background: #e6bd63;
      color: #4a2a00;
    }

    .madayi-footer {
      background: #2a0909;
      color: #f5e6c8;
      padding: 60px 0 20px;
    }

    .madayi-footer h5 {
      color: #d4a94f;
      margin-bottom: 15px;
      font-size: 1.35rem;
      font-weight: 700;
    }

    .madayi-footer p {
      font-size: 0.95rem;
      line-height: 1.6;
    }

    .madayi-footer ul li {
      margin-bottom: 8px;
    }

    .madayi-footer a {
      color: #f5e6c8;
      text-decoration: none;
      font-size: 0.96rem;
    }

    .madayi-footer a:hover {
      color: #ffd27d;
      text-decoration: underline;
    }

    .footer-bottom {
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      margin-top: 40px;
      padding-top: 15px;
      text-align: center;
      font-size: 0.88rem;
    }

    @media (max-width: 768px) {
      .hero-title {
        font-size: 40px;
      }
    }

    .history-hero {
      background:
        linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
        url("/static/images/home/banner2.jpeg") no-repeat center center;
      background-size: cover;
      background-attachment: fixed;
      background-position: center center;
      height: 45vh;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      border-bottom: 5px solid #d4a94f;
    }

    @media (max-width: 768px) {
      .history-hero {
        background-attachment: scroll;
      }
    }

    .history-hero-title {
      font-family: Arial, sans-serif;
      font-size: 52px;
      font-weight: 700;
      color: #f5d28b;
      text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    }

    @media (max-width: 768px) {
      .history-hero-title {
        font-size: 36px;
      }
    }

    @media (max-width: 480px) {
      .history-hero-title {
        font-size: 28px;
        word-wrap: break-word;
        overflow-wrap: break-word;
      }
    }

    .history-intro {
      padding: 80px 0;
      background: #fffcf8;
      position: relative;
    }

    .history-intro::before {
      content: "❖";
      position: absolute;
      top: 10px;
      left: 50%;
      transform: translateX(-50%);
      font-size: 30px;
      color: #d4aa4f00;
    }

    .info-card-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 30px;
      margin-top: 50px;
    }

    .info-card {
      background: #fff;
      padding: 30px;
      border-radius: 10px;
      box-shadow: 0 10px 30px rgba(107, 15, 15, 0.05);
      border-top: 4px solid #6b0f0f;
      transition: transform 0.3s ease;
    }

    .info-card:hover {
      transform: translateY(-5px);
    }

    .info-card i {
      font-size: 36px;
      color: #d4a94f;
      margin-bottom: 20px;
    }

    .info-card h4 {
      margin-bottom: 20px;
      color: #6b0f0f;
      font-weight: 600;
      font-size: 18px;
    }

    .info-card p {
      margin-bottom: 0;
      color: #4a3427;
      line-height: 1.6;
      font-size: 15px;
    }

    .temple-history-split {
      padding: 100px 0;
      background: #fffcf8;
    }

    .history-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 60px;
      align-items: flex-start;
    }

    .history-image-box img {
      width: 100%;
      border-radius: 15px;
      box-shadow: 0 20px 40px rgba(107, 15, 15, 0.15);
      border: 1px solid #d4a94f;
    }

    .history-text-box h3 {
      font-family: Arial, sans-serif;
      font-size: 32px;
      color: #6b0f0f;
      margin-bottom: 25px;
      font-weight: 700;
    }

    .history-text-box p {
      line-height: 1.9;
      font-size: 16px;
      color: #4a3427;
      margin-bottom: 20px;
      text-align: justify;
    }

    .proof-banner {
      background: #2a0909;
      color: #fff;
      padding: 60px 0;
      border-top: 3px solid #d4a94f;
      border-bottom: 3px solid #d4a94f;
    }

    @media (max-width: 992px) {
      .history-grid {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 768px) {
      .info-card {
        padding: 20px;
        font-size: 14px;
      }

      .hero-section {
        height: auto;
        padding: 20px 0;
      }

      .footer-bottom {
        font-size: 12px;
      }
    }

    .about-temple {
      padding: 80px 0;
      background: #ffffff;
    }

    .section-title {
      text-align: center;
      font-family: Arial, sans-serif;
      font-size: 40px;
      color: #6b0f0f;
      margin-bottom: 50px;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 20px;
    }

    .title-line {
      display: inline-block;
      width: 100px;
      height: 2px;
      background: linear-gradient(90deg,
          transparent,
          #d4a94f 30%,
          #ffd27d 70%,
          transparent);
    }

    .temple-content {
      display: flex;
      flex-direction: column;
      gap: 30px;
      align-items: center;
    }

    .temple-image {
      width: 100%;
      max-width: 600px;
    }

    .temple-image img {
      width: 100%;
      border-radius: 12px;
      box-shadow: 0 15px 35px rgba(107, 15, 15, 0.15);
    }

    .temple-info {
      width: 100%;
      max-width: 800px;
    }

    .temple-info p {
      line-height: 1.8;
      font-size: 16px;
      color: #4a2a00;
      margin-bottom: 25px;
      text-align: justify;
    }

    @media (max-width: 992px) {
      .temple-content {
        gap: 20px;
      }

      .temple-image {
        max-width: 500px;
      }

      .temple-info {
        max-width: 700px;
      }

      .temple-info p {
        font-size: 15px;
        text-align: justify;
      }
    }

    @media (max-width: 768px) {
      .temple-content {
        gap: 15px;
      }

      .temple-image {
        max-width: 400px;
      }

      .temple-info {
        max-width: 100%;
      }

      .temple-info p {
        font-size: 14px;
      }
    }

    .whatsapp-float {
      position: fixed;
      bottom: 20px;
      right: 20px;
      width: 60px;
      height: 60px;
      background-color: #25d366;
      color: #fff;
      border-radius: 50%;
      text-align: center;
      font-size: 30px;
      box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      line-height: 0;
      border: none;
    }

    .whatsapp-float:hover {
      transform: scale(1.1);
      box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.4);
    }


       /* ========== HISTORICAL CHRONICLES GRID ========== */
                .about-temple {
                    padding: 60px 0;
                    background: #ffffff;
                }

                .about-temple .section-title {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    gap: 20px;
                    font-size: clamp(22px, 4vw, 38px);
                    font-weight: 700;
                    color: #6b0f0f;
                    margin-bottom: 40px;
                    text-align: center;
                    flex-wrap: nowrap;
                    padding: 0 10px;
                    word-break: break-word;
                }

                .about-temple .section-title span.lang {
                    flex-shrink: 1;
                    min-width: 0;
                }

                .about-temple .title-line {
                    display: inline-block;
                    height: 2px;
                    flex: 0 1 120px;
                    min-width: 40px;
                    background: linear-gradient(90deg, transparent, #d4a94f 30%, #ffd27d 70%, transparent);
                    flex-shrink: 1;
                }

                /* Grid layout: image left, text right (top row), full-width text (bottom row) */
                .about-temple .temple-content {
                    display: grid !important;
                    grid-template-columns: 30% 1fr !important;
                    gap: 50px !important;
                    align-items: end !important;
                    grid-template-rows: auto auto !important;
                }

                .about-temple .temple-image {
                    grid-column: 1 !important;
                    grid-row: 1 !important;
                    width: 100% !important;
                }

                .about-temple .temple-image img {
                    width: 100%;
                    border-radius: 12px;
                    box-shadow: 0 15px 35px rgba(107, 15, 15, 0.15);
                    display: block;
                }

                .about-temple .temple-info-short {
                    grid-column: 2 !important;
                    grid-row: 1 !important;
                    width: 100% !important;
                }

                .about-temple .temple-info-full {
                    grid-column: 1 / -1 !important;
                    grid-row: 2 !important;
                    width: 100% !important;
                }

                .temple-info-short p,
                .temple-info-full p {
                    line-height: 1.9;
                    font-size: 16px;
                    color: #4a2a00;
                    margin-bottom: 20px;
                    text-align: justify;
                }

                /* ========== TABLET (max 992px) ========== */
                @media (max-width: 992px) {
                    .about-temple {
                        padding: 50px 0;
                    }

                    .about-temple .section-title {
                        font-size: 32px;
                        gap: 15px;
                    }

                    .about-temple .temple-content {
                        grid-template-columns: 38% 1fr !important;
                        gap: 30px !important;
                    }

                    .temple-info-short p,
                    .temple-info-full p {
                        font-size: 15px;
                    }
                }

                /* ========== MOBILE (max 768px) ========== */
                @media (max-width: 768px) {
                    .about-temple {
                        padding: 35px 0;
                    }

                    .about-temple .section-title {
                        font-size: clamp(20px, 5vw, 28px);
                        gap: 10px;
                        margin-bottom: 20px;
                        flex-wrap: nowrap;
                    }

                    .about-temple .title-line {
                        flex: 0 1 60px;
                        min-width: 30px;
                    }

                    /* Stack everything in a single column */
                    .about-temple .temple-content {
                        grid-template-columns: 1fr !important;
                        gap: 20px !important;
                    }

                    .about-temple .temple-image {
                        grid-column: 1 !important;
                        grid-row: 1 !important;
                    }

                    .about-temple .temple-image img {
                        border-radius: 8px;
                        max-height: 280px;
                        object-fit: cover;
                    }

                    .about-temple .temple-info-short {
                        grid-column: 1 !important;
                        grid-row: 2 !important;
                    }

                    .about-temple .temple-info-full {
                        grid-column: 1 !important;
                        grid-row: 3 !important;
                    }

                    .temple-info-short p,
                    .temple-info-full p {
                        font-size: 14px;
                        line-height: 1.8;
                        margin-bottom: 15px;
                    }
                }

                /* ========== SMALL MOBILE (max 480px) ========== */
                @media (max-width: 480px) {
                    .about-temple {
                        padding: 25px 0;
                    }

                    .about-temple .section-title {
                        font-size: clamp(18px, 5.5vw, 22px);
                        gap: 6px;
                        margin-bottom: 16px;
                        justify-content: center;
                        flex-wrap: nowrap;
                    }

                    /* Hide decorative lines on very small screens */
                    .about-temple .title-line {
                        display: none;
                    }

                    .about-temple .temple-content {
                        gap: 15px !important;
                    }

                    .about-temple .temple-image img {
                        max-height: 220px;
                        border-radius: 6px;
                    }

                    .temple-info-short p,
                    .temple-info-full p {
                        font-size: 13px;
                        line-height: 1.7;
                        margin-bottom: 12px;
                    }
                }


                    /* ========== HISTORY HERO ========== */
        .history-hero {
            background:
                linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
                url("/static/images/home/banner2.jpeg") no-repeat center center;
            background-size: cover;
            background-attachment: fixed;
            min-height: 180px;
            height: 40vh;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            border-bottom: 5px solid #d4a94f;
            padding: 0 20px;
        }

        .history-hero-title {
            font-family: Arial, sans-serif;
            font-size: clamp(20px, 5.5vw, 52px);
            font-weight: 700;
            color: #f5d28b;
            text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
            white-space: nowrap;
            text-align: center;
            margin: 0;
        }

        @media (max-width: 992px) {
            .history-hero {
                background-attachment: scroll;
                height: 35vh;
            }
        }

        @media (max-width: 768px) {
            .history-hero {
                height: 28vh;
                min-height: 150px;
            }

            .history-hero-title {
                font-size: clamp(18px, 6vw, 32px);
                white-space: normal;
                word-break: break-word;
            }
        }

        @media (max-width: 480px) {
            .history-hero {
                min-height: 130px;
                height: 22vh;
            }

            .history-hero-title {
                font-size: clamp(15px, 5.5vw, 20px);
            }
        }

        /* ========== LOCATION & IDENTITY ========== */
        .history-intro {
            padding: 60px 0;
            background: #fffcf8;
        }

        .history-intro .section-title {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-wrap: nowrap;
            gap: 20px;
            font-size: clamp(20px, 4vw, 40px);
            font-weight: 700;
            color: #6b0f0f;
            margin-bottom: 35px;
            padding: 0 10px;
        }

        .history-intro .section-title span.lang {
            flex-shrink: 1;
            min-width: 0;
        }

        .history-intro .title-line {
            flex: 0 1 120px;
            min-width: 35px;
            height: 2px;
            background: linear-gradient(90deg, transparent, #d4a94f 30%, #ffd27d 70%, transparent);
            flex-shrink: 1;
        }

        @media (max-width: 992px) {
            .history-intro {
                padding: 50px 0;
            }

            .history-intro .section-title {
                font-size: clamp(18px, 4vw, 30px);
                gap: 15px;
            }
        }

        @media (max-width: 768px) {
            .history-intro {
                padding: 35px 0;
            }

            .history-intro .section-title {
                font-size: clamp(16px, 5vw, 24px);
                gap: 10px;
                margin-bottom: 20px;
            }

            .history-intro .title-line {
                flex: 0 1 50px;
                min-width: 20px;
            }

            .info-card-grid {
                grid-template-columns: 1fr;
                gap: 16px;
                margin-top: 20px;
            }

            .info-card {
                padding: 18px;
            }

            .info-card p {
                font-size: 14px;
            }
        }

        @media (max-width: 480px) {
            .history-intro .section-title {
                font-size: clamp(14px, 5.5vw, 18px);
                gap: 0;
            }

            .history-intro .title-line {
                display: none;
            }

            .info-card {
                padding: 14px;
            }
        }