/* Base styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

h1, h2, h3 {
    margin: 0;
}

p {
    margin: 0 0 10px;
}

/* Top Bar */
.top-bar {
    height: 10px;
    background-image: linear-gradient(#228B22 10px, #f9f9f9);
    color: #fff;
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
}

/* Header */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #f4f4f4;
    flex-wrap: wrap;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    flex: 1;
}

.logo h1 {
    color: #228B22;
    font-size: 1.8em;
}

.logo img {
    width: 40px;
    height: auto;
    margin-right: 10px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

/* Banner */
.banner {
    background-image: linear-gradient(#f9f9f9, #d32f2f 10px, #f9f9f9);
    color: #fff;
    text-align: center;
    padding: 50px 20px;
    position: relative;
    overflow: hidden;
}

/* Parallax effect for images in the banner */
.banner img {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: auto;
    animation: parallaxMovement 10s infinite linear;
}

.banner h2 {
    font-size: 2em;
    animation: fadeInSlide 2s ease-out, glow 3s infinite alternate;
}

/* Parallax animation for images */
@keyframes parallaxMovement {
    0% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10%);
    }
    100% {
        transform: translateX(-50%) translateY(0);
    }
}

/* Side Object Animation */
.side-object {
    position: absolute;
    top: 50%;
    left: -200px;
    transform: translateY(-50%);
    animation: slideInFromLeft 1s ease-out forwards;
}

.side-object img {
    max-width: 100px;
    height: auto;
}

/* Slide in animation for side objects */
@keyframes slideInFromLeft {
    0% {
        left: -200px;
        opacity: 0;
    }
    100% {
        left: 20px;
        opacity: 1;
    }
}

/* Call to Action Section */
.cta {
    display: flex;
    justify-content: space-around;
    padding: 40px 20px;
    background-color: #f9f9f9;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 2s ease-out forwards;
}

.cta-box {
    text-align: center;
    max-width: 300px;
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
}

.cta-box h3 {
    color: #d32f2f;
    font-size: 1.5em;
}

.cta-box button {
    background-color: #d32f2f;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

.cta-box button:hover {
    background-color: #b71c1c;
}

/* Fade-in effect for CTA section */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* News Section */
.news {
    text-align: center;
    padding: 40px 20px;
    opacity: 0;
    animation: fadeInUp 2s ease-out 1s forwards;
}

.news-container {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    flex-wrap: wrap;
}

.news-item {
    max-width: 300px;
    margin-bottom: 20px;
}

.news-item img {
    width: 100%;
    border-radius: 8px;
}

.news-item h3 {
    color: #228B22;
    margin-top: 10px;
}

#banner {
    max-width: 700px;
}

/* Footer */
footer {
    background-image: linear-gradient(#f9f9f9, #d32f2f 10px);
    color: #fff;
    padding: 20px;
    text-align: left;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon img {
    max-width: 30px;
    max-height: 30px;
    transition: transform 0.3s;
}

.social-icon:hover img {
    transform: scale(1.2);
}

/* Animations */
.banner h2 {
    animation: fadeInSlide 2s ease-out, glow 3s infinite alternate;
}

/* Fade-in effect for news */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Social Icon Hover Bounce */
.social-icon:hover img {
    transform: scale(1.2) translateY(-5px);
    animation: bounce 0.3s ease-in-out;
}

@keyframes bounce {
    0%, 100% {
        transform: scale(1.2) translateY(-5px);
    }
    50% {
        transform: scale(1.3) translateY(-10px);
    }
}

/* Header Navigation List */
nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav ul li a:hover {
    background-color: #228B22;
    color: #fff;
}

/* Optional: Different color for active page link */
nav ul li a.active {
    background-color: #d32f2f;
    color: #fff;
}

/* Mobile Responsiveness */

/* For screens smaller than 768px (tablet and mobile) */
@media screen and (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }

    .logo {
        margin-bottom: 20px;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .cta {
        flex-direction: column;
        align-items: center;
    }

    .cta-box {
        max-width: 100%;
    }

    .news-container {
        flex-direction: column;
        gap: 20px;
    }

    footer .footer-container {
        flex-direction: column;
        text-align: center;
    }
}

/* For screens smaller than 480px (very small phones) */
@media screen and (max-width: 480px) {
    .banner h2 {
        font-size: 1.5em;
    }

    .cta-box h3 {
        font-size: 1.3em;
    }

    .cta-box button {
        font-size: 0.9em;
    }

    .social-icon img {
        max-width: 25px;
        max-height: 25px;
    }
}
/* Button Styles */
.cta-box button {
    background-color: #d32f2f;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: all 1s ease; /* Smooth transition for all properties */
}

/* Hover effect for buttons */
.cta-box button:hover {
    background-color: #b71c1c;
    transform: scale(1.1); /* Slightly larger on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add shadow for depth */
}

/* Focus effect for accessibility (when button is clicked or tabbed) */
.cta-box button:focus {
    outline: none;
    border: 2px solid #d32f2f;
    box-shadow: 0 0 5px 2px rgba(211, 47, 47, 0.6); /* Focused outline effect */
}

/* Button Click (Active) Animation */
.cta-box button:active {
    transform: scale(0.95); /* Slightly shrink when clicked */
    transition: transform 0.1s ease-in-out; /* Smooth shrink */
}

/* Glow effect for the button when hovered */
@keyframes glowEffect {
    0% {
        box-shadow: 0 0 5px #d32f2f;
    }
    50% {
        box-shadow: 0 0 20px #ff3d3d, 0 0 30px #ff3d3d;
    }
    100% {
        box-shadow: 0 0 5px #d32f2f;
    }
}

.cta-box button:hover {
    animation: glowEffect 1.5s ease-in-out infinite;
}

/* Additional animation for news and CTA buttons on page load */
@keyframes fadeInButton {
    0% {
        opacity:1;
        transform: translateY(0px);
    }
    50% {
        opacity:0.8;
        transform: translateY(3px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Applying animation to buttons when page loads */
.cta-box button {
    animation: fadeInButton 1s ease-in-out forwards;
}

