/* Root Variables */
:root {
    --evridika-primary: rgb(94, 29, 44);
    --evridika-primary-light: rgb(134, 49, 64);
    --evridika-primary-dark: rgb(64, 19, 34);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    --font-navbar: 'Playfair Display', serif;
}

/* Base Styles */
html {
    font-size: 14px;
    scroll-behavior: auto !important; /* DISABLE smooth scrolling globally */
}

html, body {
    scroll-behavior: auto !important; /* DISABLE smooth scrolling globally */
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: var(--font-body);
    color: #333;
    background: linear-gradient(135deg, 
        #f5c2cd 0%,
        #fce4e9 25%, 
        #ffebf0 50%,
        #fce4e9 75%, 
        #f5c2cd 100%); /* Enhanced gradient with wider color range - more distinctive */
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 40px,
            rgba(94, 29, 44, 0.08) 40px,
            rgba(94, 29, 44, 0.08) 41px
        );
    pointer-events: none;
    z-index: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--evridika-primary);
}

/* Main Content Spacing */
.main-content {
    padding-top: 3rem;
    padding-bottom: 3rem;
    /* Removed stacking context to allow modals to overlay correctly */
}

/* Remove padding for homepage (has its own hero section spacing) */
.main-content.homepage {
    padding-top: 0;
    padding-bottom: 0;
}

/* Navigation */
.evridika-navbar {
    background: linear-gradient(135deg, var(--evridika-primary-dark) 0%, var(--evridika-primary) 50%, var(--evridika-primary-dark) 100%);
    padding: 1rem 0;
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0;
    position: relative;
    z-index: 10;
}

.card,
.card-header,
.card-body,
.bg-light {
    position: relative;
    z-index: 1 !important;
}

header {
    margin-bottom: 0 !important;
    position: relative;
    z-index: 10;
}


