/* static/css/base.css */

/* =========================
   Reset and Base Styles
   ========================= */

/* Reset Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Body Styles */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f8f9fa; /* Light gray background */
    color: #333333; /* Dark text color for readability */
    transition: background-color 0.3s, color 0.3s;
}

/* Link Styles */
a {
    text-decoration: none;
    color: inherit;
}

/* Container Utility */
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* =========================
   Navbar Styles
   ========================= */

/* Navbar Container */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    position: relative;
    width: 100%;
}

/* Logo Styles */
.logo a.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #ff5722; /* Vibrant Orange */
    font-size: 1.5rem;
    transition: color 0.3s ease-in-out;
    white-space: nowrap; /* Prevents text wrapping */
    display: flex;
    align-items: center;
}

.logo a.navbar-brand:hover {
    color: #e64a19; /* Darker Orange on Hover */
}

.site-logo {
    height: 40px; /* Adjust the height to fit your design */
    margin-right: 10px; /* Add space between the logo and the text */
    vertical-align: middle; /* Align the logo with the text */
}

/* Hamburger Menu Styles */
.hamburger {
    display: none; /* Hidden by default; shown on mobile via media queries */
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 20px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
    margin-right: 1rem;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333333; /* Dark lines */
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Hamburger Animation When Active */
#menu-toggle:checked + .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background-color: #ff5722;
}

#menu-toggle:checked + .hamburger span:nth-child(2) {
    opacity: 0;
}

#menu-toggle:checked + .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    background-color: #ff5722;
}

/* Hide the checkbox */
#menu-toggle {
    display: none;
}

/* Navigation Links Wrapper */
.nav-links {
    display: flex;
    align-items: center;
    transition: left 0.3s ease-in-out;
    flex-grow: 1;
    justify-content: flex-end; /* Ensure links stay to the right */
}

/* Navigation Menu */
.menu {
    list-style: none; /* Remove default bullets */
    display: flex;
    flex-direction: row; /* Horizontal layout by default */
}

.menu li {
    margin-left: 1.5em;
    position: relative;
}

.menu li a {
    font-size: 1.2rem;
    color: #333333;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    display: block; /* Ensure the entire area is clickable */
}

.menu li a:hover {
    background-color: #ff5722;
    color: #ffffff;
}

/* Dropdown Menu Styles */
.menu li.dropdown {
    position: relative;
}

.menu li.dropdown .dropdown-content {
    list-style: none; /* Remove default bullets */
    padding: 0; /* Remove default padding */
    margin: 0; /* Remove default margin */
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background-color: #ffffff;
    min-width: 150px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    z-index: 1000;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.menu li.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content li a.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    color: #333333;
    transition: background-color 0.3s, color 0.3s;
    margin: 0; /* Add this to remove any margin */
    box-sizing: border-box; /* Add this to include padding in width calculation */
}

.dropdown-content li {
    width: 100%; /* Add this to ensure li takes full width */
    margin: 0; /* Remove any margin */
}

.dropdown-content li a.dropdown-item:hover {
    background-color: #ff5722;
    color: #ffffff;
}

/* Dropdown Divider */
.dropdown-content .dropdown-divider {
    height: 1px;
    margin: 0.5rem 0;
    overflow: hidden;
    background-color: #e9ecef;
}

/* =========================
   Search Form Styles
   ========================= */

/* Search Form Styling */
.search-form {
    display: flex;
    align-items: center;
    margin: 0;
}

.search-form input[type="text"] {
    padding: 8px 15px;
    border: 2px solid #007bff;
    border-radius: 5px 0 0 5px; /* Rounded corners on the left */
    outline: none;
    transition: all 0.3s ease-in-out;
    flex: 1; /* Makes the input take up the remaining width */
}

.search-form input[type="text"]:focus {
    border-color: #0056b3;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.search-form button {
    background-color: #007bff;
    color: #fff;
    border: 2px solid #007bff;
    border-left: none;
    padding: 10px 15px;
    border-radius: 0 5px 5px 0; /* Rounded corners on the right */
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

.search-form button:hover {
    background-color: #0056b3;
}

/* Responsive Handling */

.search-form button i {
    font-size: 1rem;
}

/* =========================
   Footer Styles
   ========================= */

footer {
    background-color: #ffffff; /* White background for contrast */
    padding: 2em 0; /* Adequate padding for spacing */
    text-align: center; /* Center-align text and content */
    margin-top: 40px; /* Space above the footer */
    transition: background-color 0.3s, color 0.3s;
    border-top: 2px solid #ff5722; /* Adds a top border for distinction */
}

footer p {
    margin-bottom: 1em;
    color: #333333;
    font-size: 1em;
    font-family: 'Poppins', sans-serif;
}

.social-media {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 1em 0 0;
}

.social-media li {
    margin: 0 10px;
}

.social-link {
    color: #333333;
    font-size: 1.5em;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

.social-link:hover {
    color: #ff5722;
    transform: scale(1.2);
}

.footer {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: #fff;
    padding: 3rem 0;
    position: relative;
    margin-top: 6rem;
}

.footer .container {
    position: relative;
    z-index: 2;
}

.footer::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to top right, transparent 49%, #1a1a1a 50%);
}

.footer p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

.social-media {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
}

.social-link {
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link:hover {
    color: #fff;
    transform: translateY(-5px);
    background: #ff5722;
    box-shadow: 0 5px 15px rgba(255, 87, 34, 0.3);
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: -100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #ff5722;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 999;
    opacity: 0;
}

#back-to-top.visible {
    bottom: 30px;
    opacity: 1;
}

#back-to-top:hover {
    transform: translateY(-5px);
    background: #ff7043;
    box-shadow: 0 8px 20px rgba(255, 87, 34, 0.4);
}

