/**
 * AlterEgo - Header & Navigation Fixes
 * Popravljeni problemi sa layoutom
 */

/* =============================================================
   TYPOGRAPHY - PREMIUM GOOGLE FONTS
   ============================================================= */

/* Apply Playfair Display to headings and navigation */
h1, h2, h3, h4, h5, h6,
.site-title,
.primary-menu a,
.page-title,
.entry-title,
.widget-title,
.comment-reply-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Apply Lato to body and general text */
body,
p,
.entry-content,
.entry-summary,
button,
input,
select,
textarea {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Navigation specific typography */
.primary-menu a {
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Headings weight adjustments */
h1 { font-weight: 800; }
h2 { font-weight: 700; }
h3 { font-weight: 600; }
h4, h5, h6 { font-weight: 600; }

/* =============================================================
   HEADER FIXES
   ============================================================= */
.site-header {
    background: linear-gradient(135deg, #3A2818 0%, #4A3728 100%);
    color: #fff;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    width: 100%;
}

.site-header .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Main navigation wrapper */
.main-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

/* Site branding - Logo */
.site-branding {
    flex-shrink: 0;
}

.site-logo-img {
    max-height: 70px;
    width: auto;
    display: block;
}

/* Primary navigation */
.primary-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.menu-wrapper {
    display: flex !important;
}

.primary-menu {
    display: flex !important;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    align-items: center;
}

.primary-menu li {
    margin: 0;
    padding: 0;
}

.primary-menu a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.primary-menu a:hover,
.primary-menu .current-menu-item a {
    color: #C9A961;
}

/* Menu toggle button (mobile) */
.menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid #C9A961;
    color: #C9A961;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
}

.menu-text {
    margin-left: 0.5rem;
}

/* =============================================================
   LANGUAGE SWITCHER FIXES
   ============================================================= */
.language-switcher {
    flex-shrink: 0;
}

.language-switcher-dropdown {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-item {
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(201, 169, 97, 0.3);
    border-radius: 6px;
    color: #fff;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    font-weight: 600;
}

.lang-item:hover {
    background: rgba(201, 169, 97, 0.2);
    border-color: #C9A961;
    transform: translateY(-2px);
}

.lang-item.active {
    background: #C9A961;
    color: #000;
    border-color: #C9A961;
}

.lang-name {
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Skriva full locale, pokazuje samo jezik */
.lang-item .lang-name {
    display: none;
}

.lang-item::after {
    content: attr(data-lang);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* =============================================================
   RESPONSIVE DESIGN
   ============================================================= */
@media (max-width: 1024px) {
    .main-navigation {
        gap: 1rem;
    }

    .primary-menu {
        gap: 1.5rem;
    }

    .primary-menu a {
        font-size: 0.9rem;
    }

    .site-header .container {
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .main-navigation {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .site-branding {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
    }

    .primary-navigation {
        width: 100%;
        justify-content: flex-start;
    }

    .menu-wrapper {
        display: none !important;
        width: 100%;
    }

    .menu-wrapper.active {
        display: block !important;
    }

    .primary-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .primary-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(201, 169, 97, 0.2);
    }

    .primary-menu a {
        display: block;
        padding: 1rem;
    }

    .language-switcher {
        width: 100%;
        justify-content: center;
    }

    .language-switcher-dropdown {
        justify-content: center;
        flex-wrap: wrap;
    }

    .site-logo-img {
        max-height: 50px;
    }
}

/* =============================================================
   GENERAL LAYOUT FIXES
   ============================================================= */
#page {
    width: 100%;
    overflow-x: hidden;
}

.site-content {
    width: 100%;
    max-width: 100%;
}

/* Container width fixes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
    box-sizing: border-box;
}

/* Prevent horizontal overflow */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
}

/* Sticky header spacing */
body {
    padding-top: 0;
}

.site-content {
    min-height: calc(100vh - 100px);
}

/* =============================================================
   FOOTER FIXES
   ============================================================= */
.site-footer {
    background: linear-gradient(135deg, #3A2818 0%, #4A3728 100%) !important;
    color: #fff;
    padding: 3rem 0 1rem;
    margin-top: 0;
    width: 100%;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(201, 169, 97, 0.3);
}

.footer-bottom .site-copyright {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-navigation {
    margin-top: 1rem;
}

.footer-menu {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.footer-menu a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: #C9A961;
}

.social-links {
    margin-top: 1.5rem;
}

.social-link {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #C9A961;
}
