/* 
 * Custom Styles for KV Kizhavi Foods 
 * Matches Bootstrap 5.3 structure and design aesthetics from the provided mockup.
 */

:root {
    /* Color Palette Extracted from Design */
    --primary-green: #4caf50;
    --dark-green: #388e3c;
    --darker-green: #1b5e20;
    --yellow: #ffeb3b;
    --dark-yellow: #fbc02d;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f8f9fa;
    --bg-green-gradient: linear-gradient(135deg, rgba(187, 238, 188, 0.13) 0%, rgba(98, 115, 99, 0.95) 100%);
    --bg-section-alt: linear-gradient(to bottom, #ffffff 0%, #f1f8f1 100%);
    --font-primary: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Utilities */
.text-dark-green {
    color: var(--darker-green) !important;
}

.bg-yellow {
    background-color: var(--yellow) !important;
}

.bg-primary-green {
    background-color: var(--primary-green) !important;
}

.section-padding {
    padding: 80px 0;
}

.w-md-50 {
    width: 100%;
}

/* Buttons */
.btn-yellow {
    background-color: var(--yellow);
    color: var(--text-dark);
    border: none;
    transition: all 0.3s ease;
}

.btn-yellow:hover {
    background-color: var(--dark-yellow);
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(251, 192, 45, 0.4) !important;
}

.btn-primary-green {
    background-color: var(--primary-green);
    color: var(--text-light);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary-green:hover {
    background-color: var(--dark-green);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(56, 142, 60, 0.4) !important;
}

.btn-outline-primary-green {
    background-color: transparent;
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    transition: all 0.3s ease;
}

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

/* Section Title with Lines */
.section-title h2::before,
.section-title h2::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 2px;
    background-color: var(--primary-green);
}

.section-title h2::before {
    left: -80px;
}

.section-title h2::after {
    right: -80px;
}

/* Navbar */
.custom-navbar {
    background-color: var(--dark-green);
    /* Cohesive default background for static pages */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1030;
}

/* Homepage Fixed Transparent Navbar — dark gradient so items are always readable */
.custom-navbar.fixed-top {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 100%);
    border-bottom: none;
    box-shadow: none;
}

/* Scrolled Navbar Style */
.custom-navbar.scrolled {
    background-color: rgba(27, 94, 32, 0.88) !important;
    /* Semi-transparent deep forest green */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar-logo {
    height: 75px;
    width: auto;
    object-fit: contain;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shrink logo on mobile so brand + MENU button both fit on one row */
@media (max-width: 575.98px) {
    .navbar-logo {
        height: 52px;
    }

    .navbar-brand-text {
        font-size: 1rem !important;
    }

    .custom-navbar {
        padding: 0.5rem 0;
    }
}

.custom-navbar.scrolled .navbar-logo {
    height: 65px;
    border-radius: 50% !important;
    /* Increased from 52px mo*/
}

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

.navbar-brand-text {
    font-size: 1.35rem;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.navbar-toggler {
    border: none !important;
    padding: 0.5rem 0.8rem;
    transition: all 0.3s ease;
    display: flex !important;
    /* Always show the toggler — this is an offcanvas-only nav */
    align-items: center;
    gap: 0.5rem;
    background: transparent;
}

.navbar-toggler:focus {
    box-shadow: none !important;
    outline: none !important;
}

.navbar-toggler-text {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    transition: color 0.3s ease;
}

.navbar-toggler:hover .navbar-toggler-text {
    color: var(--yellow);
}

.navbar-toggler-icon {
    width: 1.8rem;
    height: 1.8rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    transition: transform 0.3s ease;
}

.navbar-toggler:hover .navbar-toggler-icon {
    transform: scale(1.1);
}

/* Offcanvas Sidebar Menu Styling */
.offcanvas {
    width: 320px !important;
    background-color: rgba(27, 94, 32, 0.98) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff;
    z-index: 1055 !important;
    /* Must be above fixed navbar (1030) and Bootstrap backdrop (1040) */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@media (max-width: 575.98px) {
    .offcanvas {
        width: 100% !important;
        /* Full screen on mobile */
        border-left: none !important;
    }
}

.offcanvas-header {
    padding: 1.5rem;
}

.offcanvas-header .btn-close {
    transition: all 0.3s ease;
    font-size: 1.25rem;
    opacity: 0.8;
}

.offcanvas-header .btn-close:hover {
    transform: rotate(90deg);
    opacity: 1;
}

.offcanvas-body {
    padding: 2rem;
}

/* Offcanvas Navigation Links */
.offcanvas .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 600;
    font-size: 1.25rem !important;
    padding: 0.5rem 0;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.offcanvas .nav-link:hover,
.offcanvas .nav-link.active {
    color: var(--yellow) !important;
    transform: translateX(5px);
}

/* Underline hover effect for vertical links */
.offcanvas .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--yellow);
    transition: width 0.3s ease;
}

.offcanvas .nav-link:hover::after,
.offcanvas .nav-link.active::after {
    width: 100%;
}

.text-yellow {
    color: var(--yellow) !important;
}

/* Adjust tracking */
.tracking-wider {
    letter-spacing: 0.05em;
}

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

/* Full height carousel chain */
#heroCarousel,
.carousel-inner,
.carousel-item {
    height: 100%;
}

/* Carousel slides */
.carousel-item {
    transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Hero slide content — responsive top padding clears the fixed navbar */
.hero-slide-row {
    padding-top: 100px;
}

/* Tablet: columns stack vertically, switch to auto height so content isn't clipped */
@media (max-width: 991.98px) {
    .hero-section {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    #heroCarousel,
    .carousel-inner,
    .carousel-item {
        height: auto;
        min-height: calc(100vh - 0px);
    }

    .hero-slide-row {
        padding-top: 90px;
        padding-bottom: 40px;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .hero-slide-row {
        padding-top: 70px;
        padding-bottom: 30px;
    }
}

@media (max-width: 575.98px) {
    .hero-slide-row {
        padding-top: 65px;
        padding-bottom: 20px;
    }
}

/* Slide-specific background gradients to match the products */
.carousel-item:nth-child(1) {
    background: linear-gradient(135deg, rgba(253, 216, 53, 0.45) 0%, rgba(230, 81, 0, 0.95) 100%), url('../images/products/backgorundliser.jpg') center/cover no-repeat;
}

.carousel-item:nth-child(2) {
    background: linear-gradient(135deg, rgba(244, 143, 177, 0.45) 0%, rgba(136, 14, 79, 0.95) 100%), url('../images/products/backgorundliser.jpg') center/cover no-repeat;
}

.carousel-item:nth-child(3) {
    background: linear-gradient(135deg, rgba(139, 195, 74, 0.45) 0%, rgba(27, 94, 32, 0.95) 100%), url('../images/products/backgorundliser.jpg') center/cover no-repeat;
}

.carousel-item:nth-child(4) {
    background: linear-gradient(135deg, rgba(186, 104, 200, 0.45) 0%, rgba(74, 20, 140, 0.95) 100%), url('../images/products/backgorundliser.jpg') center/cover no-repeat;
}

.carousel-item:nth-child(5) {
    background: linear-gradient(135deg, rgba(176, 190, 197, 0.45) 0%, rgba(38, 50, 56, 0.95) 100%), url('../images/products/backgorundliser.jpg') center/cover no-repeat;
}

.carousel-indicators [data-bs-target] {
    width: 30px;
    height: 4px;
    background-color: var(--text-light);
    opacity: 0.5;
    margin: 0 4px;
    border: none;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: var(--yellow);
    opacity: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.25);
    padding: 1.25rem;
    border-radius: 50%;
    background-size: 50%;
}

.hue-shifted-pack {
    filter: hue-rotate(185deg) drop-shadow(0 15px 25px rgba(0, 0, 0, 0.25)) !important;
}

.hero-title {
    color: #c8e6c9 !important;
    /* Lighter green matching design */
}

.divider {
    height: 4px;
    width: 80px;
    background-color: var(--yellow);
    border-radius: 2px;
}

.floating-img {
    animation: float 6s ease-in-out infinite;
    max-width: 320px;
    z-index: 2;
}

.secondary-img-wrapper {
    right: 5%;
    top: 15%;
    animation-delay: 1.5s;
    z-index: 1;
}

.main-img,
.secondary-img {
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), filter 0.6s ease, box-shadow 0.6s ease;
    border-radius: 12px;
}

.secondary-img {
    transform: scale(0.85);
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(2deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* Hover effects for hero product packets (fanning effect) */
.hero-images:hover .main-img {
    transform: scale(1.08) rotate(-6deg);
    filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.35));
}

.hero-images:hover .secondary-img {
    transform: translate(65px, -25px) scale(1.05) rotate(12deg);
    filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.3));
}

/* Features Bar */
.features-bar .feature-item {
    transition: transform 0.3s ease;
}

.features-bar .feature-item:hover {
    transform: scale(1.05);
}

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

.mission-vision-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mission-vision-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.header-line {
    height: 2px;
    background-color: rgba(255, 255, 255, 0.5);
    display: inline-block;
}

/* Products Gallery */
.gallery-section {
    background-color: #ffffff;
}

.gallery-img-box {
    cursor: pointer;
    overflow: hidden;
}

.collage-tall {
    height: 616px;
}

.collage-medium {
    height: 300px;
}

.collage-small {
    height: 300px;
}

.collage-bottom {
    height: 200px;
}

@media (max-width: 991px) {
    .collage-tall {
        height: 450px;
    }

    .collage-medium {
        height: 250px;
    }

    .collage-small {
        height: 250px;
    }

    .collage-bottom {
        height: 200px;
    }
}

.zoom-effect {
    transition: transform 0.5s ease;
}

.gallery-img-box:hover .zoom-effect {
    transform: scale(1.1);
}

/* Species Cards */
.species-section {
    background: var(--bg-section-alt);
}

.species-card {
    border: 1px solid rgba(76, 175, 80, 0.12) !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background-color: #ffffff;
}

.species-card:hover {
    transform: translateY(-8px);
    border-color: rgba(76, 175, 80, 0.3) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08) !important;
}

.species-card .card-title {
    transition: color 0.3s ease;
}

.species-card:hover .card-title {
    color: var(--primary-green) !important;
}

.card-img-bg {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.06) 0%, rgba(76, 175, 80, 0.01) 100%);
    border-radius: 1rem 1rem 0 0;
}

