:root {
    /* Color palette */
    --primary-color: rgba(202, 216, 3, 0.9);
    --secondary-color: green;
    --accent-color: rgb(255, 136, 0);
    --background-color: rgb(205, 243, 148);
    --text-color: #333;
    --shadow-color: rgba(0, 0, 0, 0.2);
    
    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
}

/* Base styles */
body, html {
    font-family: 'Poppins', 'Montserrat', 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
    width: 100%;
    color: var(--text-color);
}

::selection {
    background-color: var(--accent-color);
    color: white;
}

h1 {
    text-align: center;
    position: relative;
}

h1::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 8px auto;
    border-radius: 2px;
}

/* Layout */
#map {
    width: 100%;
    height: 100vh;
    position: static !important;
}

main {
    margin: 0;
    padding: 0;
    position: absolute;
    top: 10vh;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    z-index: 5;
}

/* Custom button styling */
.custom-btn {
    background-color: rgba(255, 136, 0, 0.8);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-btn:hover {
    background-color: rgb(74, 133, 34);
    animation: pulse 1.5s infinite ease-in-out;
    box-shadow: 0 0 10px rgba(172, 255, 47, 0.7);
    transition: all 0.2s ease;
    transform: scale(1.02);
}

.custom-link {
    background-color: rgba(255, 136, 0, 0.8);
    color: white;
    text-decoration: none;
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.custom-link:hover {
    background-color: rgb(74, 133, 34);
    color: white;
    text-decoration: none;
}

footer {
    position: fixed;
    bottom: 0;
    max-height: 10vh;
    text-align: left;
    font-size: 0.8rem;
    background-color: rgba(202, 216, 3, 0.7);
    width: 100%; 
    border-top: 1px solid greenyellow; 
    padding-left: 15%; 
    padding-right: 15%;
    z-index: 15;
}

/* Table styling */
.custom-table thead th {
    background-color: rgba(202, 216, 3, 0.7);
    color: black;
}

.custom-table tbody td {
    background-color: rgba(202, 216, 3, 0.7);
    color: black;
}

article {
    position: fixed;
    top: 12%;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    width: 80%;
    display: block;
    flex-direction: column;
    justify-content: center;
}

.info {
    padding: var(--spacing-md);
    padding-bottom: 6rem;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-color);
}

/* Navigation */
.custom-navbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding-left: 10vw;
    background-color: rgba(189, 216, 3, 0.24);
    z-index: 1000;
    font-size: 100%;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow-color);
    backdrop-filter: blur(5px);
}

.custom-navbar .navbar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    padding: 0 var(--spacing-sm);
}

.custom-navbar .nav-item {
    padding: 0;
    flex: 1 1 auto;
    list-style: none;
}

/* Form elements */
.custom-form-control {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    transition: border 0.3s ease;
    width: 100%;
}

.custom-form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(255, 136, 0, 0.2);
}

.submit-btn {
    background-color: var(--secondary-color);
    color: white;
    font-weight: bold;
    cursor: pointer;
    padding: 10px;
}

.submit-btn:hover {
    background-color: #008800;
    transform: translateY(-2px);
}

.coordinate-display {
    font-size: 0.8rem;
    background-color: grey;
    color: white;
    border-radius: 3px;
    padding: 4px 8px;
}

/* Modal */
.custom-modal {
    position: absolute;
    top: 10vh;
    left: 10%;
    color: var(--text-color);
    padding: var(--spacing-md);
    text-align: left;
    animation: fadeIn 0.5s forwards;
    box-shadow: 0 4px 20px var(--shadow-color);
    z-index: 999;
    display: flex;
    flex-shrink: 1;
    border-radius: 8px;
    max-height: 80vh;
    overflow-y: auto;
    background-color: rgba(189, 216, 3, 0.24);
    backdrop-filter: blur(5px);
}

.custom-modal form {
    max-width: 400px;
    margin: 0 auto;
    padding: var(--spacing-md);
    border-radius: 8px;
    background-color: var(--primary-color);
    font-size: 100%;
}

.custom-modal::-webkit-scrollbar {
    width: 8px;
}

.custom-modal::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 10px;
}

/* Map elements */
.leaflet-marker-icon {
    background-color: transparent !important;
    border: none;
    padding: 0;
    margin: 0;
    transition: transform 0.3s ease;
}

.leaflet-marker-icon:hover {
    transform: scale(1.2);
}

.leaflet-popup-content {
    width: 100%;
}

.control-button {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50px;
    border: none;
    font-size: 18px;
    z-index: 100;
    color: black;
}

.marker-cluster {
    background-color: rgb(249, 170, 61) !important;
    border-radius: 100px;
    box-shadow: 0 0 10px rgba(85, 38, 5, 0.7);
}

.fa, .far, .fas {
    color: black;
    text-shadow: -1px 0 var(--accent-color), 0 1px var(--accent-color), 
                 1px 0 var(--accent-color), 0 -1px var(--accent-color);
    margin-left: -10px;
    margin-top: -10px;
    font-size: 1.5rem;
    filter: drop-shadow(0 0 0.2rem var(--accent-color));
}

/* Notifications */
.alert-custom {
    position: absolute;
    display: flex;
    width: max-content;
    z-index: 1001;
    border-radius: 20px;
    background-color: rgba(189, 216, 3, 0.6);
    top: 12vh;
    left: 10vw;
    padding: var(--spacing-md);
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 15px var(--shadow-color);
    animation: fadeOut 15s forwards;
}

.alert-custom li {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 1.2rem;
    color: black;
}

/* Carousel styles */
.carousel-control {
    z-index: 2;
}

.carousel-control:hover {
    background: rgba(0, 0, 0, 0.5);
}

.carousel-items {
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.carousel-items::-webkit-scrollbar {
    display: none;
}

/* Animations */
@keyframes fadeOut {
    0%   { opacity: 1; transform: translateY(0); }
    90%  { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

@keyframes fadeIn {
    0%   { opacity: 0; transform: translateY(0); }
    90%  { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 10px rgba(172, 255, 47, 0.7); }
    50% { box-shadow: 0 0 15px rgba(172, 255, 47, 0.9); }
    100% { box-shadow: 0 0 10px rgba(172, 255, 47, 0.7); }
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .custom-modal {
        width: 90%;
        left: 5%;
        right: 5%;
    }
    
    img#logo {
        max-height: 5vh;
    }
    
    .custom-navbar {
        height: 10vh;
    }
    
    .custom-navbar .navbar-nav {
        justify-content: center;
    }
}
