/*
Theme Name: Palestine Postcard Project Theme
Description: A single-page application WordPress theme for the Palestine Postcard Project fundraising website. Features smooth scrolling navigation, responsive design, and elegant typography.
Author: PPP Development Team
Version: 1.0
Text Domain: ppp-theme
*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Open+Sans:wght@300;400;600;700&display=swap');
/* Caveat */
/* @import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;700&family=Open+Sans:wght@300;400;600;700&display=swap'); */

/* Patrick Hand */
/* @import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@100;200;400;700&family=Open+Sans:wght@300;400;600;700&display=swap'); */


/* CSS Variables for consistent theming */
:root {
    --primary-color: #a93967;
    --text-color: #333333;
    --light-gray: #f8f8f8;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    
    /* Typography */
    --font-heading: 'Amatic SC', cursive;
    --font-body: 'Open Sans', sans-serif;
    
    /* Spacing */
    --section-padding: 80px 0;
    --container-padding: 0 20px;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px; /* Offset for fixed header when using anchor links */
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--container-padding);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 3rem;
    line-height: 1.3;
}

h3 {
    font-size: 2.5rem;
    line-height: 1.4;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
}

.site-logo {
    height: 80px;
    width: auto;
    max-width: 134px;
    object-fit: contain;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-navigation a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    position: relative;
}

.main-navigation a:hover,
.main-navigation a.active {
    color: var(--primary-color);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.main-navigation a:hover::after,
.main-navigation a.active::after {
    width: 100%;
}

/* Hope link with heart icon */
.nav-link-hope .heart-icon {
    color: #ce1126;
    font-size: 1rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.nav-link-hope:hover .heart-icon {
    transform: scale(1.3);
    animation: heartbeat 0.6s ease-in-out;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1.1);
    }
    75% {
        transform: scale(1.3);
    }
}

