﻿/*
Theme Name: Earthship Journey
Theme URI: https://earthshipjourney.com
Author: Willy Ortiz
Description: A handcrafted custom WordPress theme for Earthship tours, farm stays, handmade goods, and volunteer experiences in the Arizona desert.
Version: 1.0
*/

/* FONTS */
@font-face {
    font-family: 'Source Sans Pro';
    src: url('fonts/SourceSansPro-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Removed Italic and Bold; we keep Regular (400) + Semibold (600) only */
@font-face {
    font-family: 'Source Sans Pro';
    src: url('fonts/SourceSansPro-Semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* THEME VARIABLES – NEW PALETTE */
:root {
    /* Core brand colors */
    --color-primary: #3D8A90; /* deep teal */
    --color-primary-dark: #2F686C;
    --color-primary-light: #5AA6AC;
    --color-terracotta: #C86B47;
    --color-terracotta-dark: #A05035;
    --color-terracotta-light: #E08A63;
    --color-tan: #D9C5A3;
    --color-tan-dark: #B89F77;
    --color-tan-light: #EFE1C5;
    --color-green: #7A9A4F;
    --color-green-dark: #5E753C;
    --color-green-light: #9DBF6B;
    /* Neutrals */
    --color-bg: #F4F1EB;
    --color-surface: #FFFFFF;
    --color-border: #D5D0C5;
    --color-text: #2D2D2D;
    --color-text-muted: #6B6B6B;
    /* Legacy aliases (keep old names working) */
    --accent-color: var(--color-primary);
    --text-color: var(--color-text);
    --light-bg: var(--color-bg);
    --white: #FFFFFF;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--color-bg);
}

/* Use Semibold (600) for headings and bold text so we don’t need a 700-weight font */
h1, h2, h3, h4, h5, h6,
strong, b {
    font-weight: 600;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* NAVIGATION BAR */
.site-header {
    background: var(--color-primary); /* main teal */
    color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
}

nav.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    max-width: 1100px;
    margin: 0 auto;
    flex-wrap: wrap;
    z-index: 999;
}

nav h1 a {
    font-size: 1.8rem;
    color: var(--white);
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

    nav ul li a {
        color: var(--white);
        text-decoration: none;
        font-weight: 600;
        font-size: 0.98rem;
        transition: color 0.2s ease, transform 0.15s ease;
    }

.social-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Hamburger for mobile */
.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}

/* Spacer to account for fixed nav */
.nav-spacer {
    height: 56px; /* approximate nav height */
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background-color: #00728a; /* darker shade */
    color: #ffffff;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    will-change: transform;
}

    .btn:active {
        transform: scale(0.97);
    }

/* Optional secondary + outline buttons */
.btn-secondary {
    background-color: var(--color-terracotta);
    color: var(--white);
}

    .btn-secondary:hover {
        background-color: var(--color-terracotta-dark);
    }

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: 999px;
    padding: 0.5rem 1.3rem;
    font-weight: 600;
    cursor: pointer;
}

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

/* HERO */
.hero-circle-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: auto;
    min-height: 60vh;
    padding: 7rem 1rem 3rem; /* push below fixed nav */
    text-align: center;
    background-color: var(--light-bg);
}

.hero-circle-wrapper {
    margin-bottom: 1.5rem;
}

.hero-circle-img {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
}

.hero-circle-content h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary-dark);
}

.hero-circle-content p {
    margin-bottom: 1rem;
}

/* GENERIC SECTIONS */
section {
    padding: 3rem 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

    section h2 {
        font-size: 1.9rem;
        margin-bottom: 1rem;
        color: var(--color-primary-dark);
    }

    section .intro-text {
        margin-bottom: 1.5rem;
    }

/* ABOUT SECTION */
.about-image-wrapper {
    max-width: 600px;
    margin: 1.5rem 0 0; /* left-aligned, no auto-centering */
}

.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
    align-items: center;
    margin-top: 1.5rem;
}

.about-text ul {
    list-style: disc;
    padding-left: 1.3rem;
}

.about-text li {
    margin-bottom: 0.4rem;
}