.evridika-brand {
    font-family: var(--font-navbar);
    color: #fff !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

.evridika-brand:hover {
    transform: translateY(-2px);
}

.navbar-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.evridika-brand .brand-main {
    font-weight: 700;
    letter-spacing: 4px;
    font-size: 1.3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.evridika-brand .brand-sub {
    font-style: italic;
    font-weight: 400;
    font-size: 1rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.navbar-dark .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-family: var(--font-navbar);
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
}

.navbar-dark .nav-link:hover {
    color: #fff !important;
    transform: translateY(-2px);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.navbar-dark .dropdown-menu {
    background-color: var(--evridika-primary-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: fadeInDropdown 0.3s ease-in-out;
    transform-origin: top;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-dark .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.6rem 1.5rem;
    transition: all 0.2s ease;
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.navbar-dark .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding-left: 1.75rem;
}

.user-menu-toggle {
    font-size: 0.95rem !important;
}

.user-dropdown {
    min-width: 160px;
}

.user-dropdown .dropdown-item {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* Buttons */
.btn-primary {
    background-color: var(--evridika-primary);
    border-color: var(--evridika-primary);
}

.btn-primary:hover {
    background-color: var(--evridika-primary-dark);
    border-color: var(--evridika-primary-dark);
}

.btn-outline-primary {
    color: var(--evridika-primary);
    border-color: var(--evridika-primary);
}

.btn-outline-primary:hover {
    background-color: var(--evridika-primary);
    border-color: var(--evridika-primary);
}

/* Focus States */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--evridika-primary);
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.card-title {
    color: var(--evridika-primary);
}

/* Post Styles */
.post-item {
    background-color: white;
    border: 1px solid #eee;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-item:last-child {
    margin-bottom: 1rem;
}

.post-title {
    color: var(--evridika-primary);
    margin-bottom: 0.5rem;
}

.post-excerpt {
    color: #666;
    margin-bottom: 0.5rem;
}

.post-meta {
    font-size: 0.875rem;
    color: #999;
}

/* Preserve author-entered whitespace and newlines inside post content */
.post-content {
    white-space: pre-wrap;
}

/* Pagination */
.pagination .page-link {
    color: var(--evridika-primary);
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--evridika-primary);
    border-color: var(--evridika-primary);
}

.pagination .page-link:hover {
    color: #f8f9fa;
    background-color: var(--evridika-primary-light);
}


.pagination .page-item.active .page-link:hover {
    background-color: var(--evridika-primary);
    color: #f8f9fa;
}

/* Footer */
.footer {
    background-color: #f8f9fa;
    padding: 1rem 0;
    font-size: 0.875rem;
}

/* File Attachments */
.file-item {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-item:hover {
    background-color: #f8f9fa;
}

.file-icon {
    width: 24px;
    height: 24px;
    margin-right: 0.5rem;
}

/* Admin Styles */
.admin-header {
    background-color: var(--evridika-primary);
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.admin-header h1 {
    color: white;
    margin: 0;
}

/* Admin Table Styles */
.table-responsive {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.table {
    background-color: white;
    margin-bottom: 0;
}

.table thead {
    background-color: rgba(94, 29, 44, 0.05);
}

.table tbody tr {
    background-color: white;
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(94, 29, 44, 0.02);
}

/* Document Viewers */
.file-viewer-container {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.file-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.file-header .file-icon {
    width: 24px;
    height: 24px;
    color: var(--evridika-primary);
}

.pdf-viewer,
.doc-viewer {
    width: 100%;
    min-height: 600px;
    position: relative;
    border-radius: 0.25rem;
    overflow: hidden;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.pdf-frame,
.doc-frame {
    width: 100%;
    height: 600px;
    border: none;
    background-color: white;
}

.pdf-viewer iframe,
.doc-viewer iframe {
    display: block;
}

.doc-preview-card {
    width: 100%;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 0.5rem;
    border: 2px solid #dee2e6;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.doc-preview-header {
    margin-bottom: 2rem;
}

.doc-preview-header svg {
    color: var(--evridika-primary);
    margin-bottom: 1rem;
}

.doc-preview-header h5 {
    color: var(--evridika-primary);
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

.doc-preview-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.doc-preview-actions .btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.doc-preview-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 0, 62, 0.3);
}

.doc-preview-actions .btn-outline-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.image-viewer {
    width: 100%;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    border: 1px solid #dee2e6;
}

.image-viewer img {
    transition: transform 0.2s ease;
}

.image-viewer img:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .pdf-viewer,
    .doc-viewer {
        min-height: 400px;
    }
    
    .pdf-frame,
    .doc-frame {
        height: 400px;
    }
    
    .image-viewer img {
        max-height: 400px !important;
    }
    
    .doc-preview-card {
        padding: 2rem 1rem;
    }
    
    .doc-preview-actions {
        flex-direction: column;
    }
    
    .doc-preview-actions .btn-lg {
        width: 100%;
        justify-content: center;
    }
}

/* History Page */
.history-content {
    line-height: 1.8;
    font-size: 1.05rem;
}

.history-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.history-content h2 {
    color: var(--evridika-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--evridika-primary);
    padding-bottom: 0.5rem;
}

.history-content h3 {
    color: var(--evridika-primary);
    font-weight: 600;
    margin-top: 1.5rem;
}

/* Team Page */
.team-section {
    margin-bottom: 3rem;
}

.team-section h2 {
    color: var(--evridika-primary);
    border-bottom: 2px solid var(--evridika-primary);
    padding-bottom: 0.5rem;
}

/* Images Grid - Responsive Layout */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.image-grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    background-color: #f8f9fa;
    aspect-ratio: 1 / 1; /* Square thumbnails */
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid #dee2e6;
}

.image-grid-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    z-index: 1;
}

.image-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Gallery Image - Clickable */
.gallery-image {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.gallery-image:hover {
    opacity: 0.85;
}

/* Image Modal / Lightbox */
#imageModal .modal-content {
    background: linear-gradient(135deg, var(--evridika-primary-dark) 50%, var(--evridika-primary) 50%);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.75rem;
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
    padding-bottom: 3.5rem;
}

#imageModal .modal-body {
    padding: 1rem;
}

#imageModal img {
    border-radius: 0.25rem;
}

#imageModal .btn {
    border-radius: 50%;
    width: 45px;
    height: 45px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#imageModal .btn:hover {
    opacity: 1 !important;
    transform: scale(1.1);
    background-color: var(--evridika-primary);
    color: white;
    border-color: var(--evridika-primary);
}

/* Decorative bottom accent overlay (sits on top of the image) */
#imageModal .image-bottom-overlay {
    position: absolute;
    left: -1rem; /* extend over body padding */
    right: -1rem;
    bottom: -1rem;
    height: 10px;
    background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.25), rgba(255,255,255,0.08));
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
    pointer-events: none;
}

