/* style.css */

/* Core Styles and Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* Header Styles */
.site-header {
    background-color: #ffffff;
    /* White */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Uncomment this class aur HTML div me add kare agar Logo strictly right side chahiye:
.reverse-layout {
    flex-direction: row-reverse;
}
*/

/* Logo Section */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

/* Search Bar */
.search-and-lang {
    flex: 1;
    max-width: 720px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-wrapper {
    flex: 1;
    display: flex;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    padding-right: 95px; /* Increased to accommodate mic button */
    border: 2px solid #919ca0;
    /* Greyish color */
    border-radius: 30px;
    font-size: 16px;
    outline: none;
    color: #000000;
    /* Black */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-input::placeholder {
    color: #919ca0;
}

.search-input:focus {
    border-color: #6da247;
    /* Light Green */
    box-shadow: 0 0 0 3px rgba(109, 162, 71, 0.2);
}

/* Voice Search Button in input bar */
.voice-search-btn {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #919ca0;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease;
    z-index: 10;
}

.voice-search-btn:hover {
    color: #1d670d;
    background-color: rgba(29, 103, 13, 0.1);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #6da247;
    /* Light Green */
    color: #ffffff;
    /* White */
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.search-btn:hover {
    background-color: #1d670d;
    /* Dark Green */
    transform: translateY(-50%) scale(1.05);
}

.search-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Header Buttons */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    white-space: nowrap;
}

/* Dark Green Button */
.btn-primary {
    background-color: #1d670d;
    color: #ffffff;
    border-color: #1d670d;
}

.btn-primary:hover {
    background-color: #ffffff;
    color: #1d670d;
}

/* Outlined Button */
.btn-outline {
    background-color: transparent;
    color: #1d670d;
    border-color: #1d670d;
}

.btn-outline:hover {
    background-color: #1d670d;
    color: #ffffff;
}

/* Light Green Button */
.btn-accent {
    background-color: #6da247;
    color: #ffffff;
}

.btn-accent:hover {
    background-color: #1d670d;
    /* Hover par Dark Green */
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #1d670d;
    margin: 5px 0;
    transition: 0.3s;
}

/* Responsive Design */
@media (max-width: 992px) {
    .header-container {
        flex-wrap: wrap;
    }

    .logo {
        order: 1;
    }

    .search-and-lang {
        order: 2;
        flex: 1;
        margin: 0 15px;
        max-width: unset;
    }

    .search-wrapper {
        flex: 1;
    }

    .mobile-toggle {
        order: 3;
    }

    .header-actions {
        order: 4;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 10px 15px;
    }

    .logo img {
        height: 50px;
        /* Thoda chhota kiya phone ke liye taaki sab fit ho jaye */
    }

    .search-and-lang {
        margin: 0 5px;
        gap: 8px;
        order: 2;
        width: 100%;
        flex: 1 1 100%; /* force full line wrap on mobile for better breathing space */
    }

    .search-wrapper {
        margin: 0;
    }

    .mobile-toggle {
        display: block;
    }

    .search-wrapper {
        margin: 0 10px;
    }

    .search-input {
        padding: 10px 15px;
        padding-right: 80px; /* Increased for mobile voice button */
        font-size: 14px;
    }

    .voice-search-btn {
        right: 42px;
        width: 32px;
        height: 32px;
    }

    .search-btn {
        width: 32px;
        height: 32px;
    }

    .search-btn svg {
        width: 16px;
        height: 16px;
    }

    .header-actions {
        display: none;
        /* Mobile par by default hide rahega */
        width: 100%;
        flex-direction: column;
        margin-top: 15px;
        gap: 10px;
    }

    .header-actions.active {
        display: flex;
        /* Toggle on mobile */
    }

    .btn {
        width: 100%;
        /* Mobile me full width button */
    }
}

/* =========================================
   Hero Banner Section
   ========================================= */
.hero-banner {
    width: 100%;
    background-color: #f8f9fa;
    /* Fallback background */
    position: relative;
    overflow: hidden;
}

.hero-slider {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
}

.hero-slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
    position: relative;
    /* relative for first active slide so it defines container height on mobile */
}

.hero-slide img {
    width: 100%;
    height: auto;
    /* Allow natural scaling on mobile to prevent cropping */
    display: block;
}

/* Desktop view height fixed to 386px as requested */
@media (min-width: 769px) {
    .hero-banner {
        height: 386px;
    }

    .hero-slide {
        position: absolute;
        /* Always absolute on desktop */
    }

    .hero-slide.active {
        position: absolute;
    }

    .hero-slide img {
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}

/* =========================================
   Brands & Side Banners Section
   ========================================= */
.brands-section {
    padding: 40px 20px;
    background-color: #f8f9fa;
}

.brands-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    align-items: stretch;
}

/* Side Banners */
.side-banner {
    flex: 0 0 250px;
    /* Fixed width of 250px for banners */
    display: flex;
    flex-direction: column;
}

.side-banner img {
    width: 100%;
    height: 100%;
    /* Will stretch to match the height of the logos grid if possible, or keep natural proportion depending on image */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Center Logos Grid */
.logos-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    align-content: start;
    /* Align to top so it doesn't stretch items vertically too much */
}

.logo-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 90px;
}

.logo-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #6da247;
}

.logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.6s;
}

.logo-item img.flip {
    animation: flip360 0.6s ease-in-out;
}

@keyframes flip360 {
    0% {
        transform: perspective(400px) rotateY(0deg);
        opacity: 1;
    }

    50% {
        transform: perspective(400px) rotateY(90deg);
        opacity: 0;
    }

    50.1% {
        transform: perspective(400px) rotateY(-90deg);
        opacity: 0;
    }

    100% {
        transform: perspective(400px) rotateY(0deg);
        opacity: 1;
    }
}

/* Responsive adjustments for Brands Section */
@media (max-width: 1024px) {
    .side-banner {
        flex: 0 0 200px;
        /* Smaller banners on tablet */
    }

    .logos-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
}

@media (max-width: 768px) {
    .brands-container {
        flex-direction: column;
    }

    .side-banner {
        flex: 0 0 auto;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    /* Mobile pe sirf LEFT banner dikhaao, RIGHT banner hide karo */
    .side-banner.right-banner {
        display: none;
    }

    .side-banner img {
        height: auto;
    }

    .logos-grid {
        order: -1;
        /* Puts logos at the top on mobile, then banners below. Or change to 2 for between banners */
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        margin-bottom: 20px;
    }
}

/* =========================================
   Categories Section
   ========================================= */
.categories-section {
    padding: 50px 20px;
    background-color: #ffffff;
}

.categories-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title.text-left {
    text-align: left;
    font-size: 24px;
    color: #003366;
    margin-bottom: 20px;
    font-weight: 700;
}

.category-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.cat-nav-btn {
    background: #ffffff;
    border: 1px solid #003366;
    color: #003366;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    z-index: 10;
    transition: all 0.3s;
    font-size: 16px;
    padding: 0;
}

.cat-nav-btn:hover {
    background: #003366;
    color: #ffffff;
}

.cat-nav-btn.prev-btn {
    left: -20px;
}

.cat-nav-btn.next-btn {
    right: -20px;
}

.category-slider-container {
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
}

.category-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
}

.category-card {
    flex: 0 0 calc(20% - 16px);
    /* 5 items per row */
    margin: 0 8px;
    /* total gap 16px per item */
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s;
    overflow: hidden;
}

.category-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.category-img-wrapper {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #ffffff;
}

.category-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.category-name-wrapper {
    border-top: 1px solid #e0e0e0;
    padding: 12px 15px;
    background: #ffffff;
}

