/**
 Theme Name: Pokrov
 Author: Cosmas
 Author URI: http://
 Description: 
 Version: 1.0.3
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: pokrov
 Template: twentytwelve
 */

#page {
    padding: 0;
    margin-top: 5px;
}

/* Layout Adjustments */
.site-header {
    padding: 0;
}

.site-header img.header-image {
    display: block;
    margin: 0 0;
    width: 100%;
    height: auto;
}

/* Hide titles as requested by user's previous manual changes */
.site-header hgroup {
    display: none;
}

.main-navigation {
    margin: 0;
}

.nav-menu {
    background: linear-gradient(to bottom, #f0eeee 0%, #d3d3d3 100%);
}

.nav-menu>li {
    margin: 0;
    padding: 0 16px;
}

.nav-menu>li:hover,
.nav-menu>li.current_page_item,
.nav-menu>li.current_page_ancestor {
    background: linear-gradient(to bottom, #238dc6 0%, #2fa7d0 50%, #218ac4 100%);
}

.nav-menu>li:hover>a,
.nav-menu>li.current_page_item>a,
.nav-menu>li.current_page_ancestor>a {
    color: white;
}

.nav-menu>li>a {
    text-align: center;
}

.wrapper {
    padding: 0 20px;
}

#copyrights {
    text-align: center;
    padding: 0 0;
}

/* Landing Page Widget Area */
#landing-page-widgets-area {
    margin-bottom: 24px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #eee;
    float: none !important;
    width: auto !important;
}

#landing-page-widgets-area .widget {
    margin-bottom: 20px;
}

#landing-page-widgets-area .widget:last-child {
    margin-bottom: 0;
}

/**
 * Social Connect Widget
 * Adapting styles from flows theme to work with UAGB Icon List
 */
.social-connect-widget {
    /* Container has no styles, items are styled individually */
    border: none;
    background: transparent;
    padding: 0;
}

.social-connect-widget:hover {
    border: none;
    background: transparent;
}

/* Style individual list items as buttons */
.social-connect-widget .wp-block-uagb-icon-list-child {
    background: #F0F0F0;
    padding: 15px 10px;
    /* More padding for button look */
    border: 1px solid #C9C9C9;
    margin-bottom: 10px;
    /* Space between items */
    display: flex;
    /* Flexbox for alignment */
    align-items: center;
    transition: all 0.2s ease;
    width: 100%;
    /* Full width */
    box-sizing: border-box;
}

.social-connect-widget .wp-block-uagb-icon-list-child:hover {
    border: 1px solid #9F9F9F;
    background: #F4F4F4;
}

/* Typography */
.social-connect-widget a,
.social-connect-widget .uagb-icon-list__label {
    font-weight: bold;
    text-decoration: none;
    font-family: Arial, Helvetica, Sans-serif;
    color: #515354;
    /* Explicit dark gray */
    text-transform: uppercase;
    /* Screenshot looked uppercase */
    font-size: 14px;
    line-height: 1.2;
}

.social-connect-widget a:hover,
.social-connect-widget .uagb-icon-list__label:hover,
.wp-block-uagb-icon-list-child:hover .uagb-icon-list__label {
    text-decoration: underline;
    color: #069;
}

/* Icon Alignment */
.social-connect-widget .uagb-icon-list__source-wrap {
    margin-right: 15px;
    /* Space between icon and text */
    display: flex;
    align-items: center;
}

.social-connect-widget img,
.social-connect-widget .uagb-icon-list__source-image {
    vertical-align: middle;
    /* Fixed size for icons likely better */
    height: auto;
    margin-right: 0;
    box-shadow: none;
    width: 32px !important;
    height: 32px !important;
}

/* Navigation Widget Area */
.main-navigation {
    position: relative;
}

.header-widget-area {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    display: flex;
    align-items: center;
    padding-right: 10px;
}

/* Ensure menu items don't overlap the widget area on smaller screens if possible */
@media screen and (min-width: 600px) {
    .nav-menu {
        padding-right: 60px;
    }
}

@media screen and (max-width: 599px) {
    .header-widget-area {
        display: none !important;
    }
}

.wp-block-button .wp-block-button__link {
    background: #32373c !important;
}

/* Search Field Tweak - Make it slightly smaller */
.header-widget-area .wp-block-search {
    max-width: 220px; /* Constrain overall width */
}

.header-widget-area .wp-block-search__inside-wrapper {
    padding: 2px; /* Smaller padding */
    border-color: #CBCBCB; /* Match reference border */
}

.header-widget-area .wp-block-search__input {
    padding: 4px 8px; /* Tighter inner padding */
    font-size: 14px;  /* Slightly smaller text */
}

.header-widget-area .wp-block-search__button {
    padding: 4px 8px; /* Smaller button padding */
}

.header-widget-area .wp-block-search__button svg {
    width: 18px; /* Smaller icon */
    height: 18px;
}

