:root {
    --primary-blue: #44ADE2;
    --secondary-blue: #284595;
    --accent-blue: #26A5DC;
    --light-blue: #E8F4FD;
    --white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-light: #6C757D;
    --success: #28A745;
    --shadow-light: rgba(68, 173, 226, 0.1);
    --shadow-medium: rgba(68, 173, 226, 0.2);
    --shadow-dark: rgba(68, 173, 226, 0.3);
}

* {
    font-family: 'Inter', sans-serif;
}

.poppins {
    font-family: 'Poppins', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid var(--light-blue);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loader-text {
    color: var(--primary-blue);
    font-weight: 500;
    font-size: 18px;
    text-align: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header Image Container */
.header-banner {
    padding: 40px 20px;
    text-align: center;
    background: var(--white);
}

.header-image {
    max-width: 85%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px var(--shadow-medium);
    transition: transform 0.3s ease;
}

.header-image:hover {
    transform: scale(1.02);
}

/* Leaflet Cards Section */
.leaflet-section {
    padding: 60px 20px;
}

/* Enhanced Leaflet Cards */
.leaflet-card {
    background: var(--white);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 15px 35px var(--shadow-light);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    margin-bottom: 30px;
}

.leaflet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.leaflet-card:hover::before {
    transform: scaleX(1);
}

.leaflet-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px var(--shadow-medium);
    border-color: var(--primary-blue);
}

.leaflet-image-container {
    position: relative;
    overflow: hidden;
    height: 300px;
    background: var(--light-blue);
}

.leaflet-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.4s ease;
}

.leaflet-card:hover img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(68, 173, 226, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.leaflet-card:hover .card-overlay {
    opacity: 1;
}

.card-body {
    padding: 30px;
    text-align: center;
}

.card-title {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-family: 'Poppins', sans-serif;
}

.card-text {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.card-badge {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

/* Leaflet Detail Page */
.leaflet-detail {
    display: none;
    animation: slideInUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--white);
}

.detail-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    padding: 30px 20px;
    color: white;
    text-align: center;
    position: relative;
}

.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateX(-5px);
}

.detail-content {
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--white) 100%);
}

.leaflet-detail-image {
    max-width: 100%;
    height: auto;
    border-radius: 25px;
    box-shadow: 0 25px 60px var(--shadow-medium);
    margin-bottom: 40px;
}

/* Language Selection */
.language-section {
    background: var(--white);
    border-radius: 25px;
    padding: 40px 30px;
    box-shadow: 0 15px 40px var(--shadow-light);
    border: 1px solid rgba(68, 173, 226, 0.1);
}

.language-title {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 12px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.language-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 25px;
}

.language-button {
    background: linear-gradient(135deg, var(--white) 0%, var(--light-blue) 100%);
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 16px 18px;
    border-radius: 18px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    transition: left 0.3s ease;
    z-index: -1;
}

.language-button:hover::before {
    left: 0;
}

.language-button:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px var(--shadow-medium);
}

.language-button:active {
    transform: translateY(-1px);
}