.about-family-photo {
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

/* EARTHSHIP STATS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stat-card {
    background: var(--color-surface);
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    font-size: 0.95rem;
}

/* TOURS */
.tour-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.tour-card {
    background: var(--color-surface);
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

    .tour-card h3 {
        margin-top: 0.75rem;
        margin-bottom: 0.5rem;
    }

/* SHOP */
.shop-items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.shop-card {
    background: var(--color-surface);
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

    .shop-card h3 {
        margin-bottom: 0.5rem;
    }

.shop-note {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* VOLUNTEERS */
.volunteer-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.volunteer-card {
    background: var(--color-surface);
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

    .volunteer-card h3 {
        margin-top: 0.75rem;
        margin-bottom: 0.5rem;
    }

/* GALLERY */
#gallery {
    text-align: center;
}

    #gallery p {
        margin-bottom: 1rem;
    }

/* CONTACT */
.contact-form {
    display: grid;
    gap: 0.75rem;
    max-width: 550px;
    margin-top: 1rem;
}

    .contact-form input,
    .contact-form textarea {
        width: 100%;
        padding: 0.6rem 0.8rem;
        border-radius: 0.5rem;
        border: 1px solid #ccc;
        font-size: 1rem;
    }

    .contact-form textarea {
        min-height: 140px;
        resize: vertical;
    }

.contact-success {
    padding: 0.75rem 1rem;
    background: var(--color-green-light);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--color-green-dark);
}

.sr-only {
    position: absolute;
    left: -9999px;
}

/* PROJECT BLOG SECTION (shared styles) */
.project-blog-section {
    background: var(--light-bg);
    padding: 3rem 1rem 4rem;
}

.project-blog-inner {
    max-width: 1100px;
    margin: 0 auto;
}

/* Cards in a grid (used on home.php and projects.php) */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    align-items: stretch;
}

.project-post {
    background: var(--color-surface);
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Thumbnail wrapper: fixes uniform image height */
.project-thumb {
    height: 190px; /* uniform image height */
    margin-bottom: 0.85rem;
    border-radius: 0.75rem;
    overflow: hidden;
}

/* Actual image: fills wrapper nicely */
.project-post img,
.project-featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-title {
    margin-bottom: 0.4rem;
}

    .project-title a {
        text-decoration: none;
        color: var(--accent-color);
    }

        .project-title a:hover {
            text-decoration: underline;
        }

.project-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.6rem;
}

.project-excerpt {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

/* Read more pinned to bottom so all cards line up */
.read-more {
    margin-top: auto;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--accent-color);
}

    .read-more:hover {
        text-decoration: underline;
    }

.project-view-all {
    margin-top: 2rem;
}

/* Optional wrapper if using #projects-main (projects.php) */
#projects-main {
    padding: 3rem 1.5rem 4rem;
}

/* FADE-IN ANIMATION */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(10px);
}

    /* Animation only starts when JS adds .visible */
    .fade-in.visible {
        animation: fadeInUp 0.7s ease-out forwards;
    }

/* BLOG & PAGES (archive / project blog wrapper) */
.main-content {
    max-width: 800px;
    margin: 5rem auto 3rem;
    padding: 0 1rem;
}

    /* Make top Project Blog heading match theme */
    .main-content > h1 {
        text-align: center;
        margin-bottom: 1.5rem;
        color: var(--accent-color);
    }

article {
    margin-bottom: 3rem;
}

    article h1,
    article h2,
    article h3,
    article h4 {
        margin-top: 1.5rem;
        margin-bottom: 0.75rem;
    }

    article p {
        margin-bottom: 1rem;
    }

/* FOOTER */
footer {
    padding: 2rem 1rem;
    text-align: center;
    background: var(--color-terracotta-dark);
    color: var(--white);
    margin-top: 3rem;
}

/* BOOK NOW PAGE (from book-now.php) */
.book-main {
    max-width: 1100px;
    margin: 0 auto 3rem;
    padding: 4.5rem 1rem 0;
}

/* Compact Step 1 heading at top of page (not used now, safe to keep) */
.tidycal-heading {
    margin: 2rem 0 1.5rem;
}

.book-title {
    margin: 0 0 0.5rem;
}

.book-subtitle {
    max-width: 650px;
    margin: 0 0 0.5rem;
}

/* Checklist under heading */
.booking-steps {
    margin: 1rem 0 0;
    padding-left: 1.25rem;
}

    .booking-steps li {
        margin-bottom: 0.25rem;
    }

/* TidyCal + tabs */
.tidycal-booking h2,
.payments-section h2 {
    margin: 0 0 0.5rem;
}

.tidycal-booking > .tab-panels > p {
    margin: 0 0 1rem;
}

.tidycal-booking {
    margin-bottom: 3rem;
}

.tab-container {
    margin-top: 1.5rem;
}

