/* Critical CSS for upriver theme - Above the fold styles only */

/* Essential reset and base styles */
html, body {
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: 100%;
    line-height: 1.4;
}

body {
    background: #fff;
    color: #333;
    overflow-x: hidden;
}

/* Critical layout styles */
#body-core {
    position: relative;
    width: 100%;
}

#site-header {
    position: relative;
    width: 100%;
    z-index: 998;
}

#header-core {
    position: relative;
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
}

#logo {
    float: left;
    margin: 10px 0;
}

#header-links {
    float: right;
    margin: 10px 0;
}

/* Essential navigation styles */
.main-navigation {
    position: relative;
}

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

.header-links li {
    display: inline-block;
    margin: 0 15px 0 0;
}

.header-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

/* Critical content styles */
#content {
    position: relative;
    width: 100%;
    clear: both;
}

#content-core {
    max-width: 1170px;
    margin: 0 auto;
    padding: 20px 15px;
}

#main {
    position: relative;
    width: 100%;
}

#main-core {
    position: relative;
    width: 100%;
}

/* Essential responsive styles */
@media (max-width: 768px) {
    #header-core {
        padding: 0 10px;
    }
    
    #logo, #header-links {
        float: none;
        text-align: center;
        margin: 5px 0;
    }
    
    .header-links li {
        margin: 0 10px 0 0;
    }
}

/* Critical utility classes */
.clearboth {
    clear: both;
}

.wrap-safari {
    position: relative;
    width: 100%;
}

/* Essential button styles */
.btn, .button {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    border: 1px solid #ddd;
    background: #f8f8f8;
    color: #333;
    border-radius: 3px;
    cursor: pointer;
}

.btn:hover, .button:hover {
    background: #e8e8e8;
}

/* Critical form styles */
input[type="text"], input[type="email"], input[type="password"], textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

/* Essential widget styles */
.widget {
    margin-bottom: 20px;
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

/* Critical footer styles */
#footer-core {
    position: relative;
    width: 100%;
    background: #f8f8f8;
    padding: 20px 0;
    margin-top: 40px;
}

.widget-area {
    float: left;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Essential grid system */
.one_half {
    width: 48%;
    float: left;
    margin-right: 2%;
}

.one_third {
    width: 31.33%;
    float: left;
    margin-right: 2%;
}

.one_fourth {
    width: 23%;
    float: left;
    margin-right: 2%;
}

.last {
    margin-right: 0;
}

/* Critical typography */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 15px 0;
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

p {
    margin: 0 0 15px 0;
    line-height: 1.6;
}

/* Essential image styles */
img {
    max-width: 100%;
    height: auto;
}

/* Critical container styles */
.container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Essential clearfix */
.clearfix:after {
    content: "";
    display: table;
    clear: both;
}
