/* Define color variables */
:root {
    --primary-red: #fe4900;
    --primary-green: #1aa514;
    --primary-black: #4e4e4f;
    --primary-white: #fefefe;
    --transition-speed: 0.3s ease-in-out;

    --bg-gradient: linear-gradient(rgba(52, 58, 64, 0.6), rgba(52, 58, 64, 0.6)), 
                   url('assets/img/cc_1.jpg') no-repeat center center/cover;
    --bg-attachment: fixed;
    --bg-size: cover;
    --bg-position: center;
}

/* General Smooth Transitions */
* {
    transition: all var(--transition-speed);
}

/* Full-screen map */
html, body {
    font-family: "Montserrat", sans-serif !important;
    height: 100%;
    margin: 0;
    padding: 0;
    
}

body.scrolled #header {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: fixed !important;
    background: rgba(254, 73, 0, 0.8); 
    backdrop-filter: blur(10px);
}

/* Sticky Navigation */
.navbar {
    background-color: var(--primary-red);
    color: var(--primary-white);
    top: 0;
    width: 100%;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar a {
    color: var(--primary-white);
    margin-right: 15px;
}

.navbar a:hover {
    text-decoration: none;
    color: var(--primary-green);
}

.sticky-top{
    position: sticky !important;
}

/* Sidebar */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background: var(--primary-red);
    color: var(--primary-white);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 9999;
    padding: 20px;
    border-right: 1px solid var(--primary-black);
}

#sidebar.active {
    transform: translateX(0);
}

.sidebar a {
    display: flex;
    align-items: center;
    color: var(--primary-white);
    text-decoration: none;
    padding: 10px 0;
}

.sidebar a i {
    margin-right: 10px;
}

.sidebar a:hover {
    background-color: var(--primary-white);
    color: var(--primary-red);
    padding-left: 10px;
    transition: 0.3s;
}

/* Sidebar Toggle */
.sidebar-toggle {
    background: var(--primary-red);
    color: var(--primary-white);
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: none;
}

#sidebar .close-btn {
    text-align: right;
    padding: 10px;
}

/* Floating search and filter box */
.map-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary-white);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 300px;
}

/* Custom Map Marker */
.custom-marker {
    background: rgba(65, 179, 0, 0.8);
    color: var(--primary-white);
    border-radius: 50%;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary-white);
    padding: 10px;
}

/* Buttons */
.btn {
    background-color: var(--primary-red);
    color: var(--primary-white);
    border: none;
}

.btn:hover {
    background-color: var(--primary-green);
    color: var(--primary-white) !important; 
}

/* Animation for Titles */
.slide-title {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Animation for Text */
.slide-text {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

/* Active Slide Animation */
.swiper-slide-active .slide-title,
.swiper-slide-active .slide-text {
    opacity: 1;
    transform: translateY(0);
}

/* Swiper Navigation */
.swiper-button-next,
.swiper-button-prev {
    color: var(--primary-red);
    font-size: 24px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Breadcrumb */
.breadcrumb {
    background-color: var(--primary-white);
    padding: 10px;
    border-radius: 5px;
    display: flex;
}

.breadcrumb-item a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: bold;
}

.breadcrumb-item.active {
    color: var(--primary-black);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--primary-red);
    content: "›";
    padding: 0 8px;
}

/* Pagination */
.pagination .page-item .page-link {
    background-color: var(--primary-white);
    color: var(--primary-red);
    border: none;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-red);
    color: var(--primary-white);
}

.pagination .page-item .page-link:hover {
    background-color: var(--primary-green);
    color: var(--primary-white);
}

/* Cards */
.business-card {
    transition: transform 0.3s ease-in-out;
}

.business-card:hover {
    transform: scale(1.05);
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

/* Category Icon */
.category-icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--primary-black);
    transition: color 0.3s ease, transform 0.2s ease;
}

.category-icon-link:hover {
    color: var(--primary-white);
    transform: scale(1.1);
    text-decoration: none;
}

.category-icon:hover{
    background-color: var(--primary-green);
    color: var(--primary-white);
}

.category-icon {
    font-size: 2rem;
    background-color: var(--primary-white);
    color: var(--primary-green);
    border-radius: 50%;
    padding: 10px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

/* Stars for Ratings */
.star {
    font-size: 2rem;
    color: #ccc;
    transition: color 0.3s ease;
    cursor: pointer;
}

.star:hover,
.star.active {
    color: #ffc107;
}

/* DataTables Buttons */
.dt-buttons .btn-primary {
    background-color: var(--primary-red) !important;
    border-color: var(--primary-red) !important;
}

.dt-buttons .btn-success {
    background-color: var(--primary-green) !important;
    border-color: var(--primary-green) !important;
}

.dt-buttons .btn-warning {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
}

.dt-buttons .btn-danger {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

/* Responsive Sidebar */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }

    .sidebar-toggle {
        display: block;
    }
}

#map-container {
    position: relative;
    height: 100vh;
    display: flex;
}

#map {
    width: 100%;
    top: 0;
    left: 0;
    flex: 1;
    height: 80vh;
    position: relative;
}

/* Floating search and filter box */
.map-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 300px;
}