.tab-buttons {
    display: inline-flex;
    border-radius: 999px;
    background: var(--color-tan-light);
    padding: 0.25rem;
    margin-bottom: 1rem;
}

.tab-button {
    border: none;
    background: transparent;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    color: var(--color-text-muted);
}

    .tab-button.active {
        background: var(--color-surface);
        color: var(--color-primary-dark);
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    }

.tab-panels {
    margin-top: 0;
}

.tab-panel h3 {
    margin-bottom: 0.5rem;
}

.tab-panel p {
    margin-bottom: 0.75rem;
}

/* Payments sidebar */
.payments-container {
    padding: 0;
    margin: 0;
}

/* Full sidebar card */
.payments-section {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 3rem;
    background: var(--color-tan-light);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

    .payments-section > p {
        max-width: 650px;
        margin-bottom: 1.25rem;
    }

.payments-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.payment-card {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    display: none;
    opacity: 0;
}

    .payment-card.show {
        display: block;
        opacity: 1;
        width: 100%;
        margin-bottom: 1.5rem;
    }

    .payment-card h3 {
        margin-top: 0;
        margin-bottom: 0.5rem;
    }

    .payment-card input[type="number"] {
        width: 80px;
        margin-left: 0.5rem;
    }

.payment-total {
    font-weight: 700;
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}

.small-note {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 1rem;
}

/* Error / helper text under inputs */
.input-hint {
    font-size: 0.8rem;
    color: #b04545;
    margin-top: 0.25rem;
    min-height: 1em;
}

/* Pay Now button */
.reveal-paypal-btn {
    background: #ffc439;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    margin: 1rem 0;
    transition: opacity 0.2s ease;
}

    .reveal-paypal-btn:hover {
        opacity: 0.85;
    }

.paypal-ui {
    margin-top: 1rem;
}

/* === Single Blog Post Layout === */

.blog-post-page {
    max-width: 900px;
    margin: 3rem auto 4rem; /* pushes content below fixed header */
    padding: 0 1.5rem 4rem;
}

.blog-post-content {
    background: var(--color-surface);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    padding: 1.5rem 1.75rem 2rem;
    font-size: 1.02rem;
    line-height: 1.75;
}

/* Header / title area (base styles) */
.blog-post-header {
    margin-bottom: 1.25rem;
}

    .blog-post-header h1 {
        font-size: 2rem;
        margin-bottom: 0.4rem;
        color: var(--accent-color);
    }

    .blog-post-header .post-meta {
        font-size: 0.9rem;
        color: var(--color-text-muted);
    }

        .blog-post-header .post-meta a {
            color: var(--color-text-muted);
            text-decoration: none;
        }

            .blog-post-header .post-meta a:hover {
                text-decoration: underline;
            }

    .blog-post-header .post-author {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .blog-post-header .author-avatar {
        border-radius: 50%;
    }

    .blog-post-header .author-text {
        display: flex;
        flex-direction: column;
    }

    .blog-post-header .author-name {
        font-weight: 600;
    }

.post-excerpt {
    margin-top: 1rem;
    font-size: 1rem;
    font-style: italic;
    color: var(--color-text-muted);
}

/* Featured image below header */
.blog-post-content .featured-image {
    margin: 1.25rem 0 1.75rem;
}

    .blog-post-content .featured-image img {
        width: 100%;
        height: auto;
        border-radius: 0.75rem;
        display: block;
    }

/* Body text */
.blog-post-content .post-body p {
    margin-bottom: 1rem;
}

.blog-post-content .post-body h2,
.blog-post-content .post-body h3,
.blog-post-content .post-body h4 {
    margin-top: 1.8rem;
    margin-bottom: 0.7rem;
}

.blog-post-content .post-body a {
    color: var(--accent-color);
    text-decoration: underline;
}

    .blog-post-content .post-body a:hover {
        text-decoration: none;
    }

/* Extra space when admin bar is visible (logged-in) */
body.admin-bar .blog-post-page {
    margin-top: 5rem;
}

/* Single post-specific header layout: left-aligned, stacked */
.single-post .blog-post-header {
    text-align: left;
    margin-bottom: 1.5rem;
}

    .single-post .blog-post-header h1 {
        margin-bottom: 0.75rem;
    }

/* Meta container: stacked lines */
.single-post .post-meta {
    display: block;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

/* Author row: avatar + name on one line */
.single-post .post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.single-post .author-avatar {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.single-post .author-name {
    font-weight: 600;
}

/* Date line */
.single-post .post-date {
    display: block;
    margin-bottom: 0.25rem;
}

/* Categories line */
.single-post .post-cats {
    margin-bottom: 0.25rem;
}

    .single-post .post-cats a {
        color: var(--color-text-muted);
        text-decoration: none;
    }

        .single-post .post-cats a:hover {
            text-decoration: underline;
        }

/* Excerpt: left-aligned below meta */
.single-post .post-excerpt {
    margin-top: 0.75rem;
    font-size: 1rem;
    font-style: italic;
    color: var(--color-text-muted);
    text-align: left;
}

/* LAYOUT: DESKTOP */
@media (min-width: 1024px) {
    .booking-layout {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 2rem;
    }

    .tab-panels {
        flex: 1 1 60%;
    }

    .payments-container {
        flex: 1 1 40%;
    }

    .payments-section {
        margin-top: 0;
        position: sticky;
        top: 1.5rem;
    }
}

/* RESPONSIVE NAV & SECTIONS */
@media (max-width: 900px) {
    nav ul {
        display: none;
        flex-direction: column;
        background: var(--color-terracotta-dark);
        width: 100%;
        padding: 0.5rem 1rem 1rem;
    }

        nav ul.show {
            display: flex;
        }

    .hamburger {
        display: block;
        color: var(--white);
        margin-left: auto;
    }

    .about-grid,
    .stats-grid,
    .tour-options,
    .shop-items,
    .project-grid,
    .volunteer-options {
        grid-template-columns: 1fr;
    }
}

/* RESPONSIVE HERO & BOOKINGS */
@media (max-width: 768px) {
    .hero-circle-section {
        padding-top: 6rem;
        min-height: auto;
    }

    .hero-circle-img {
        width: 160px;
        height: 160px;
    }

    .hero-circle-content h2 {
        font-size: 1.75rem;
    }

    .hero-circle-content p {
        font-size: 1rem;
    }

    .booking-layout {
        display: flex;
        flex-direction: column;
        gap: 1.75rem;
    }

    .tab-panels,
    .payments-container,
    .payments-section,
    .payment-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .payments-container {
        padding: 0;
        margin: 0;
        display: block;
    }

    .payments-section {
        padding-top: 0.75rem;
        margin: 0 0 1.5rem 0;
        min-height: 100vh;
    }

    #payment-context {
        padding-left: 0.25rem;
    }

    .payments-grid {
        flex-direction: column;
        padding-left: 0.25rem;
    }

    .payment-card.show {
        width: 100%;
    }

    /* extra safety for nav overlap on small screens */
    .blog-post-page {
        margin-top: 7.5rem;
    }
}

/* DESKTOP-ONLY HOVER LIFTS (buttons + nav links) */
@media (hover:hover) and (pointer:fine) {
    .btn:hover {
        background-color: var(--color-primary-dark);
        transform: translateY(-1px);
    }

    nav ul li a:hover {
        text-decoration: underline;
        transform: translateY(-1px);
    }
}

/* FOOTER CONTACT FORM */
.footer-contact .contact-form {
    max-width: 550px;
    margin: 0 auto;
    text-align: left;
}

.footer-contact {
    padding: 3rem 1rem;
    background: var(--color-terracotta);
    color: #fff;
    text-align: center;
}

    .footer-contact h2 {
        color: #fff;
        margin-bottom: 1rem;
    }

.footer-bottom {
    padding: 1.5rem 1rem;
    background: var(--color-terracotta-dark);
    color: #fff;
    text-align: center;
}

    .footer-bottom a {
        color: #fff;
        font-weight: 600;
    }

        .footer-bottom a:hover {
            text-decoration: underline;
        }

/* === Simple Lightbox === */

.ej-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none; /* hidden by default */
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
    padding: 1rem;
}

    .ej-lightbox.is-open {
        display: flex;
    }

.ej-lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    margin-bottom: 0.75rem;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.4);
    border-radius: 0.5rem;
    background: #000;
}

.ej-lightbox-caption {
    color: #f5f5f5;
    font-size: 0.9rem;
    text-align: center;
    max-width: 80vw;
}

.ej-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

/* FACEBOOK / INSTAGRAM IN-APP BROWSER TWEAKS */
.is-facebook-browser nav.main-nav h1 a {
    font-size: 1.4rem;
}

.is-facebook-browser .hamburger {
    font-size: 2.1rem;
}

.is-facebook-browser nav.main-nav {
    padding: 0.5rem 0.75rem;
}