/* PDF Viewer Overlay Styles */
.pdf-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.pdf-viewer-container {
    background: var(--white);
    border-radius: 15px;
    width: 90%;
    height: 90%;
    max-width: 800px;
    max-height: 900px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.pdf-viewer-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdf-viewer-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.close-pdf-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-pdf-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.pdf-viewer-content {
    flex: 1;
    padding: 0;
    overflow: hidden;
}

.pdf-viewer-content iframe {
    border: none;
    width: 100%;
    height: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--primary-blue) 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-top: 60px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

/* Success Message */
.success-message {
    position: fixed;
    top: 30px;
    right: 30px;
    background: var(--white);
    color: var(--success);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.2);
    z-index: 1000;
    font-weight: 600;
    border: 2px solid var(--success);
    animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: slideInUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Loading Animation */
.downloading {
    background: linear-gradient(135deg, var(--text-light) 0%, #95a5a6 100%) !important;
    color: white !important;
    cursor: not-allowed;
    position: relative;
    overflow: hidden;
}

.downloading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    /* Reduce overall padding and margins */
    .hero-section {
        padding: 30px 0 20px;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1rem;
        padding: 0 10px;
    }
    
    .hero-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    /* Header banner optimization */
    .header-banner {
        padding: 20px 20px 0px 10px;
    }
    
    .header-image {
        max-width: 100%;
        border-radius: 15px;
    }
    
    /* Leaflet section mobile optimization */
    .leaflet-section {
        padding: 30px 15px;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
        padding: 0 10px;
    }
    
    /* Card optimizations */
    .leaflet-card {
        margin-bottom: 20px;
        border-radius: 20px;
    }
    
    .leaflet-image-container {
        height: 220px;
    }
    
    .card-body {
        padding: 20px 15px;
    }
    
    .card-title {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .card-text {
        font-size: 0.9rem;
        margin-bottom: 15px;
        line-height: 1.5;
    }
    
    .card-badge {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* Detail page mobile optimization */
    .detail-header {
        padding: 15px 10px;
        text-align: left;
    }
    
    .back-button {
        position: static;
        margin: 0 0 15px 0;
        padding: 10px 16px;
        font-size: 0.9rem;
        display: inline-flex;
        width: auto;
    }
    
    .detail-content {
        padding: 25px 12px;
    }
    
    .detail-content .text-center {
        margin-bottom: 1.2rem !important;
    }
    
    .leaflet-detail-image {
        margin-bottom: 0;
        border-radius: 20px;
    }
    
    /* Language section mobile optimization */
    .language-section {
        padding: 20px 16px;
        border-radius: 18px;
        margin: 0 5px;
    }
    
    .language-title {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }
    
    .language-subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
        padding: 0 8px;
        line-height: 1.4;
    }
    
    .language-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 10px;
        margin-top: 16px;
    }
    
    .language-button {
        padding: 12px 14px;
        font-size: 0.85rem;
        border-radius: 14px;
        min-height: 44px;
    }
    
    /* PDF Viewer mobile optimization */
    .pdf-viewer-container {
        width: 95%;
        height: 95%;
        border-radius: 10px;
    }
    
    .pdf-viewer-header {
        padding: 15px 20px;
    }
    
    .pdf-viewer-header h3 {
        font-size: 1rem;
    }
    
    .close-pdf-btn {
        width: 35px;
        height: 35px;
    }
    
    /* Footer mobile optimization */
    footer {
        padding: 25px 15px;
        margin-top: 30px;
    }
    
    .footer-content h4 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .footer-content p {
        font-size: 0.9rem;
    }
    
    /* Success message mobile */
    .success-message {
        top: 15px;
        right: 15px;
        left: 15px;
        padding: 15px 20px;
        font-size: 0.9rem;
        border-radius: 12px;
    }
    
    /* Preloader mobile */
    .loader {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .loader-text {
        font-size: 16px;
        padding: 0 20px;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.7rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .language-section {
        padding: 16px 12px;
        margin: 0 2px;
    }
    
    .language-title {
        font-size: 1.2rem;
        margin-bottom: 6px;
    }
    
    .language-subtitle {
        font-size: 0.85rem;
        margin-bottom: 16px;
        padding: 0 4px;
    }
    
    .language-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 8px;
        margin-top: 14px;
    }
    
    .language-button {
        padding: 10px 12px;
        font-size: 0.8rem;
        min-height: 40px;
    }
    
    .card-body {
        padding: 15px 12px;
    }
    
    .detail-content .text-center {
        margin-bottom: 1rem !important;
    }
    
    .leaflet-detail-image {
        border-radius: 15px;
    }
    
    /* PDF viewer extra small screens */
    .pdf-viewer-container {
        width: 98%;
        height: 98%;
        border-radius: 8px;
    }
    
    .pdf-viewer-header {
        padding: 12px 15px;
    }
    
    .pdf-viewer-header h3 {
        font-size: 0.9rem;
    }
    
    .close-pdf-btn {
        width: 32px;
        height: 32px;
    }
}

/* Landscape mobile orientation */
@media (max-width: 896px) and (orientation: landscape) {
    .hero-section {
        padding: 20px 0 15px;
    }
    
    .leaflet-section {
        padding: 25px 15px;
    }
    
    .detail-content {
        padding: 25px 15px;
    }
    
    .pdf-viewer-container {
        height: 98%;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .leaflet-card {
        border: 3px solid var(--text-dark);
    }
    
    .language-button {
        border-width: 3px;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --text-dark: #ffffff;
        --text-light: #cccccc;
        --light-blue: #2a3a4a;
    }
}