/* Dropdown Menu Styles */
.menu-item-has-children {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.menu-item-has-children:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 250px;
    max-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.menu-item-has-children:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li {
    margin: 0;
    width: 100%;
}

.sub-menu a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sub-menu a:hover {
    background: var(--light-gray);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.sub-menu .current-menu-item a {
    background: var(--light-gray);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.sub-menu a::after {
    display: none;
}

/* Remove borders/outlines from navigation links */
.main-navigation a,
.main-navigation a:focus,
.main-navigation a:active,
.menu a,
.menu a:focus,
.menu a:active,
.current-menu-item a,
.current-menu-item a:focus,
.current-menu-item a:active {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Responsive dropdown positioning */
@media (max-width: 1200px) {
    .sub-menu {
        min-width: 240px;
        max-width: 260px;
    }
    
    .sub-menu a {
        font-size: 0.8rem;
        padding: 0.7rem 1.2rem;
    }
}

@media (max-width: 1024px) {
    .sub-menu {
        left: auto;
        right: 0;
        min-width: 220px;
        max-width: 240px;
    }
    
    .sub-menu a {
        font-size: 0.75rem;
        padding: 0.6rem 1rem;
    }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    outline: none;
}

.menu-toggle:focus {
    outline: none;
}

.menu-toggle:active {
    border: none;
    outline: none;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
}

.hamburger-line {
    display: block;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

.hamburger-line:nth-child(2) {
    width: 70%;
    align-self: center;
}

/* Animated hamburger when menu is open */
.menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    width: 100%;
}

.menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* Hero Section */
.hero-section {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
    text-align: center;
}

.hero-content h1 {
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 15px 30px;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
    cursor: pointer;
}

.btn:hover {
    background: transparent;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Section Styles */
.section {
    padding: var(--section-padding);
}

.section-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-weight: 200;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* About Section */
.about-section {
    background: var(--light-gray);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 200;
}

.about-image {
    text-align: center;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.about-event-details {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Postcard Grid Section */
.postcard-grid-section {
    background: var(--white);
}

/* Contact Section */
.contact-section {
    background: var(--light-gray);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 200;
}

.contact-info p {
    margin-bottom: 1rem;
}

.contact-info strong {
    color: var(--primary-color);
}

/* Contact Form */
.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.contact-form h3 {
    font-weight: 200;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(169, 57, 103, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.captcha-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: nowrap;
}

.captcha-question {
    font-weight: 600;
}

.captcha-input {
    width: 80px;
}

/* Footer */
.site-footer {
    background: var(--text-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: white;
    text-decoration: none;
}

.site-footer a:hover {
    color: white;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    :root {
        --section-padding: 60px 0;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 1100px) {
    .menu-toggle {
        display: block;
    }
    
    /* Responsive logo sizing */
    .site-logo {
        height: 70px;
        max-width: 117px;
    }
    
    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .main-navigation.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .main-navigation ul {
        flex-direction: column;
        padding: 1rem 0;
        gap: 0;
    }
    
    .main-navigation li {
        border-bottom: 1px solid #e1e1e1;
    }
    
    .main-navigation a {
        display: block;
        padding: 1rem 2rem;
    }
    
    /* Mobile dropdown styles */
    .menu-item-has-children .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--light-gray);
        border-radius: 0;
        margin-top: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .menu-item-has-children:hover .sub-menu,
    .menu-item-has-children.active .sub-menu {
        max-height: 300px;
    }
    
    .sub-menu a {
        padding: 0.8rem 3rem;
        font-size: 0.9rem;
        border-left: none;
        border-bottom: 1px solid #e1e1e1;
    }
    
    .sub-menu a:hover {
        background: var(--white);
        padding-left: 3.5rem;
    }
    
    .dropdown-toggle {
        justify-content: space-between;
    }
    
    .hero-section {
        padding: 100px 0 60px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    /* Keep captcha on one line - removed flex-direction: column */
    .captcha-group {
        flex-wrap: nowrap;
        gap: 0.75rem;
    }
    
    .captcha-question {
        font-size: 0.95rem;
        flex-shrink: 1;
    }
    
    .captcha-input {
        width: 75px;
        padding: 11px 14px;
        flex-shrink: 0;
    }
    
    .captcha-group .btn-secondary {
        padding: 8px 14px;
        font-size: 1.2rem;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 40px 0;
        --container-padding: 0 15px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    /* Small mobile logo sizing */
    .site-logo {
        height: 60px;
        max-width: 100px;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-3 {
    margin-bottom: 3rem;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Messages */
.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.error-message {
    color: #721c24;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    display: block;
}

.form-group input.error,
.form-group textarea.error {
    border-color: #dc3545;
}

/* Header Scrolled State */
.site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Keyboard Focus Styles */
.keyboard-focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Event Details Styling */
.event-details {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    /* margin-top: 2rem; */
}

.event-details p {
    margin-bottom: 0.5rem;
}

.event-details strong {
    color: var(--primary-color);
}

/* Location Section Styling */
.location-section {
    margin-top: 1.5rem;
}

.location-map iframe {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.location-map iframe:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.btn-directions {
    background: var(--primary-color);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow);
}

.btn-directions:hover {
    background: transparent;
    color: var(--primary-color);
    transform: translateY(-2px);
    text-decoration: none;
}

/* Image Caption */
.image-caption {
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 0.5rem;
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Contact Details */
.contact-details p {
    margin-bottom: 1.5rem;
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

/* Page and Single Post Styles */
.page-content,
.single-post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 120px 0 80px;
}

.entry-header {
    margin-bottom: 2rem;
    text-align: center;
}

.entry-title {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.entry-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.entry-meta span {
    margin-right: 0.25rem;
}

.post-thumbnail {
    margin-bottom: 2rem;
    text-align: center;
}

.post-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.entry-content {
    line-height: 1.8;
    margin-bottom: 2rem;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.entry-footer {
    border-top: 1px solid #e1e1e1;
    padding-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.entry-footer span {
    display: block;
    margin-bottom: 0.5rem;
}

.page-links {
    margin-top: 2rem;
    text-align: center;
}

.page-links a {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    transition: var(--transition);
}

.page-links a:hover {
    background: var(--text-color);
}

/* Post Navigation */
.post-navigation {
    margin-top: 3rem;
    border-top: 1px solid #e1e1e1;
    padding-top: 2rem;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.post-navigation a {
    flex: 1;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.post-navigation a:hover {
    color: var(--primary-color);
}

.nav-subtitle {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.nav-title {
    display: block;
    font-weight: 600;
}
