/*
Theme Name: One Palestine Portal
Theme URI: https://onepalestine.org
Author: One Palestine Team
Author URI: https://onepalestine.org
Description: A comprehensive Palestinian information and advocacy theme
Version: 1.0.0
License: GPL v2 or later
Text Domain: onepalestine
*/

/* ===================================
   CSS Variables & Root Styles
   =================================== */
:root {
    /* Palestinian Flag Colors - Updated */
    --palestine-red: #a50307;
    --palestine-green: #05690c;
    --palestine-black: #000000;
    --palestine-white: #FFFFFF;
    
    /* Extended Color Palette */
    --dark-red: #850206;
    --light-red: #c5040a;
    --dark-green: #044a09;
    --light-green: #067a0e;
    --grey-dark: #212529;
    --grey-medium: #6C757D;
    --grey-light: #F8F9FA;
    
    /* Typography */
    --font-primary: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 5rem;
    
    /* Layout */
    --container-width: 1200px;
    --sidebar-width: 300px;
    
    /* Transitions */
    --transition-base: all 0.3s ease;
}

/* ===================================
   Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: var(--line-height-base);
    color: var(--grey-dark);
    background-color: var(--palestine-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--palestine-green);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--dark-green);
    text-decoration: underline;
}

/* ===================================
   Header Styles
   =================================== */
#header {
    position: relative;
    width: 100%;
    min-height: 150px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) 0;
}
#header img{
	height:100px;
	width:170px;
}

/* Remove old gradient div styles */
.header-gradient {
    display: none;
}

.header-content {
    width: 100%;
    padding: 0 var(--spacing-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.site-branding {
    background: var(--palestine-black);
    padding: var(--spacing-xl) var(--spacing-xxl);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.site-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    color: var(--palestine-white);
    letter-spacing: 2px;
}

.site-title a {
    color: inherit;
    text-decoration: none;
    display: block;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.site-title a:hover {
    color: var(--palestine-green);
    text-shadow: 2px 2px 8px rgba(5, 105, 12, 0.5);
}

.site-logo-flag {
    font-size: 3rem;
    display: flex;
    align-items: center;
}

.site-description {
    color: var(--grey-light);
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
    text-align: center;
}

/* ===================================
   Navigation Menu
   =================================== */
.main-nav {
    background: white;
    backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 100%;
    display:flex;
	flex-direction:row;
	justify-content:space-between;
}

.nav-container {
    width: 100%;
    padding: 0;
    display: flex;
}

.main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: var(--container-width);
    justify-content: center;
}

.main-menu li {
    position: relative;
}

.main-menu a {
    display: block;
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--palestine-white);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-base);
}

.main-menu a:hover,
.main-menu .current-menu-item a {
    background: transparent;
    color: var(--palestine-green);
    text-decoration: none;
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

/* Dropdown Menu */
.main-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--palestine-white);
    min-width: 200px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-base);
    z-index: 10;
}

.main-menu li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu a {
    color: var(--grey-dark);
    padding: var(--spacing-sm) var(--spacing-md);
    text-transform: none;
    border-bottom: 1px solid var(--grey-light);
}

.sub-menu a:hover {
    background: var(--grey-light);
    color: var(--palestine-green);
}

/* ===================================
   Main Content Area
   =================================== */
.site-content {
    max-width: var(--container-width);
    margin: var(--spacing-xl) auto;
    padding: 0 var(--spacing-md);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

.content-area {
    background: var(--palestine-white);
    border-radius: 8px;
    overflow: hidden;
}

/* With Sidebar Layout */
.has-sidebar .site-content {
    grid-template-columns: 1fr var(--sidebar-width);
}

/* ===================================
   Article & Post Styles
   =================================== */
.post,
.hentry {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--palestine-white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition-base);
}

.post:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.entry-header {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--palestine-green);
}

.entry-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--grey-dark);
}

.entry-title a {
    color: inherit;
}

.entry-title a:hover {
    color: var(--palestine-green);
}