.card-img-product {
    height: 400px !important;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.12));
}

.species-card:hover .card-img-product {
    transform: scale(1.06);
    filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.18));
}

/* Contact Section */
.contact-section {
    background-color: #ffffff;
}

.contact-box {
    min-height: 500px;
}

.contact-form .form-control:focus {
    box-shadow: none;
    border: 1px solid var(--primary-green) !important;
    background-color: #ffffff !important;
}

/* Footer */
.footer-section {
    background-color: var(--darker-green);
    color: rgba(255, 255, 255, 0.85);
    position: relative;
    border-top: 4px solid var(--yellow);
}

.footer-logo {
    height: 140px;
    border-radius: 50% !important;
    width: auto;
    object-fit: contain;
}

.footer-section .footer-title {
    color: var(--yellow);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section .footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 45px;
    height: 2.5px;
    background-color: var(--yellow);
    border-radius: 1px;
}

.footer-section .footer-link {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.35rem 0;
}

.footer-section .footer-link:hover {
    color: var(--yellow);
    transform: translateX(5px);
}

.footer-section .social-icon {
    width: 38px;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 0.6rem;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section .social-icon:hover {
    background-color: var(--yellow);
    color: var(--darker-green);
    border-color: var(--yellow);
    transform: translateY(-4px);
    box-shadow: 0 4px 10px rgba(255, 235, 59, 0.2);
}

.footer-section .contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.footer-section .contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.footer-section .contact-item i {
    color: var(--yellow);
    font-size: 1.2rem;
    background-color: rgba(255, 255, 255, 0.05);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-section .contact-item a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section .contact-item a:hover {
    color: var(--yellow);
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1.25rem 0;
    font-size: 0.88rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Responsive Media Queries */
@media (max-width: 991px) {
    .hero-section {
        min-height: auto;
        padding: 80px 0 0px;
    }

    .hero-images {
        margin-top: 3rem;
        min-height: 350px;
    }

    .secondary-img-wrapper {
        right: auto;
        left: 45%;
        top: 10%;
    }

    .custom-navbar.fixed-top {
        background: linear-gradient(to bottom, rgb(18, 147, 78) 0%, rgb(21, 157, 75) 100%);
        border-bottom: none;
        box-shadow: none;
    }
}

@media (max-width: 767px) {

    .section-title h2::before,
    .section-title h2::after {
        width: 30px;
    }

    .section-title h2::before {
        left: -40px;
    }

    .section-title h2::after {
        right: -40px;
    }

    .section-padding {
        padding: 30px 0;
    }

    .hero-title,
    .hero-subtitle {
        font-size: 3rem;
    }

    .features-bar .row>div:not(:last-child) {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .floating-img {
        max-width: 180px;
    }

    .secondary-img-wrapper {
        max-width: 140px;
        left: 50% !important;
        top: 12% !important;
        right: auto !important;
    }

    .hero-images {
        min-height: 260px;
        margin-top: 2rem;
    }
}

@media (max-width: 575.98px) {
    .floating-img {
        max-width: 150px;
    }

    .secondary-img-wrapper {
        max-width: 110px;
        left: 48% !important;
        top: 15% !important;
        right: auto !important;
    }

    .hero-images {
        min-height: 220px;
        margin-top: 1.5rem;
    }
}

@media (min-width: 768px) {
    .w-md-50 {
        width: 50% !important;
    }
}

/* Floating WhatsApp Button */
.whatsapp-float-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: var(--text-light) !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    text-decoration: none;
    animation: whatsappPulse 2s infinite;
}

.whatsapp-float-btn:hover {
    transform: scale(1.1) rotate(8deg);
    background-color: #20ba5a;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Micro pulse animation for the WhatsApp button */
@keyframes whatsappPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Premium Spice Card Hover Styles */
.premium-spice-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

.premium-spice-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12) !important;
}

.premium-spice-card:hover .card-img-product {
    transform: scale(1.08) translateY(-4px);
}

.small-feature i {
    transition: transform 0.3s ease;
}

.premium-spice-card:hover .small-feature i {
    transform: scale(1.15);
}

/* Card image size increase overrides */
.card-top-bg {
    min-height: 290px !important;
}

.card-img-product {
    max-height: 400px !important;
}

/* Gallery Styles */
.gallery-img-box {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: #f1f8f1;
    border: 2px solid rgba(76, 175, 80, 0.08);
    transition: all 0.3s ease;
}

.gallery-img-box:hover {
    border-color: var(--primary-green);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.zoom-effect {
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-img-box:hover .zoom-effect {
    transform: scale(1.08);
}