.custom-marker {
    background: rgba(0, 128, 0, 0.8); /* Green with 80% opacity */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white; /* White border */
    padding: 10px; /* Adjust padding if needed */
}

.btn,
.add-btn,
.pagination .page-item .page-link,
.dt-buttons .btn-primary,
.dt-buttons .btn-success,
.dt-buttons .btn-warning,
.dt-buttons .btn-danger {
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}

/* Button hover effect */
.btn:hover,
.add-btn:hover,
.pagination .page-item .page-link:hover,
.dt-buttons .btn-primary:hover,
.dt-buttons .btn-success:hover,
.dt-buttons .btn-warning:hover,
.dt-buttons .btn-danger:hover {
    transform: scale(1.05); /* Slightly enlarges on hover */
}

/* Button active (click) effect */
.btn:active,
.add-btn:active,
.pagination .page-item .page-link:active,
.dt-buttons .btn-primary:active,
.dt-buttons .btn-success:active,
.dt-buttons .btn-warning:active,
.dt-buttons .btn-danger:active {
    transform: scale(0.95); /* Slightly shrinks on click */
}

/* Pagination hover effect */
.pagination .page-item .page-link {
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.pagination .page-item .page-link:hover {
    background-color: var(--spruce);
    color: var(--linen);
}

/* Category icon hover effect */
.category-icon-link {
    transition: color var(--transition-speed), transform var(--transition-speed);
}

.category-icon-link:hover {
    color: var(--linen);
    transform: scale(1.1);
}

/* Stars rating hover effect */
.star {
    transition: color var(--transition-speed);
}

.star:hover,
.star.active {
    color: #ffc107;
}

/* Swiper button hover effect */
.swiper-button-next,
.swiper-button-prev {
    transition: background var(--transition-speed);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Animation for text and titles */
.slide-title,
.slide-text {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.swiper-slide-active .slide-title,
.swiper-slide-active .slide-text {
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu-right a.dropdown-item{
    color: var(--primary-black)
}

.dropdown-menu-right a.dropdown-item:hover{
    color: var(--primary-green)
}

.breadcrumb-container {
    display: flex;
    justify-content: flex-end; /* Align to the right */
    padding: 10px 0;
}

#preloader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--primary-red);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: var(--primary-red);
    color: var(--primary-white);
    cursor: pointer;
    padding: 15px;
    border-radius: 8px;
    transition: background-color 0.3s, transform 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


.read-more {
    color: var(--primary-red);
    font-weight: bold;
    text-decoration: none;
}

.read-more:hover {
    color: var(--primary-green);
    text-decoration: underline;
}

.transparent-section {
    background: rgba(26, 165, 20, 0.2);
    backdrop-filter: blur(4px);
}

.contact-header h1 {
    font-size: 3rem;
    font-weight: bold;
}

.contact-header p {
    font-size: 1.2rem;
}

.contact-form {
    padding: 40px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--primary-black);
    border-radius: 5px;
    font-size: 1rem;
}

.contact-form textarea {
    resize: none;
    height: 150px;
}

.contact-form button {
    background-color: var(--primary-red);
    color: var(--primary-white);
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background-color:var(--primary-green);
}

.blog-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.blog-card:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.blog-card img {
    height: 200px;
    object-fit: cover;
}

.blog-category {
    font-size: 14px;
    font-weight: bold;
    color: var(--primary-green);
    text-transform: uppercase;
}

.blog-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.blog-meta {
    font-size: 14px;
    color: #777;
}

.blog-summary {
    color: #555;
}

.icon-box {
    text-align: center;
    padding: 30px;
    border-radius: 10px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.icon-box:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.icon-box i {
    font-size: 3rem;
    color: var(--primary-green);
    margin-bottom: 20px;
}

.icon-box h5 {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-green);
}

.icon-box p {
    font-size: 1rem;
}

.mission-section {
background-color: var(--primary-white); /* Inverted: Spruce background */
text-align: center;
}

.mission-section h2 {
font-size: 2.5rem;
margin-bottom: 20px;
color: var(--primary-green); 
}

.mission-section p {
font-size: 1.2rem;
max-width: 600px;
margin: 0 auto;
color: var(--primary-black); 
}

.category-card {
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    background-color: var(--primary-green);
    color: var(--primary-white);
}

.post-count {
    font-size: 18px;
    color: var(--primary-red);
    font-weight: bold;
}

.post-card {
    transition: transform 0.3s ease-in-out;
}

.post-card:hover {
    transform: scale(1.05);
}

.category-sidebar {
    position: sticky;
    top: 100px;
}

.category-card.active {
    background-color: var(--primary-green);
    color: var(--primary-white);
}
.carousel-item {
    transition: transform 0.5s ease-in-out;
}

#mainCarousel {
    transition: height 0.2s ease-in-out;
}

.wrap-text {
    white-space: normal; /* Allow wrapping */
    font-size: 0.9em;
    word-wrap: break-word; /* Break long words if necessary */
    max-width: 100px; /* Optional: Set a max width */
}

.swal2-timer-progress-bar {
    background: var(--primary-red) !important;
    height: 6px !important;
}