:root {
    --primary-color: #1d70b8;
    --secondary-color: #5a5a5a;
    --dark-bg: #1a1a1a;
    --card-bg: #ffffff;
    --text-color: #333333;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    color: var(--text-color);
    background-color: #f8f9fa;
}

.bi-arrow-up {
    vertical-align: text-top;
}

/*Navbar*/
.navbar {
    background-color: var(--primary-color);
    padding: 0.8rem 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar .nav-link:hover {
    text-decoration: underline;
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.navbar .nav-link.active {
    font-weight: bold;
    text-decoration: underline;
}

.site-logo {
    height: 36px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .site-logo {
    transform: rotate(15deg);
}

/* Hero Section*/
.hero-section {
    background-image: url('../assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    position: relative;
}

.hero-overlay {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7));
    padding: 5rem 0;
}

.hero-section[data-season="spring"] .hero-overlay {
    background: linear-gradient(rgba(76, 175, 80, 0.6), rgba(0, 0, 0, 0.7));
}

.hero-section[data-season="summer"] .hero-overlay {
    background: linear-gradient(rgba(255, 152, 0, 0.6), rgba(0, 0, 0, 0.7));
}

.hero-section[data-season="autumn"] .hero-overlay {
    background: linear-gradient(rgba(121, 85, 72, 0.6), rgba(0, 0, 0, 0.7));
}

.hero-section[data-season="winter"] .hero-overlay {
    background: linear-gradient(rgba(33, 150, 243, 0.6), rgba(0, 0, 0, 0.7));
}

/* Search Container*/
.search-container {
    background: rgba(25, 28, 36, 0.8);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.search-container h1 {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.search-container .form-control {
    border: none;
    height: 54px;
    font-size: 1.1rem;
}

.search-container .btn {
    padding: 0.5rem 1.5rem;
}

.search-container .btn:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Make the search input more prominent */
.search-container .input-group {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-container .input-group:focus-within {
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.search-container .form-control {
    border-radius: 50px 0 0 50px;
    padding-left: 1.5rem;
}

.search-container .btn {
    border-radius: 0 50px 50px 0;
    padding: 0.5rem 1.75rem;
}

/* Pulse animation for better UX feedback */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(29, 112, 184, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(29, 112, 184, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(29, 112, 184, 0);
    }
}

.search-container .btn:hover {
    animation: pulse 1.5s infinite;
}

/* Enhanced Weather Card */
/* Fix for weather results container */
#weatherResults {
    opacity: 0;
    transition: all 0.3s ease;
}

#weatherResults.show {
    opacity: 1;
}

.weather-card {
    overflow: hidden;
    border-radius: 12px !important;
    transition: all 0.3s ease-in-out;
    background-color: transparent;
    transform: translateY(20px);
    opacity: 0;
    border: none;
    backdrop-filter: blur(10px);
}

.weather-card.show {
    transform: translateY(0);
    opacity: 1;
}

.weather-info-side {
    background-color: #f0f4f8;
    border-radius: 12px 0 0 12px;
}

.weather-data-side {
    background-color: #ffffff;
    border-radius: 0 12px 12px 0;
}

.weather-time-container,
.weather-icon-container {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.weather-time-container:hover,
.weather-icon-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.time-display {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.weather-detail-item {
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
}

.weather-detail-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.weather-detail-label {
    display: block;
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 0;
    line-height: 1;
}

body.dark-mode .weather-detail-label {
    color: #adb5bd;
}

.weather-detail-value {
    display: block;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Location Time Styling */
.location-time-container {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    padding: 12px;
    margin: 1rem 0;
    transition: all 0.3s ease;
    position: relative;
}

.location-time-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.time-icon-container {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1d70b8;
}

/* Weather Icon Responsiveness */
#weatherIcon {
    max-width: 150px;
    margin: 0 auto 1rem;
}

#weatherIcon img {
    width: 100%;
    height: auto;
    max-width: 150px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
    transition: all 0.5s ease;
}

#weatherIcon img:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 8px 25px rgba(0, 0, 0, 0.15));
}

/* Features Section */
.features-section {
    padding: 5rem 0;
    background-color: #f8f9fa;
}

.section-title {
    margin-bottom: 2.5rem;
    text-align: center;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

.section-title:after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.feature-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.icon-container {
    background-color: rgba(29, 112, 184, 0.1);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
}

.icon-container i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-card p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

/* Video Section */
.video-section {
    padding: 5rem 0;
    background-color: #ffffff;
}

.video-section .card {
    border: none;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.video-section .card-body {
    padding: 0;
}

.video-section video {
    border-radius: 12px 12px 0 0;
}

.video-section .bg-light {
    border-radius: 0 0 12px 12px;
}

/* Recent Places */
.recent-places {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.recent-places:hover {
    background: rgba(159, 157, 157, 0.15);
}

.recent-places h3 {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.recent-searches .list-group-item {
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 4px;
}

.recent-searches .list-group-item:hover {
    transform: translateX(5px);
    background-color: rgba(255, 255, 255, 0.2) !important;
}

.recent-searches .list-group-item {
    color: #a8a5a5;
    background-color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/*Footer*/
footer .d-flex img {
    transition: transform 0.3s ease;
    width: 80px;
    height: 80px;
    margin: 0 1rem;
}

footer .d-flex img:hover {
    transform: scale(1.1);
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    z-index: 9999;
    transition: bottom 0.5s ease;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
}

.cookie-consent.active {
    bottom: 0;
    opacity: 1;
}

.cookie-consent p {
    margin-bottom: 0;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader img {
    transform: scale(1);
    transition: all 0.5s ease-in-out;
}

.preloader h1 {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}

.preloader .text-muted {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.preloader.active img {
    transform: scale(1.2) rotate(15deg);
}

.preloader.active h1 {
    opacity: 1;
    transform: translateY(0);
}

.preloader.active .text-muted {
    opacity: 1;
}

body.loaded .preloader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Toast Styling */
.toast {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(-20px);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
}

.toast-body {
    padding: 0.75rem 1rem;
    background-color: #fff;
}

/* Map Popup Styling */
.map-popup {
    padding: 5px;
}

.map-popup h6 {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.map-popup .bi {
    width: 18px;
    text-align: center;
    color: var(--primary-color);
    margin-right: 4px;
}

/* DARK MODE OVERRIDES */
body.dark-mode {
    background-color: var(--dark-bg);
    color: #ffffff;
}

body.dark-mode .text-primary {
    color: #6ea8fe !important;
}

body.dark-mode .navbar {
    background-color: #222;
}

body.dark-mode .features-section,
body.dark-mode .video-section {
    background-color: var(--dark-bg);
}

body.dark-mode .feature-card {
    background-color: #2d2d2d;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

body.dark-mode .feature-card p {
    color: #adb5bd;
}

body.dark-mode .feature-card .btn-outline-primary {
    color: #6ea8fe;
    border-color: #6ea8fe;
}

body.dark-mode .feature-card .btn-outline-primary:hover {
    background-color: #1d70b8;
    color: white;
}

body.dark-mode .video-section .card {
    background-color: #2d2d2d;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

body.dark-mode .video-section .bg-light {
    background-color: #333 !important;
    color: white;
}

body.dark-mode .modal-content {
    background-color: #2d2d2d;
    color: #fff;
}

body.dark-mode .form-control {
    background-color: #3a3a3a;
    border-color: #555;
    color: #fff;
}

body.dark-mode .form-label,
body.dark-mode .form-check-label {
    color: #ddd;
}

body.dark-mode .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

body.dark-mode .preloader {
    background-color: var(--dark-bg);
}

body.dark-mode .preloader .text-muted {
    color: #adb5bd !important;
}

body.dark-mode .weather-info-side {
    background-color: #2d2d2d;
}

body.dark-mode .weather-data-side {
    background-color: #343a40;
}

body.dark-mode .weather-time-container,
body.dark-mode .weather-icon-container {
    background-color: #212529;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

body.dark-mode .weather-detail-item:hover {
    background-color: #2d2d2d;
}

body.dark-mode .weather-detail-label {
    color: #adb5bd;
}

body.dark-mode .weather-detail-value {
    color: #6ea8fe;
}

/* Fix for locationDate text color in dark mode */
body.dark-mode #locationDate {
    color: #adb5bd !important;
}

/* Fix for text-muted in dark mode */
body.dark-mode .text-muted {
    color: #adb5bd !important;
}

body.dark-mode .weather-card .card-body {
    background-color: #2d2d2d !important;
    color: #fff !important;
    border: 1px solid #444;
}

body.dark-mode .location-time-container {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .location-time-container:hover {
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.05);
}

body.dark-mode .time-icon-container {
    color: #6ea8fe;
}

body.dark-mode #weatherIcon img {
    filter: drop-shadow(0 5px 15px rgba(255, 255, 255, 0.05));
    /* Ensure proper visibility of weather icon in dark mode */
    opacity: 1;
    visibility: visible;
}

body.dark-mode #weatherIcon img:hover {
    filter: drop-shadow(0 8px 25px rgba(255, 255, 255, 0.1));
    opacity: 1;
}

/* Fix for weather icon and text visibility in all modes */
#weatherIcon img {
    opacity: 1 !important;
    visibility: visible !important;
}

#weatherDescription {
    opacity: 1 !important;
    visibility: visible !important;
}

body.dark-mode .toast-header {
    background-color: #333;
    color: #fff;
    border-bottom: 1px solid #444;
}

body.dark-mode .toast-body {
    background-color: #2d2d2d;
    color: #fff;
}

body.dark-mode .recent-searches .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

body:not(.dark-mode) .weather-card .card-body {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: var(--text-color);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

/* Accessibility Improvements */
.btn:focus,
.form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

body.dark-mode .btn:focus,
body.dark-mode .form-control:focus {
    outline-color: #6ea8fe;
}

/* RESPONSIVE DESIGN */
@media (max-width: 991px) {
    .search-container {
        margin: 0 1rem;
    }

    .video-section .card {
        margin: 0 1rem;
    }
}

@media (max-width: 767px) {
    .hero-overlay {
        padding: 3rem 0;
    }

    .features-section,
    .video-section {
        padding: 3rem 0;
    }

    .feature-card {
        margin-bottom: 1.5rem;
    }

    .time-display {
        font-size: 1.4rem;
    }

    .weather-info-side {
        border-radius: 12px 12px 0 0;
    }

    .weather-data-side {
        border-radius: 0 0 12px 12px;
    }
}

@media (max-width: 576px) {
    .search-container {
        padding: 1.5rem;
    }

    .time-display {
        font-size: 1.2rem;
    }

    .weather-detail-value {
        font-size: 0.95rem;
    }

    .weather-detail-item {
        padding: 5px;
    }

    #weatherIcon {
        max-width: 80px;
    }

    #weatherIcon img {
        max-width: 60px;
    }
}

@media (max-width: 768px) {
    #weatherIcon {
        max-width: 100px;
    }

    #weatherIcon img {
        max-width: 80px;
    }
}