/* Document Modal - match image modal branding */
#documentModal .modal-content {
    background: linear-gradient(135deg, var(--evridika-primary-dark) 50%, var(--evridika-primary) 50%);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.75rem;
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
    padding-bottom: 3.5rem;
}

#documentModal .modal-header .modal-title {
    color: #fff;
}

/* Footer */
.evridika-footer {
    background: linear-gradient(135deg, var(--evridika-primary-dark) 0%, var(--evridika-primary) 50%, var(--evridika-primary-dark) 100%);
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
    border-top: 3px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    z-index: 10;
}

.evridika-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.30;
    z-index: 0;
}

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

.footer-heading {
    font-family: var(--font-navbar);
    font-weight: 600;
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: inline-block;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.footer-copyright {
    font-family: var(--font-navbar);
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.footer-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
    font-style: italic;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(94, 29, 44, 0.95) 0%, rgba(64, 19, 34, 0.98) 100%);
    color: #fff;
    padding: 6rem 0;
    margin-bottom: 3rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/images/school2.jpg');
    background-size: 100% 125%;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: var(--font-navbar);
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 6px;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    color: #fff;
}

.hero-subtitle {
    font-family: var(--font-navbar);
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.btn-hero {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0 0.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

/* Section Styling */
.section-title {
    font-family: var(--font-navbar);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--evridika-primary);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.section-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--evridika-primary), transparent);
    margin: 0 auto 2rem;
}

/* News Cards */
.news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(94, 29, 44, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(94, 29, 44, 0.2);
}

.news-card-body {
    padding: 1.75rem;
    flex-grow: 1;
}