.category-name {
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;

    /* Beautiful Green Gradient Text */
    background: linear-gradient(90deg, #1d670d, #4caf50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #1d670d;
    /* Fallback for older browsers */
}

/* =========================================
   Horizontal Banner Section
   ========================================= */
.horizontal-banner-section {
    padding: 0 20px 20px 20px;
    background-color: #f8f9fa;
}

.horizontal-banner-section .banner-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 140px;
    /* Fixed height as requested */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.horizontal-banner-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures responsiveness without distorting the image */
    display: block;
}

/* =========================================
   Subcategory Grid Sections
   ========================================= */
.subcategory-grid-section {
    padding: 30px 20px;
    background-color: #f9f9f9;
}

.trending-badge {
    background: linear-gradient(135deg, #1d670d 0%, #4caf50 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
    /* Pill shape */
    vertical-align: middle;
    margin-left: 12px;
    box-shadow: 0 3px 6px rgba(29, 103, 13, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-2px);
    /* Align slightly better with the large text */
}

.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.subcat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s, transform 0.3s;
    overflow: hidden;
    height: 100%;
}

.subcat-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.subcat-img-wrapper {
    width: 100%;
    flex: 0 0 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #ffffff;
}

.subcat-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.subcat-content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    border-top: 1px solid #e0e0e0;
    padding: 15px;
    background: #ffffff;
    overflow: hidden;
}

.subcat-name {
    font-size: 16px;
    font-weight: 700;
    color: #1d670d;
    /* Theme Green */
    text-align: center;
    margin: 0 0 10px 0;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-transform: capitalize;
}

.subsubcat-list {
    flex: 1;
    overflow-y: auto;
}

.subsubcat-list::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.subsubcat-item {
    font-size: 13px;
    color: #555;
    padding: 8px 10px;
    border-bottom: 1px dashed #eee;
    /* Softer border */
    text-align: center;
    cursor: pointer;
    transition: color 0.3s, background-color 0.3s;
}

.subsubcat-item:hover {
    color: #1d670d;
    background-color: #f4f9f3;
    /* Very light theme green background */
    border-radius: 4px;
}

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

.text-muted {
    color: #999;
    text-align: center;
}

@media (max-width: 1024px) {
    .category-card {
        flex: 0 0 calc(25% - 16px);
    }

    /* 4 items */
}

@media (max-width: 768px) {
    .category-card {
        flex: 0 0 calc(50% - 16px);
    }

    /* 2 items */
    .cat-nav-btn.prev-btn {
        left: -5px;
    }

    .cat-nav-btn.next-btn {
        right: -5px;
    }
}

@media (max-width: 480px) {

    /* Keep 2 items on very small screens, just adjust text/padding slightly if needed */
    .category-card {
        flex: 0 0 calc(50% - 12px);
        margin: 0 6px;
    }

    .category-img-wrapper {
        height: 120px;
        padding: 10px;
    }

    .category-name {
        font-size: 12px;
    }

    .cat-nav-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}

/* =========================================
   Blog Section
   ========================================= */
