/* KoviljInfo - Isolated Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f5f7fa;
    color: #1a1a2e;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2d5a27 0%, #4a7c43 100%);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.logo-placeholder {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-tagline {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Header Center (Weather & Time) */
.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    min-width: 200px;
}

.weather-widget {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.2rem;
    color: #fff;
}

.weather-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

.time-widget {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    opacity: 0.95;
    border-left: none;
    padding-left: 0;
}

.current-time {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.current-date {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-left: 0.75rem;
    border-left: 1px solid rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
    .header-center {
        order: 3;
        width: 100%;
        margin-top: 0.5rem;
        flex-direction: row;
        /* Keep row on mobile to save vertical space? Or column? User asked for column. Let's stick to column but maybe smaller padding */
        justify-content: space-between;
        padding: 0.5rem 1rem;
    }

    .weather-widget {
        font-size: 1rem;
    }

    .time-widget {
        font-size: 0.85rem;
    }

    .header-right {
        display: none;
        /* Hide tagline on mobile to save space */
    }
}

/* Main Container */
.main-container {
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem;
    gap: 2rem;
}

/* Sidebar Navigation */
.sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    /* Hide scrollbar - Firefox */
    scrollbar-width: none;
    /* Hide scrollbar - IE/Edge */
    -ms-overflow-style: none;
}

/* Hide scrollbar - Chrome/Safari/Opera */
.sidebar::-webkit-scrollbar {
    display: none;
}

.nav-list {
    list-style: none;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.nav-item a {
    display: block;
    padding: 1rem 1.25rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-item a:hover {
    background: #f0f4f0;
    border-left-color: #4a7c43;
    color: #2d5a27;
}

.nav-item.active a {
    background: #e8f0e8;
    color: #2d5a27;
    border-left-color: #2d5a27;
}

/* Sub-navigation - hidden by default, shown only for active parent */
.sub-nav-list {
    display: none;
    list-style: none;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.nav-item.active > .sub-nav-list {
    display: block;
}

.sub-nav-item a {
    padding: 0.75rem 1.25rem 0.75rem 2.5rem;
    /* Indent sub-items */
    font-size: 0.9rem;
    color: #555;
    border-left: 3px solid transparent;
}

.sub-nav-item a:hover {
    background: #e9ecef;
    color: #2d5a27;
}

.sub-nav-item.active a {
    background: #e2e6ea;
    color: #2d5a27;
    border-left-color: #2d5a27;
    font-weight: 600;
}

/* Main Content */
.content {
    flex: 1;
    min-width: 0;
}

/* Posts Wall */
.posts-wall {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Post Card */
.post-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.post-category {
    background: #e8f0e8;
    color: #2d5a27;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.post-date {
    color: #888;
    font-size: 0.85rem;
}

.post-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1a1a2e;
}

.post-content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.post-footer {
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-author {
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
}

.post-actions {
    display: flex;
    gap: 0.5rem;
}

.share-btn, .view-btn {
    background: #f0f0f0;
    border: none;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
    text-decoration: none;
}

.share-btn:hover, .view-btn:hover {
    background: #e0e0e0;
}

/* Single Post Page */
.single-post {
    max-width: 800px;
    margin: 0 auto;
}

.single-post .post-card.single {
    margin-bottom: 1rem;
}

.single-post .post-title {
    font-size: 1.5rem;
}

.back-link {
    margin-top: 1rem;
}

.back-link a {
    color: #2d5a27;
    text-decoration: none;
    font-weight: 500;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: #2d5a27;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}

.footer p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Page Header (for subpages) */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    color: #2d5a27;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Contacts Grid (Vazni Brojevi) */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.contact-card h3 {
    color: #2d5a27;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-card ul {
    list-style: none;
}

.contact-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

.contact-card li:last-child {
    border-bottom: none;
}

.contact-card.emergency {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.contact-card.emergency h3 {
    color: white;
}

.contact-card.emergency li {
    border-bottom-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* About Section (O Kovilju) */
.about-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.about-card h2 {
    color: #2d5a27;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.about-card p {
    color: #555;
    line-height: 1.7;
}

.about-card.featured {
    background: linear-gradient(135deg, #2d5a27 0%, #4a7c43 100%);
    color: white;
}

.about-card.featured h2,
.about-card.featured p {
    color: white;
}

/* Contact Page (Kontakt) */
.contact-page-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
}

.contact-info-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form-section .contact-card {
    height: 100%;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a7c43;
}

.submit-btn {
    background: linear-gradient(135deg, #2d5a27 0%, #4a7c43 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 90, 39, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .main-container {
        flex-direction: column;
        padding: 1rem;
    }

    .sidebar {
        width: 100%;
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    .nav-list {
        display: flex;
        overflow-x: auto;
    }

    .nav-item a {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .nav-item a:hover,
    .nav-item.active a {
        border-left: none;
        border-bottom-color: #2d5a27;
    }

    .post-title {
        font-size: 1.2rem;
    }

    .contact-page-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }
}

/* Linktree Button */
.linktree-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #43e660;
    /* Linktree green */
    color: #000;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.linktree-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 230, 96, 0.3);
    background: #39cc52;
}

/* Map Container */
.map-container {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
}