/* Global Styles */
body {
    padding-top: 50px !important;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 3px;
    color: #333;
}

.navbar-brand {
    letter-spacing: 1px !important;
}

/* Custom Colors */
.text-success {
    color: #2E7D32 !important;
    /* Deeper green */
}

.bg-success {
    background-color: #2E7D32 !important;
}

.btn-success {
    background-color: #2E7D32;
    border-color: #2E7D32;
}

.btn-success:hover {
    background-color: #1b5e20;
    border-color: #1b5e20;
}

.text-warning {
    color: #d9eb72 !important;
}

.btn-warning {
    background-color: transparent;
    border-color: #fafafa;
    color: #ffffff !important;
}


.btn-warning:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
}

.bg-custom {
    background-color: #e5f6ba;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background-image: url('../img/home.jpeg');
    background-size: cover;
    background-position: 40% 0%;
    background-attachment: fixed;
    /* Parallax effect */
}

/* Fix mobile parallax cropping bug */
@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
        min-height: 100dvh;
    }
}

.hero h1 {
    padding-top: 50px;
    letter-spacing: 5px;
    font-weight: 900 !important;
    text-shadow: 3px 3px 3px rgba(181, 220, 140, 0.8);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(46, 125, 50, 0.6));
    /* Gradient overlay */
}

/* Image Hover Fade Effect */
.image-hover-card {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    touch-action: pan-y; /* Fix stuck scrolling on mobile */
}

.image-hover-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #354C2B;
    /* #2E7D32 with opacity */
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    pointer-events: none; /* Prevent touch events from getting stuck */
    will-change: opacity; /* Fix frame drop when animating */
}

.image-hover-card:hover .card-overlay {
    opacity: 1;
}

/* Floating Badge Animation */
.floating-badge {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px) translate(-50%, -50%);
    }

    50% {
        transform: translateY(-10px) translate(-50%, -50%);
    }

    100% {
        transform: translateY(0px) translate(-50%, -50%);
    }
}

/* Feature Image */
.feature-img {
    border: 5px solid white;
    max-height: 500px;
    object-fit: cover;
}

/* Outline Float Image */
.outline-float-image {
    filter: drop-shadow(3px 3px 0 white) drop-shadow(-3px -3px 0 white) drop-shadow(3px -3px 0 white) drop-shadow(-3px 3px 0 white) drop-shadow(0 0 15px rgba(255, 235, 59, 0.9));
    animation: floatImg 3s ease-in-out infinite;
}

@keyframes floatImg {
    0% {
        transform: translateY(0px);
    }

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

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

/* Smooth Scrolling for anchor links */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 76px;
}

/* Footer Styles */
.footer-section {
    background-image: url('../img/footer.jpeg');
    background-size: cover;
    background-position: 50% 70%;
    /* Ganti angka 100% ini untuk naik/turun */
    position: relative;
    color: rgba(255, 255, 255, 0.8);
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(60, 50, 45, 0.5);
    /* Dark earthy overlay */
}

.footer-content {
    position: relative;
    z-index: 1;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
    line-height: 2;
}

.footer-link:hover {
    color: #fff;
}

/* Gallery Styles */
.gallery-item {
    height: 300px;
    cursor: pointer;
}

.gallery-img {
    transition: transform 0.4s ease-in-out;
}

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

/* Floating Live Stock Widget */
.floating-stock-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1050; /* Above navbar if needed */
    width: 250px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    animation: slideUpFade 0.6s ease-out forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Adjustments for Widget */
@media (max-width: 576px) {
    .floating-stock-widget {
        bottom: 15px;
        left: 15px;
        right: 15px;
        width: auto;
    }
}



@media (max-width: 576px) {
    .footer-section {
        padding-bottom: 120px !important;
    }
}

/* Polaroid Stack Styles */
.polaroid-stack-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 0 6rem 0;
}

.polaroid-stack {
    position: relative;
    width: 400px;
    height: 300px;
}

.polaroid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #fcfcfc;
    padding: 15px 15px 60px 15px; /* bottom padding for polaroid look */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15), 0 0 2px rgba(0,0,0,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.polaroid-placeholder {
    width: 100%;
    height: 100%;
    background-color: #222; /* Dark placeholder area for photo */
    display: flex;
    justify-content: center;
    align-items: center;
    color: #555;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
}

/* Positioning and rotation for the stack */
.polaroid:nth-child(1) {
    transform: rotate(-6deg) translate(-20px, 15px);
    z-index: 1;
}

.polaroid:nth-child(2) {
    transform: rotate(4deg) translate(15px, -5px);
    z-index: 2;
}

.polaroid:nth-child(3) {
    transform: rotate(-2deg) translate(5px, -15px);
    z-index: 3;
}

/* Hover effects */
.polaroid-stack:hover .polaroid:nth-child(1) {
    transform: rotate(-10deg) translate(-40px, 25px);
}

.polaroid-stack:hover .polaroid:nth-child(2) {
    transform: rotate(8deg) translate(35px, -15px);
}

.polaroid-stack:hover .polaroid:nth-child(3) {
    transform: rotate(0deg) translate(0, -25px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    z-index: 4;
}

/* Responsive adjustments for mobile and tablets */
@media (max-width: 991px) {
    .polaroid-stack-container {
        padding: 2rem 0 3rem 0;
    }
}

@media (max-width: 576px) {
    .polaroid-stack {
        width: 320px;
        height: 240px;
    }
    .polaroid {
        padding: 12px 12px 45px 12px;
    }
    /* Reduce spread on mobile so it doesn't get cut off at the edges */
    .polaroid:nth-child(1) {
        transform: rotate(-4deg) translate(-10px, 10px);
    }
    .polaroid:nth-child(2) {
        transform: rotate(3deg) translate(10px, -5px);
    }
    .polaroid:nth-child(3) {
        transform: rotate(-1deg) translate(2px, -10px);
    }

    /* Reduce hover spread on mobile */
    .polaroid-stack:hover .polaroid:nth-child(1) {
        transform: rotate(-6deg) translate(-20px, 15px);
    }
    .polaroid-stack:hover .polaroid:nth-child(2) {
        transform: rotate(5deg) translate(20px, -10px);
    }
    .polaroid-stack:hover .polaroid:nth-child(3) {
        transform: rotate(0deg) translate(0, -15px) scale(1.02);
    }
}

@media (max-width: 400px) {
    .polaroid-stack {
        width: 260px;
        height: 195px;
    }
    .polaroid {
        padding: 10px 10px 35px 10px;
    }
}