.news-card-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.news-card-title a {
    color: var(--evridika-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-card-title a:hover {
    color: var(--evridika-primary-light);
}

.news-card-excerpt {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-card-date {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 0;
}

.news-card-footer {
    padding: 1rem 1.75rem;
    background: rgba(94, 29, 44, 0.03);
    border-top: 1px solid rgba(94, 29, 44, 0.1);
}

.news-read-more {
    color: var(--evridika-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.news-read-more:hover {
    color: var(--evridika-primary-light);
    padding-left: 8px;
}

/* Features Section */
.features-section {
    background: rgba(94, 29, 44, 0.02);
    padding: 4rem 0;
    margin-top: 4rem;
}

.feature-box {
    text-align: center;
    padding: 2rem 1rem;
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3.5rem;
    color: var(--evridika-primary);
    margin-bottom: 1.5rem;
}

.feature-title {
    font-family: var(--font-navbar);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--evridika-primary);
    margin-bottom: 1rem;
}

.feature-description {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 991.98px) {
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-item {
        padding: 0.25rem 0;
    }
    
    .dropdown-menu {
        border: 1px solid #dee2e6;
        box-shadow: none;
    }
}

/* Responsive adjustments for images grid */
@media (max-width: 768px) {
    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
    }
}

/* ========================================
   ANIMATION SYSTEM - Professional Interactions
   ======================================== */

/* Specific Element Transitions - No Universal Selector */
.news-card, 
.feature-box, 
.post-item,
.btn,
.image-grid-item,
.document-grid-item,
.document-card,
.image-grid-item img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

a {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Button Animations with Ripple Effect */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Enhanced Card Hover Effects */
.news-card, .feature-box, .post-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card:hover, .feature-box:hover, .post-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(107, 0, 62, 0.2);
}

/* Navbar Dropdown Slide Animation */
.dropdown-menu {
    animation: slideDown 0.3s ease-out;
    transform-origin: top;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    transform: translateX(5px);
    background-color: rgba(107, 0, 62, 0.1);
}

/* Form Input Focus Animations */
.form-control, .form-select {
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    transform: scale(1.01);
    box-shadow: 0 0 0 3px rgba(107, 0, 62, 0.1);
}

/* Brand-styled selects (keeps native optgroup/option structure) */
.form-select {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b003e'%3e%3cpath d='M3.2 5.5l4.8 5 4.8-5a.75.75 0 1 0-1.04-1.08L8 8.6 4.24 4.42A.75.75 0 1 0 3.2 5.5z'/%3e%3c/svg%3e");
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 2px solid rgba(107, 0, 62, 0.35);
    border-radius: 0.5rem;
    background-color: #fff;
    background-image: var(--bs-form-select-bg-img), linear-gradient(135deg, rgba(107, 0, 62, 0.03), rgba(107, 0, 62, 0.01));
    background-repeat: no-repeat, no-repeat;
    background-position: right 0.75rem center, 0 0;
    background-size: 16px 12px, 100% 100%;
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    color: #333;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.form-select:hover {
    border-color: rgba(107, 0, 62, 0.6);
}

.form-select:focus {
    border-color: var(--evridika-primary);
    box-shadow: 0 0 0 0.2rem rgba(107, 0, 62, 0.15);
    transform: translateY(-1px);
    outline: none;
}

.form-select:disabled {
    background-color: #f6f6f6;
    color: #888;
}

/* Optional: style optgroup labels where supported (structure preserved) */
optgroup {
    color: var(--evridika-primary);
    font-weight: 600;
}

/* Brand-styled text/date inputs */
.form-control {
    border: 2px solid rgba(107, 0, 62, 0.35);
    border-radius: 0.5rem;
    background-color: #fff;
    background-image: linear-gradient(135deg, rgba(107, 0, 62, 0.03), rgba(107, 0, 62, 0.01));
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    padding: 0.6rem 0.9rem;
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.form-control:hover {
    border-color: rgba(107, 0, 62, 0.6);
}

.form-control:focus {
    border-color: var(--evridika-primary);
    box-shadow: 0 0 0 0.2rem rgba(107, 0, 62, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: #9aa0a6;
    opacity: 1;
}

.form-control:disabled {
    background-color: #f6f6f6;
    color: #888;
}

/* Date input tweaks (where supported) */
input[type="date"].form-control::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    filter: invert(18%) sepia(33%) saturate(1531%) hue-rotate(311deg) brightness(86%) contrast(93%);
}

input[type="date"].form-control:hover::-webkit-calendar-picker-indicator,
input[type="date"].form-control:focus::-webkit-calendar-picker-indicator {
    opacity: 1;
}

/* Global Fix: Prevent modal backdrop from blocking interactions */
/* This ensures all modals throughout the site work without backdrop issues */
.modal-backdrop {
    display: none !important; /* Hide all backdrops globally */
}

.modal {
    z-index: 999999 !important; /* Extremely high z-index to appear above footer and all other elements */
    background-color: rgba(0, 0, 0, 0.5); /* Add background directly to modal */
}

.modal.show {
    background-color: rgba(0, 0, 0, 0.5); /* Maintain background when shown */
}

.modal-dialog {
    z-index: 1000000 !important; /* Even higher to ensure modal content is on top */
    position: relative;
}

/* Ensure footer and header don't cover modals */
.evridika-footer,
footer,
.footer,
[class*="footer"] {
    z-index: 1 !important; /* Keep footer at lowest level */
    position: relative;
}

header,
.evridika-navbar,
.navbar,
[class*="navbar"],
[class*="header"] {
    z-index: 100 !important; /* Keep header below modals but above content */
    position: relative;
}

/* Image and Document Grid Hover with Rotation */
.image-grid-item, .document-grid-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-grid-item:hover, .document-grid-item:hover {
    transform: scale(1.05) rotate(1deg);
    z-index: 10;
}

/* Animated Link Underlines */
.nav-link, .footer-links a, .news-read-more {
    position: relative;
}

.nav-link::after, .footer-links a::after, .news-read-more::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.nav-link:hover::after, .footer-links a:hover::after, .news-read-more:hover::after {
    width: 100%;
}

/* Pagination Scale Animation */
.pagination .page-link {
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    transform: scale(1.1);
}

/* Performance Optimizations */
.news-card, .feature-box, .btn, .post-item {
    will-change: transform;
}

.image-grid-item, .document-grid-item {
    will-change: transform, z-index;
}