.entry-meta {
    font-size: 0.875rem;
    color: var(--grey-medium);
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.entry-meta span {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.entry-content {
    margin-bottom: var(--spacing-lg);
}

.entry-content p {
    margin-bottom: var(--spacing-md);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin: var(--spacing-lg) 0 var(--spacing-md);
    color: var(--grey-dark);
}

.entry-content h2 {
    font-size: 1.75rem;
    border-bottom: 2px solid var(--palestine-green);
    padding-bottom: var(--spacing-sm);
}

.entry-content h3 {
    font-size: 1.5rem;
}

.entry-content blockquote {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md) var(--spacing-lg);
    border-left: 4px solid var(--palestine-red);
    background: var(--grey-light);
    font-style: italic;
}

/* ===================================
   Timeline Styles
   =================================== */
.timeline-container {
    position: relative;
    padding: var(--spacing-xl) 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    transform: translateX(-50%);
}

.timeline-event {
    position: relative;
    margin-bottom: var(--spacing-xl);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.timeline-event:nth-child(even) {
    direction: rtl;
}

.timeline-event-content {
    background: var(--palestine-white);
    padding: var(--spacing-lg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.timeline-event-date {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--palestine-black);
    color: var(--palestine-white);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 1;
}

.timeline-event-importance-critical .timeline-event-content {
    border: 2px solid var(--palestine-red);
}

.timeline-event-importance-high .timeline-event-content {
    border: 2px solid var(--palestine-green);
}

/* ===================================
   Q&A Styles
   =================================== */
.qa-list {
    list-style: none;
}

.qa-item {
    margin-bottom: var(--spacing-lg);
    background: var(--palestine-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.qa-question {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--palestine-green);
    color: var(--palestine-white);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-base);
}

.qa-question:hover {
    background: var(--dark-green);
}

.qa-question::after {
    content: "+";
    font-size: 1.5rem;
    transition: var(--transition-base);
}

.qa-item.active .qa-question::after {
    transform: rotate(45deg);
}

.qa-answer {
    padding: var(--spacing-lg);
    display: none;
}

.qa-item.active .qa-answer {
    display: block;
    animation: slideDown 0.3s ease;
}

/* ===================================
   Sidebar & Widgets
   =================================== */
.widget-area {
    background: var(--grey-light);
    padding: var(--spacing-lg);
    border-radius: 8px;
}

.widget {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--palestine-white);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--palestine-green);
    color: var(--grey-dark);
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--grey-light);
}

.widget li:last-child {
    border-bottom: none;
}

/* ===================================
   Footer Styles
   =================================== */
.site-footer {
    background: var(--palestine-black);
    color: var(--palestine-white);
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    margin-top: var(--spacing-xxl);
}

.footer-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
}

.footer-widget h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    color: var(--palestine-white);
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: var(--spacing-sm);
}

.footer-widget a {
    color: var(--grey-light);
}

.footer-widget a:hover {
    color: var(--palestine-green);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    color: var(--grey-light);
}

/* ===================================
   Forms & Buttons
   =================================== */
button,
.button,
input[type="submit"] {
    background: var(--palestine-green);
    color: var(--palestine-white);
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    font-family: var(--font-primary);
}

button:hover,
.button:hover,
input[type="submit"]:hover {
    background: var(--dark-green);
    text-decoration: none;
}

.button-secondary {
    background: var(--palestine-red);
}

.button-secondary:hover {
    background: var(--dark-red);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--grey-medium);
    border-radius: 4px;
    font-family: var(--font-primary);
    transition: var(--transition-base);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--palestine-green);
    box-shadow: 0 0 0 3px rgba(0, 122, 61, 0.1);
}

/* ===================================
   Search Form
   =================================== */
.search-form {
    display: flex;
    margin-bottom: var(--spacing-lg);
}

.search-form input[type="search"] {
    flex: 1;
    border-right: none;
    border-radius: 4px 0 0 4px;
}

.search-form button {
    border-radius: 0 4px 4px 0;
}

/* ===================================
   Pagination
   =================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-xl) 0;
}

.pagination a,
.pagination span {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--palestine-white);
    border: 1px solid var(--grey-medium);
    border-radius: 4px;
    color: var(--grey-dark);
    transition: var(--transition-base);
}

.pagination a:hover {
    background: var(--palestine-green);
    color: var(--palestine-white);
    border-color: var(--palestine-green);
    text-decoration: none;
}

.pagination .current {
    background: var(--palestine-black);
    color: var(--palestine-white);
    border-color: var(--palestine-black);
}

/* ===================================
   Utility Classes
   =================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.palestine-flag-border {
    border: 4px solid;
}

/* ===================================
   Animations
   =================================== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .has-sidebar .site-content {
        grid-template-columns: 1fr;
    }
    
    .timeline-event {
        grid-template-columns: 1fr;
    }
    
    .timeline-line {
        left: 20px;
    }
    
    .timeline-event:nth-child(even) {
        direction: ltr;
    }
}

@media (max-width: 768px) {
    .site-title {
        font-size: 1.75rem;
    }
    
    .main-menu {
        flex-direction: column;
    }
    
    .main-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-left: var(--spacing-lg);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .entry-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-base: 14px;
    }
    
    .site-branding {
        padding: var(--spacing-md) var(--spacing-lg);
    }
    
    .main-menu a {
        padding: var(--spacing-sm) var(--spacing-md);
    }
}