.blog-section {
    padding: 50px 20px;
    background-color: #f8f9fa;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

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

.blog-img-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.blog-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.blog-card:hover .blog-img-wrapper img {
    transform: scale(1.05);
}

.blog-date {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: linear-gradient(135deg, #1d670d 0%, #4caf50 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.blog-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-title {
    font-size: 18px;
    font-weight: 700;
    color: #1d670d;
    margin: 0 0 15px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-read-more {
    margin-top: auto;
    display: inline-block;
    color: #1d670d;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.blog-read-more:hover {
    color: #4caf50;
}

/* Responsive for Blog */
@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Footer Section
   ========================================= */
.site-footer {
    background-color: #1a1a1a;
    color: #e0e0e0;
    margin-top: 50px;
}

.footer-top {
    padding: 60px 20px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-col .footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    height: 100px;
    background: #fff;
    padding: 5px 10px;
    border-radius: 4px;
}

.footer-text {
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 14px;
    color: #ccc;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #333;
    color: #fff;
    transition: background-color 0.3s;
}

.social-links a svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.social-links a:hover {
    background-color: #1d670d;
    /* Theme Green */
}

.footer-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: #1d670d;
    /* Theme Green Accent */
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s, padding-left 0.3s;
}

.footer-links a:hover {
    color: #4caf50;
    padding-left: 5px;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    color: #ccc;
}

.footer-contact strong {
    color: #fff;
}

.footer-bottom {
    background-color: #111;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: #888;
}

.footer-bottom p {
    margin: 0;
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Voice Search Modal & Animations
   ========================================= */
.voice-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.voice-modal.show {
    opacity: 1;
}

.voice-modal-content {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.voice-modal.show .voice-modal-content {
    transform: translateY(0);
}

.voice-close-btn {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: #919ca0;
    transition: color 0.2s;
    line-height: 1;
}

.voice-close-btn:hover {
    color: #333;
}

.voice-title {
    font-size: 20px;
    font-weight: 700;
    color: #1d670d;
    margin-bottom: 20px;
}

.voice-lang-selector {
    display: inline-flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 25px;
    background: #f1f1f1;
    padding: 4px;
    border-radius: 30px;
}

.lang-btn {
    border: none;
    background: transparent;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: #1d670d;
    color: #fff;
    box-shadow: 0 2px 6px rgba(29, 103, 13, 0.2);
}

.voice-wave-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-modal-mic {
    font-size: 28px;
    color: #fff;
    background: #1d670d;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(29, 103, 13, 0.3);
}

.voice-wave-circle {
    position: absolute;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(29, 103, 13, 0.4);
    animation: voiceRipple 1.6s infinite ease-out;
    opacity: 0;
}

.voice-wave-circle:nth-child(2) {
    animation-delay: 0.5s;
}

.voice-wave-circle:nth-child(3) {
    animation-delay: 1s;
}

@keyframes voiceRipple {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

.voice-status {
    font-size: 15px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.voice-transcript {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    min-height: 27px;
    word-break: break-word;
}

/* =========================================
   Custom Translator Styles & Responsiveness
   ========================================= */
.custom-translator {
    position: relative;
    display: inline-block;
    z-index: 998;
}

.translator-trigger {
    background-color: #ffffff;
    border: 2px solid #919ca0;
    border-radius: 30px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    white-space: nowrap;
}

.translator-trigger:hover {
    border-color: #1d670d;
    color: #1d670d;
    box-shadow: 0 4px 8px rgba(29, 103, 13, 0.1);
}

.translator-trigger i {
    font-size: 16px;
}

.translator-dropdown {
    position: absolute;
    top: 105%;
    right: 0;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 170px;
    padding: 8px 0;
    display: none;
    flex-direction: column;
    overflow-y: auto;
    max-height: 300px;
    animation: fadeInDropdown 0.2s ease-out;
}

.translator-dropdown.show {
    display: flex;
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.translate-opt {
    padding: 10px 18px;
    font-size: 14px;
    color: #444;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s, color 0.2s;
    text-align: left;
}

.translate-opt:hover {
    background-color: #f4f9f3;
    color: #1d670d;
}

.translate-opt.active {
    background-color: #1d670d;
    color: #ffffff;
    font-weight: 700;
}

/* Hide Google Translate original top bar & frame overlays natively */
body {
    top: 0 !important;
}
.skiptranslate, .goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame {
    display: none !important;
}
.goog-tooltip, .goog-tooltip:hover {
    display: none !important;
}
.goog-text-highlight {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
#google_translate_element {
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Mobile Media Query for translator trigger */
@media (max-width: 768px) {
    .translator-trigger {
        padding: 8px 12px;
        font-size: 13px;
        gap: 4px;
    }
    .translator-trigger span {
        display: none; /* Hide language name text on mobile to fit nicely */
    }
    .translator-trigger i.fa-chevron-down {
        font-size: 10px;
    }
    .translator-dropdown {
        right: auto;
        left: -80px; /* shift list to align nicely under screen width */
    }
}