/*
Theme Name: COMPAS Theme
Theme URI: https://compas.org.uk
Description: Custom WordPress theme for COMPAS Charity website. Matches the design from compas.org.uk with white header, horizontal navigation, blue page titles, and three-column layout.
Version: 1.0.0
Author: CloverStack
Author URI: https://cloverstack.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: compas
Tags: custom, charity, three-columns
*/

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

/* ROCKSOLID Icons */

@font-face {
    font-family: 'rocksolid';
    src: url('assets/rocksolid-icons.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

.icon {
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    display: inline;
}

.icon::before {
    font-family: 'rocksolid';
    content: attr(data-icon);
    color: #3986ce;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Open Sans", sans-serif; /*Arial, Helvetica, sans-serif;*/
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    background-color: #fff;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: #5a9fd4;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

/* ==========================================================================
   Top Header - White Background with Logo and Navigation
   ========================================================================== */

.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 5px 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    position: relative;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo a {
    display: block;
}

.site-logo img {
    height: 45px;
    width: auto;
}

.site-logo a {
    font-size: 0;
}

/* ==========================================================================
   Main Navigation - Horizontal Menu with Dropdowns
   ========================================================================== */

.main-navigation {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.main-navigation > ul {
    list-style: none;
    display: flex;
    gap: 60px;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin: 0;
    position: relative;
}

.main-navigation a {
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
    display: block;
    padding: 10px 0;
    position: relative;
    z-index: 1;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: #5a9fd4;
    text-decoration: none;
}

.main-navigation .current-menu-item {
    position: relative;
}

.current-menu-item::after {
    content: "";
    position: absolute;
    bottom: -0.92308em;
    left: 50%;
    display: block;
    width: 0.84615em;
    height: 0.84615em;
    margin-left: -0.61538em;
    border: solid #dcdcdc;
    border-width: 0 1px 1px 0;
    background: #fff;
    transform-origin: 0 100%;
    transform: rotate(45deg);
}

.main-navigation ul ul {
    position: absolute;
    left: -9px;
    background-color: #fff;
    min-width: 240px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    border-top: none;
    padding: 10px 0;
    margin: 0;
    display: none;
    z-index: 1001;
}

.main-navigation ul li:hover > ul {
    display: block;
}

.main-navigation ul ul li {
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.main-navigation ul ul li:last-child {
    border-bottom: none;
}

.main-navigation ul ul a {
    padding: 12px 20px;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0.05em;
    color: #666;
    font-weight: 600;
}

.main-navigation ul ul a:hover {
    background-color: #f5f5f5;
    color: #5a9fd4;
}

.main-navigation ul ul ul {
    left: 100%;
    top: 0;
    margin-left: 0;
    border-top: 3px solid #5a9fd4;
}

/* ==========================================================================
   Blue Page Title Bar
   ========================================================================== */

.page-title-bar {
    background-color: #3986ce;
    color: white;
    padding: 25px 0;
    margin-bottom: 40px;
}

.page-title-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title-bar h1 {
    color: white;
    font-size: 28px;
    font-weight: normal;
    margin: 0;
}

.breadcrumbs {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
}

.breadcrumbs a {
    color: white;
    text-decoration: underline;
}

.breadcrumbs-headline {
    font-size: 1.4em;
    font-weight: normal;
}

/* ==========================================================================
   Three-Column Layout Container (Used on ALL Pages)
   ========================================================================== */

.content-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    gap: 40px;
    width: 100%;
    margin: 0 auto 50px;
    padding: 0 20px;
}

/* ==========================================================================
   Left Sidebar - Navigation
   ========================================================================== */

.sidebar-left {
    background-color: transparent;
}

.sidebar-left h3 {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #5a9fd4;
    text-transform: uppercase;
}

.sidebar-left ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-left li {
    margin-bottom: 0;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-left a {
    color: #333;
    text-decoration: none;
    display: block;
    padding: 12px 0;
    font-size: 14px;
    transition: color 0.3s ease;
}

.sidebar-left a:hover,
.sidebar-left .current-menu-item > a {
    color: #5a9fd4;
    text-decoration: none;
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */

.page-holder { /* CSS taken straight from COMPAS.org.uk */
    max-width: 1280px;
    margin: 0 auto;
    border: solid #dcdcdc;
    border-width: 0 1px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.main-content {
    background-color: white;
    min-height: 400px;
}

.main-content h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2.4em;
    letter-spacing: 0.1em;
    line-height: 1.3;
    text-align: center;
    text-transform: uppercase;
    font-weight: normal;
}

.main-content h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #5a9fd4;
    margin: 15px auto 30px;
}

.main-content h2 {
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: bold;
}

.main-content h3 {
    color: #333;
    margin-top: 25px;
    margin-bottom: 12px;
    font-size: 18px;
}

.main-content p {
    margin-bottom: 18px;
    line-height: 1.8;
}

.main-content ul,
.main-content ol {
    margin-left: 25px;
    margin-bottom: 18px;
}

.main-content li {
    margin-bottom: 8px;
    line-height: 1.8;
}

.entry-content {
    margin-top: 20px;
}

/* Center-aligned content sections */
.welcome-header {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-header h2 {
    color: #999;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    font-weight: bold;
}

/* ==========================================================================
   Right Sidebar - Donations and Contact Info
   ========================================================================== */

.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget {
    background-color: #fff;
    padding: 0;
}

.widget h3 {
    color: #999;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-weight: normal;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

/* Donation Widget */
.widget-donation {
    text-align: center;
}

.widget-donation form {
    margin-top: 15px;
}

/* Contact Info Widget */
.widget-contact-info p {
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 10px;
}

.widget-contact-info a {
    color: #5a9fd4;
}

.widget-contact-info strong {
    display: inline;
    color: #333;
    margin-top: 15px;
    margin-bottom: 5px;
}

/* Login Widget */
.widget-login {
    border: 1px solid #e0e0e0;
    padding: 20px;
    background-color: #f9f9f9;
}

.widget-login p {
    margin-bottom: 15px;
    font-size: 14px;
}

.widget-login .btn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #5a9fd4;
    color: white;
    text-align: center;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.widget-login .btn:hover {
    background-color: #4a8fc4;
    text-decoration: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background-color: #f5f5f5;
    padding: 40px 0 20px;
    margin-top: 60px;
    border-top: 1px solid #e0e0e0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

.footer-section h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #5a9fd4;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #333;
}

.footer-section p {
    color: #666;
    line-height: 1.7;
    font-size: 13px;
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid #ddd;
    color: #999;
    font-size: 12px;
}

.footer-bottom a {
    color: #5a9fd4;
}

/* Social Icons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 2px solid #ddd;
    border-radius: 50%;
    color: #999;
    font-size: 20px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    border-color: #5a9fd4;
    color: #5a9fd4;
}

/* ==========================================================================
   Contact Page - Special Layout
   ========================================================================== */

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 30px;
}

.contact-form h2,
.contact-details h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    font-family: inherit;
    font-size: 14px;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    background-color: #5a9fd4;
    color: white;
    padding: 12px 30px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-form button:hover {
    background-color: #4a8fc4;
}

.map-container {
    width: 100%;
    height: 350px;
    border: 1px solid #ddd;
    margin-top: 20px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 968px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar-left,
    .sidebar-right {
        display: none;
    }

    .site-header .container {
        flex-direction: column;
        gap: 20px;
    }

    .main-navigation > ul {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }

    /* Mobile dropdown menus */
    .main-navigation ul ul {
        position: static;
        box-shadow: none;
        border: none;
        padding: 5px 0 5px 20px;
        background-color: #f5f5f5;
        display: none;
        min-width: 100%;
    }

    .main-navigation ul li:hover > ul,
    .main-navigation ul li.focus > ul {
        display: block;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .main-content h1 {
        font-size: 22px;
    }

    .page-title-bar h1 {
        font-size: 22px;
    }
}

.main-navigation > ul > li {
    position: relative;
}

.main-navigation > ul > .current-menu-item::after {
    position: absolute;
    bottom: -8px;
}

.main-navigation > ul > .current-menu-item > ul {
    margin-top: 12px;
}

.main-navigation ul li {
    list-style: none;
}

.main-navigation > ul > li.menu-item-has-children:hover > a {
    color: #5a9fd4;
}

.main-navigation > ul > li.menu-item-has-children > a::before {
    content: "";
    position: absolute;
    left: -9px;
    right: -9px;
    top: -2px;
    bottom: -2px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: 4px solid #2f6fae;
    border-bottom: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    opacity: 0;
    transform: translateY(2px);
    transition:
            opacity 80ms ease-out,
            transform 80ms ease-out;
    pointer-events: none;
    z-index: -1;
}

.main-navigation > ul > li.menu-item-has-children:hover > a::before {
    opacity: 1;
    transform: translateY(0);
}

.main-navigation > ul > li.menu-item-has-children:hover > ul {
    margin-top: 0;
}

.main-navigation > ul > li:not(.menu-item-has-children) > a:hover {
    background: transparent;
    border: none;
}