/*
File: base.css
v4.8 - DEFINITIVE & COMPLETE VERSION (with mobile navigation and sticky sidebar fix)
- Contains ALL styles for the entire theme, including the new compact header.
- Restores all previously missing styles for forms, buttons, comments, widgets, etc.
- Includes all critical fixes for sub-menus, sidebar, and layout.
- This is the complete, unified stylesheet.
*/

/* ==========================================================================
   1. Root Variables & Generic Styles
   ========================================================================== */
:root {
    --z-index-content: 1;
    --z-index-header: 998;
    --z-index-sticky-header: 1000;
    --z-index-mobile-overlay: 9999;
    --z-index-mobile-menu: 10000;
    --z-index-search-overlay: 10001;
}
*, *::before, *::after { box-sizing: border-box; }
body { font-family: var(--font-body); color: var(--color-body-text, #334155); line-height: 1.8; background-color: #f8fafc; font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; margin: 0; }
body.mobile-menu-open { overflow: hidden; }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s ease-in-out; }
a:hover { text-decoration: underline; }
.container { max-width: 1280px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; width: 100%; }
img { max-width: 100%; height: auto; }

/* ==========================================================================
   2. Accessibility
   ========================================================================== */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.skip-link:focus { position: absolute !important; top: 5px; left: 5px; background-color: #1e2b3b; color: #fff; padding: 15px 23px; text-decoration: none; z-index: var(--z-index-search-overlay); clip: auto !important; clip-path: none; width: auto; height: auto; margin: 0; border-radius: 8px; }

/* ==========================================================================
   3. Compact Header Styles
   ========================================================================== */
.site-header { background-color: var(--color-header-bg, #fff); z-index: var(--z-index-header); }
.header-top { background-color: #1e293b; color: #cbd5e1; font-size: 0.85rem; padding: 8px 0; border-bottom: 1px solid #334155; transition: box-shadow 0.3s ease; }
.header-top .container { display: flex; justify-content: space-between; align-items: center; }
.header-top-right { display: flex; align-items: center; gap: 20px; }
.header-top a { color: #cbd5e1; }
.header-top a:hover { color: #fff; text-decoration: none; }
.secondary-navigation ul, .social-links .social-menu { margin: 0; padding: 0; list-style: none; display: flex; gap: 15px; }
.header-primary { border-bottom: 1px solid #e2e8f0; }
.header-primary .container { display: flex; justify-content: space-between; align-items: center; }
.site-branding { display: flex; align-items: center; gap: 15px; flex-shrink: 0; }
.site-title a { text-decoration: none; color: var(--color-header-text); font-size: 28px; font-weight: 700; }
.header-actions { display: flex; align-items: center; }

/* ==========================================================================
   4. Desktop Navigation
   ========================================================================== */
.main-navigation { flex-grow: 1; display: flex; justify-content: center; }
.main-navigation ul { margin: 0; padding: 0; list-style: none; display: flex; }
.main-navigation li { position: relative; }
.main-navigation a { color: var(--color-header-text, #334155); font-weight: 500; display: block; padding: 15px; text-decoration: none; transition: color 0.2s ease; }
.main-navigation a:hover, .main-navigation .current-menu-item > a { color: var(--color-primary); }
.main-navigation .menu-item-has-children > a { position: relative; padding-right: 25px; }
.main-navigation .menu-item-has-children > a::after { content: ''; display: inline-block; width: 6px; height: 6px; border-bottom: 2px solid #94a3b8; border-right: 2px solid #94a3b8; transform: rotate(45deg); position: absolute; top: 45%; right: 10px; margin-top: -4px; transition: all 0.2s ease; }
.main-navigation .menu-item-has-children:hover > a::after { border-color: var(--color-primary); }
.main-navigation .sub-menu { display: none; position: absolute; top: 100%; left: 0; background-color: #fff; padding: 8px; min-width: 230px; z-index: var(--z-index-mobile-menu); border: 1px solid #e2e8f0; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); border-radius: 8px; margin-top: 5px; }
.main-navigation li:hover > .sub-menu { display: block; }
.main-navigation .sub-menu li { width: 100%; }
.main-navigation .sub-menu a { padding: 10px 15px; font-size: 14px; border-radius: 5px; }
.main-navigation .sub-menu a:hover { background-color: #f8fafc; }
.main-navigation .sub-menu .menu-item-has-children > a::after { transform: rotate(-45deg); top: 50%; right: 15px; }
.main-navigation .sub-menu .sub-menu { top: -9px; left: 100%; }

/* ==========================================================================
   5. Header Actions & Mobile Header
   ========================================================================== */
.search-toggle-icon { background: none; border: none; padding: 10px; cursor: pointer; color: #475569; }
.search-toggle-icon::before { content: '⚲'; font-size: 24px; display: block; line-height: 1; }
.search-toggle-icon:hover { color: var(--color-primary); }
.menu-toggle { display: none; }

/* Mobile Slide-out Panel Styles */
.mobile-menu-panel { position: fixed; top: 0; right: 0; width: 300px; height: 100vh; background: #fff; z-index: var(--z-index-mobile-menu); transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1); display: flex; flex-direction: column; }
.mobile-menu-open .mobile-menu-panel { transform: translateX(0); box-shadow: -5px 0 15px rgba(0,0,0,0.1); }
.mobile-menu-header { display: flex; justify-content: flex-end; padding: 15px; border-bottom: 1px solid #e2e8f0; flex-shrink: 0; }
.mobile-menu-close { width: 24px; height: 24px; background: transparent; border: none; padding: 0; cursor: pointer; position: relative; }
.mobile-menu-close span::before, .mobile-menu-close span::after { content: ''; position: absolute; width: 18px; height: 2px; background-color: #334155; top: 50%; left: 50%; transform-origin: center; }
.mobile-menu-close span::before { transform: translate(-50%, -50%) rotate(45deg); }
.mobile-menu-close span::after { transform: translate(-50%, -50%) rotate(-45deg); }
.mobile-menu-content { padding: 15px; overflow-y: auto; flex-grow: 1; }
.mobile-menu-heading { font-size: 0.8rem; text-transform: uppercase; color: #94a3b8; margin: 20px 0 10px; letter-spacing: 1px; }
.mobile-menu-content ul[id^="mobile-"] { list-style: none; margin: 0; padding: 0; }
.mobile-menu-content ul[id^="mobile-"] a { padding: 12px 10px; font-size: 0.95rem; font-weight: 500; color: var(--color-text); border-bottom: 1px solid #e2e8f0; display: block; text-decoration: none; border-radius: 4px; }
.mobile-menu-content ul[id^="mobile-"] a:hover { background-color: #f8fafc; color: var(--color-primary); }
.mobile-menu-content ul[id^="mobile-"] .menu-item-has-children > a { display: inline-block; width: calc(100% - 45px); vertical-align: middle; }
.mobile-menu-content .submenu-toggle { display: inline-block; vertical-align: middle; width: 45px; height: 46px; background: transparent; border: none; cursor: pointer; position: relative; float: right; }
.mobile-menu-content .submenu-toggle::before { content: ''; position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; border-style: solid; border-color: var(--color-text); border-width: 0 2px 2px 0; transform: translate(-50%, -75%) rotate(45deg); transition: transform 0.3s ease; }
.mobile-menu-content .submenu-open > .submenu-toggle::before { transform: translate(-50%, -50%) rotate(-135deg); }
.mobile-menu-content .sub-menu { display: none; list-style: none; padding-left: 15px; margin: 5px 0; background-color: #f8fafc; border-radius: 4px; }
.mobile-menu-content .submenu-open > .sub-menu { display: block; }
.mobile-menu-content .sub-menu a { font-size: 0.9rem; font-weight: normal; border: none; padding: 10px; }
.mobile-menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: var(--z-index-mobile-overlay); opacity: 0; visibility: hidden; transition: opacity 0.4s ease; }
.mobile-menu-open .mobile-menu-overlay { opacity: 1; visibility: visible; }

/* Styles for mobile screens */
@media (max-width: 991px) {
    .main-navigation { display: none; }
    .header-primary .container { display: grid; grid-template-columns: 50px 1fr 50px; align-items: center; }
    .site-branding { grid-column: 2 / 3; justify-self: center; text-align: center; }
    .site-title { font-size: 22px; }
    .custom-logo-link img { max-height: 40px; width: auto; }
    .menu-toggle { display: block; grid-column: 1 / 2; justify-self: start; padding: 0; border: none; background: transparent; font-size: 1em; width: 1.5em; height: 1.5em; cursor: pointer; position: relative; }
    .menu-toggle-icon { display: block; width: 100%; height: 2px; background-color: var(--color-header-text); position: relative; }
    .menu-toggle-icon::before, .menu-toggle-icon::after { content: ''; display: block; width: 100%; height: 2px; background-color: var(--color-header-text); position: absolute; left: 0; transition: transform 0.3s ease-in-out; }
    .menu-toggle-icon::before { top: -0.5em; }
    .menu-toggle-icon::after { top: 0.5em; }
    .header-actions { grid-column: 3 / 4; justify-self: end; }

    /* START: Mobile Menu Size Adjustments */
    .mobile-menu-panel { width: 260px; }
    .mobile-menu-content ul[id^="mobile-"] a { padding: 10px 8px; font-size: 0.9rem; }
    .mobile-menu-content .sub-menu a { font-size: 0.85rem; padding: 8px 10px; }
    /* END: Mobile Menu Size Adjustments */
}

/* ==========================================================================
   6. Layout & Content
   ========================================================================== */
.site-content { max-width: 1280px; margin: 0 auto; padding: 30px 20px 40px; }
.content-area-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start; /* STICKY SIDEBAR FIX: Prevents columns from stretching to equal height */
}
.site-main { min-width: 0; }

@media (min-width: 992px) {
    .layout-right-sidebar { grid-template-columns: minmax(0, 1fr) 360px; }
    .layout-left-sidebar { grid-template-columns: 360px minmax(0, 1fr); }
    .layout-left-sidebar .site-main { grid-column: 2 / 3; }
    .layout-left-sidebar .widget-area { grid-column: 1 / 2; }
}
@media (max-width: 991px) { .widget-area { position: static; } }
@media (max-width: 768px) { .site-content { padding: 30px 15px; } }

/* ==========================================================================
   7. Blog, Posts & Pages (RESTORED)
   ========================================================================== */
.entry-header, .entry-content, .entry-footer { margin-bottom: 1.5em; }
.entry-title { font-size: 2.2rem; margin-bottom: 0.5em; }
.entry-title a { text-decoration: none; color: var(--color-headings); }
.entry-title a:hover { color: var(--color-primary); }
.entry-meta { font-size: 0.9rem; color: #64748b; }
.entry-meta a { color: #64748b; text-decoration: none; }
.entry-meta a:hover { color: var(--color-primary); }
.entry-content p, .entry-content ul, .entry-content ol { margin-bottom: 1.5em; }
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 { color: var(--color-headings); font-family: var(--font-headings); margin: 1.5em 0 1em; }
.page-links { clear: both; margin: 0 0 1.5em; }

/* START: Custom link styles for content area */
.entry-content a {
    color: #0056b3; /* Dark Blue link color */
    text-decoration: none; /* Ensure no underline by default */
    transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.entry-content a:hover {
    color: #ffffff; /* White text on hover */
    background-color: #0056b3; /* Dark Blue background on hover */
    text-decoration: none; /* Ensure no underline on hover */
}
/* END: Custom link styles for content area */

/* ==========================================================================
   8. Comments (RESTORED)
   ========================================================================== */
.comments-area { margin-top: 2em; border-top: 1px solid #e2e8f0; padding-top: 2em; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-body { border: 1px solid #e2e8f0; padding: 1.5em; margin-bottom: 1.5em; border-radius: 8px; }
.comment-author .avatar { float: left; margin-right: 1em; border-radius: 50%; }
.comment-meta { font-size: 0.9rem; margin-bottom: 0.5em; }
.comment-form-label { display: block; margin-bottom: 0.5em; font-weight: bold; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 4px; }
.comment-form .form-submit input { display: inline-block; padding: 10px 20px; border: none; border-radius: 4px; background-color: var(--color-button-bg); color: var(--color-button-text); cursor: pointer; }
.comment-form .form-submit input:hover { background-color: var(--color-button-hover-bg); }

/* ==========================================================================
   9. Forms & Buttons (RESTORED)
   ========================================================================== */
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"], textarea {
    color: #333;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 10px;
}
.search-form { display: flex; }
.search-field { flex-grow: 1; }
.search-submit { border: none; background-color: var(--color-primary); color: #fff; padding: 0 15px; cursor: pointer; }

/* ==========================================================================
   10. Sidebar & Widgets (RESTORED)
   ========================================================================== */
.widget-area .widget { margin-bottom: 2.5em; }
.widget-title { font-size: 1.2rem; margin-bottom: 1em; padding-bottom: 0.5em; border-bottom: 2px solid var(--color-primary); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { margin-bottom: 0.8em; }
.widget ul li a { text-decoration: none; }

/* ==========================================================================
   11. Footer
   ========================================================================== */
.site-footer { background-color: var(--color-footer-bg, #1e293b); color: var(--color-footer-text, #cbd5e1); padding: 40px 20px; font-size: 0.9rem; margin-top: 40px; }
.site-footer a { color: var(--color-footer-link, #fff); }
.site-footer .footer-container { max-width: 1280px; margin: 0 auto; }
.footer-widgets-area { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid #334155; }
.site-info { text-align: center; }
.mobile-hidden {
    display: none;
}

   /* --- News Ticker Styles --- */
    .news-ticker-container {
        /* background-color: #fff; <-- REMOVED */
        border-bottom: 1px solid #e2e8f0;
        padding: 8px 0; /* DECREASED: Smaller height */
        font-size: 0.85rem; /* DECREASED: Smaller font */
        line-height: 1.5;
    }
    .news-ticker-container .container {
        display: flex;
        align-items: center;
    }
    /* NEW: Replaced text label with an icon */
    .ticker-icon {
        font-size: 1.1rem; /* Small icon size */
        margin-right: 15px;
        flex-shrink: 0;
        line-height: 1; /* Helps with vertical alignment */
    }
    .ticker-wrap {
        flex-grow: 1;
        overflow: hidden;
    }
    .ticker-list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: inline-flex;
        white-space: nowrap;
        animation: ticker-scroll 60s linear infinite;
    }
    .ticker-list:hover {
        animation-play-state: paused;
    }
    .ticker-list li {
        display: inline-flex;
        align-items: center;
        margin-right: 35px;
    }
    .ticker-list li a {
        color: #1e293b; /* CHANGED: Black text color */
        text-decoration: none;
    }
    .ticker-list li a:hover {
        color: var(--color-primary);
        text-decoration: underline;
    }
    .ticker-dot {
        width: 7px; /* DECREASED: Smaller dot */
        height: 7px; /* DECREASED: Smaller dot */
        border-radius: 50%;
        margin-right: 8px;
        flex-shrink: 0;
    }
    /* Dot Colors */
    .dot-red { background-color: #e53e3e; }
    .dot-blue { background-color: #3b82f6; }
    .dot-green { background-color: #22c55e; }
    .dot-orange { background-color: #f97316; }
    .dot-purple { background-color: #8b5cf6; }
    .dot-teal { background-color: #14b8a6; }


    @keyframes ticker-scroll {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }

    @media (max-width: 768px) {
        .ticker-icon {
            font-size: 1rem;
            margin-right: 10px;
        }
        .news-ticker-container {
            font-size: 0.8rem;
        }
    }