/* Mobile Menu Select Box Styles */
.mobile-nav-container {
    display: none;
}
.mobile-nav-select {
    width: 100%;
    flex-grow: 1;
    padding: 8px;
    font-size: 16px; /* Prevents iOS zoom */
    border: 1px solid #ccc;
    background-color: #f9f9f9;
}
.mobile-lang-switcher {
    list-style: none;
    margin: 0 10px 0 10px; /* Add right margin to balance whitespace */
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.mobile-lang-switcher li {
    margin: 0 !important;
}
.mobile-lang-switcher img {
    height: 24px;
    width: auto;
    display: block;
}

@media screen and (max-width: 959px) {
    /* Hide regular menu (high specificity to override parent theme min-width: 600px rule) */
    .main-navigation ul.nav-menu.desktop-menu {
        display: none !important;
    }
    
    /* Show select box container */
    .mobile-nav-container {
        display: flex;
        align-items: center;
        margin: 10px 0;
    }

    /* Hide search box on mobile/tablet */
    .header-widget-area {
        display: none !important;
    }
}

/* --- Post Card UI --- */
.site-content article.type-post {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 4px;
    padding: 20px;
    margin-top: 0;
    margin-bottom: 15px !important; /* Force override of Twenty Twelve's 5.14rem margin */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden; /* clear floats */
}

/* Typography & Header */
.type-post .entry-title {
    margin-top: 10px;
}

.type-post .entry-title a {
    color: #333;
    text-transform: uppercase;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95em;
    line-height: 1.3;
}

.type-post .entry-title a:hover {
    color: #666;
}

.type-post .entry-meta-header {
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 12px;
    margin-bottom: 15px;
    margin-top: 10px;
    font-size: 0.9em;
    color: #777;
}

/* Hide original image in the header */
header.entry-header img.wp-post-image {
    display: none !important;
}

/* Image Positioning inside content */
img.content-post-thumbnail,
.entry-summary img.content-post-thumbnail,
.entry-content img.content-post-thumbnail {
    float: left;
    margin: 0 15px 10px 0;
    max-width: 200px !important;
    width: auto;
    height: auto;
    padding: 6px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
}

/* On very small screens, un-float the image */
@media screen and (max-width: 599px) {
    img.content-post-thumbnail,
    .entry-summary img.content-post-thumbnail,
    .entry-content img.content-post-thumbnail {
        float: none;
        max-width: 100% !important;
        display: block;
        margin: 0 0 15px 0;
    }
}

/* Read More Button */
.read-more-btn {
    display: inline-block;
    float: right;
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #333;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85em;
    transition: background-color 0.2s ease;
}

.read-more-btn:hover {
    background-color: #555;
}


/* --- Schedule Table Styling --- */
/* Remove default twentytwelve table styling */
.site-content table.schedule,
table.schedule {
    border: none;
    width: 100%;
    margin-bottom: 30px;
    border-collapse: collapse;
}

.site-content table.schedule td,
table.schedule td {
    border: none !important;
    border-top: none !important;
    padding: 6px 8px !important;
    vertical-align: top;
    color: #333; /* Removed !important to allow inline blue styles */
    font-size: 15px;
    line-height: 1.4;
}

/* Specific column widths for alignment (Desktop) */
table.schedule tr td:nth-child(1):not([colspan]) { 
    width: 5%; 
    white-space: nowrap; 
}
table.schedule tr td:nth-child(2):not([colspan]) { 
    width: 10%; 
    white-space: nowrap; 
}
table.schedule tr td:nth-child(3):not([colspan]) { 
    width: 10%; 
    white-space: nowrap; 
}
table.schedule tr td:nth-child(4):not([colspan]) { 
    width: 75%; 
}

/* Ensure full-width header rows can wrap */
table.schedule tr td[colspan] {
    white-space: normal !important;
}

/* --- Responsive Table (Mobile) --- */
@media screen and (max-width: 600px) {
    table.schedule, 
    table.schedule tbody {
        display: block !important;
        width: 100% !important;
    }
    table.schedule tr {
        display: flex !important;
        width: 100% !important;
        height: auto !important; /* Override legacy HTML height attributes */
    }
    table.schedule td {
        display: block !important;
        height: auto !important; /* Override legacy HTML height attributes */
        font-size: 13px;
        padding: 4px !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        -webkit-hyphens: auto;
        hyphens: auto;
    }
    /* Provide exact minimal pixel widths to eliminate whitespace using Flexbox */
    table.schedule tr td:nth-child(1):not([colspan]) { 
        width: 35px !important; 
        flex-shrink: 0 !important; 
    }
    table.schedule tr td:nth-child(2):not([colspan]) { 
        width: 45px !important; 
        flex-shrink: 0 !important; 
    }
    table.schedule tr td:nth-child(3):not([colspan]) { 
        width: 40px !important; 
        flex-shrink: 0 !important; 
    }
    /* Let the description take all remaining width dynamically */
    table.schedule tr td:nth-child(4):not([colspan]) { 
        width: auto !important;
        flex-grow: 1 !important; 
        min-width: 0 !important; 
    }
    /* Ensure colspan headers span the entire flex row */
    table.schedule tr td[colspan] {
        width: 100% !important;
        flex: 1 1 100% !important;
    }
}

/* Alternate row highlighting */
table.schedule tr:nth-child(even) {
    background-color: #f0f8ff; /* Light bluish background */
}
table.schedule tr:hover {
    background-color: #e6f2ff; /* Slightly darker blue on hover */
}

/* --- Adjust Layout Gap (Desktop) --- */
@media screen and (min-width: 600px) {
    .site-content {
        width: 69% !important; /* Increased from 65.1% to reduce the large gap */
    }
    .widget-area {
        width: 26% !important; /* Default is 26.04% */
    }
}