#back-to-top i {
    transition: transform 0.3s ease;
}

#back-to-top:hover i {
    transform: translateY(-2px);
}

/* =========================
   Responsive Styles
   ========================= */

/* Hamburger Menu Toggle for Mobile */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .hamburger {
        display: flex;
        position: relative;
        margin-right: 1rem;
        order: 1;
        z-index: 1001; /* Ensure it's above nav-links */
    }

    .logo {
        order: 2;
        flex-grow: 1;
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: #ffffff;
        width: 100%;
        height: 100%;
        transition: left 0.3s ease-in-out;
        padding-top: 2rem; /* Adjusted padding-top to reduce space at the top */
        z-index: 1000;
        overflow-y: auto;
        /* Align items to the top */
        align-items: center;
        justify-content: flex-start;
    }

    /* Toggle Menu: When checkbox is checked, move nav-links into view */
    #menu-toggle:checked + .hamburger + .nav-links {
        left: 0;
    }

    /* Keep hamburger menu visible and clickable when menu is open */
    #menu-toggle:checked + .hamburger {
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1001;
    }

    /* Adjust the hamburger icon when menu is open */
    #menu-toggle:checked + .hamburger span {
        background-color: #ff5722;
    }

    /* Navigation Menu */
    .menu {
        flex-direction: column;
        align-items: center;
    }

    .menu li {
        margin: 1em 0;
    }

    .menu li:first-child {
        margin-top: 0;
    }

    .menu li.dropdown .dropdown-content {
        position: static;
        box-shadow: none;
        border-radius: 0;
        width: 100%;
    }

    .menu li.dropdown .dropdown-content li a.dropdown-item {
        padding-left: 2em;
    }

    .dropdown:hover .dropdown-content {
        display: none;
    }

    /* Adjust Logo in Mobile View */
    .logo a.navbar-brand {
        font-size: 1.8rem;
    }

    /* Show search form in mobile view */
    .search-form {
        flex-direction: row;
        width: 100%;
        margin-top: 1rem;
    }

    .search-form input[type="text"] {
        width: calc(100% - 50px); /* Adjust input width */
        border-radius: 20px 0 0 20px;
    }

    .search-form button {
        border-radius: 0 20px 20px 0;
    }
}

/* =========================
   Swiper Carousel Styles
   ========================= */

/* Adjust Swiper Container */
.swiper-container {
    width: 100%;
    height: 60vh; /* Reduced height for better layout */
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    border-radius: 15px; /* Rounded corners */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* Subtle shadow */
}

.swiper-slide {
    position: relative;
    text-align: center;
    font-size: 18px;
    background: #fff;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px; /* Match container's rounded corners */
    border: 5px solid rgba(255, 255, 255, 0.6); /* Semi-transparent border */
    box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.1); /* Overlay effect */
    transition: transform 0.5s ease-in-out;
}

.swiper-slide img:hover {
    transform: scale(1.05); /* Zoom effect on hover */
}

.swiper-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 123, 255, 0.85);
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.2em;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    transition: opacity 0.5s ease-in-out;
}

.swiper-slide:hover .swiper-caption {
    opacity: 0.9;
}

.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.7);
    width: 12px;
    height: 12px;
    opacity: 1;
    transition: background-color 0.3s;
}

.swiper-pagination-bullet-active {
    background: #007bff;
}

.swiper-pagination {
    bottom: 20px !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .swiper-container {
        height: 40vh; /* Adjust height for mobile devices */
    }

    .swiper-caption {
        font-size: 1em;
        padding: 10px 20px;
    }

    /* Display slides vertically on mobile */
    .swiper-wrapper {
        flex-direction: column;
    }

    .swiper-slide {
        width: 100% !important; /* Ensure slides take full width */
        height: auto !important; /* Adjust height to content */
    }
}

.footer .copyright-text {
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    margin-bottom: 2rem;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.footer .copyright-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    z-index: -1;
}

.footer .copyright-text:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.footer .copyright-text p {
    color: #ffffff; /* Fallback color */
    background: linear-gradient(45deg, #ffffff, #ff8a65);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 1px;
    margin: 0;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    position: relative;
    font-family: 'Poppins', sans-serif;
    z-index: 3;
}

.footer .copyright-text p::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff5722, transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

.footer .footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Enhance the glow effect */
.footer .copyright-text:hover p {
    animation: textGlow 1.5s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
    }
    to {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.8),
                     0 0 20px rgba(255, 134, 100, 0.8);
    }
}
