/* 
   MEDITERRANEAN FOREST PALETTE
   Inspired by Razanac and outdoor nature
   Colors: Deep Olive/Forest (#2d3a24), Warm Stone/Sand (#dfcdb6), Muted Terracotta (#b35a41), Light Sage (#b6c8c2)
*/

/* ── Base ── */
body {
    background-color: #2d3a24;
    color: #dfcdb6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: 'Lora', 'Georgia', serif;
}

/* ── Text Accents ── */
em, i {
    color: #e5a983; /* Warm peach for italic text */
}

/* ── Headings ── */
h1, h2, h3, h4, h5, h6,
.post-preview .post-title,
.post-preview .post-subtitle {
    color: #dfcdb6 !important;
    font-family: 'Playfair Display', 'Georgia', serif;
}

/* Specific heading accent */
h1, h2 {
    color: #dfcdb6 !important;
}
h3, h4 {
    color: #e5a983 !important; /* Lighter warm sand for subheadings */
}

/* ── Links ── */
a, .post-preview a, footer a {
    color: #b35a41; /* Terracotta */
    transition: color 0.3s ease;
}
a:hover, a:focus,
.post-preview a:hover, .post-preview a:focus,
footer a:hover {
    color: #d1755a !important;
    text-decoration: none;
}

/* ── Navbar ── */
.navbar-custom {
    background: linear-gradient(180deg, #1f2a18 0%, #25311e 100%);
    border-bottom: 1px solid rgba(223, 205, 182, 0.1);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    z-index: 9999 !important;
}

.navbar-custom .navbar-toggle {
    z-index: 10000 !important;
}

.navbar-custom .navbar-brand,
.navbar-custom .nav li a {
    color: #dfcdb6 !important;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.85em;
    transition: color 0.3s ease;
}

.navbar-custom .navbar-brand:hover,
.navbar-custom .navbar-brand:focus,
.navbar-custom .nav li a:hover,
.navbar-custom .nav li a:focus {
    color: #b35a41 !important;
}

.navbar-custom .navbar-brand {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.1em;
    text-transform: none;
    letter-spacing: 0.02em;
}

@media only screen and (max-width: 767px) {
    .navbar-custom .nav .navlinks-container.show-children {
        background: #1f2a18;
    }
    .navbar-custom .navbar-toggle .icon-bar {
        background: #dfcdb6;
    }
}

/* ── Footer ── */
footer {
    background: linear-gradient(180deg, #25311e 0%, #1f2a18 100%);
    border-top: 1px solid rgba(223, 205, 182, 0.1);
    color: #b6c8c2;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.2);
}

footer .credits {
    color: #b6c8c2 !important;
}

footer a {
    color: #dfcdb6 !important;
}

/* ── Primary Button ── */
.btn-primary {
    background-color: #b35a41; /* Terracotta */
    border-color: #964a34;
    color: #ffffff;
    transition: all 0.3s ease;
    border-radius: 6px;
    font-family: 'Lora', 'Georgia', serif;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #d1755a !important;
    border-color: #b35a41 !important;
    color: #ffffff;
}

/* ── Pager buttons ── */
.pager li a {
    background: #39472f;
    color: #dfcdb6;
    border-color: rgba(223, 205, 182, 0.2);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.pager li a:hover,
.pager li a:focus {
    background: #4a5c3d;
    color: #ffffff;
    border-color: #b35a41;
}

/* ── Tables ── */
table {
    border-radius: 8px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
}

table tr {
    background-color: #39472f;
    border-top: 1px solid rgba(223, 205, 182, 0.15);
}

table tr:nth-child(2n) {
    background-color: #425237;
}

table tr th {
    border: 1px solid rgba(223, 205, 182, 0.2);
    background-color: #b35a41;
    color: #ffffff;
    font-family: 'Playfair Display', 'Georgia', serif;
    font-weight: 600;
}

table tr td {
    border: 1px solid rgba(223, 205, 182, 0.1);
    color: #dfcdb6;
}

/* ── Well ── */
.well {
    background-color: #39472f;
    border: 1px solid rgba(223, 205, 182, 0.15);
    border-radius: 12px;
    color: #dfcdb6;
}

/* ── Blockquotes ── */
blockquote {
    color: #e5a983;
    border-left: 4px solid #b35a41;
    border-radius: 0 6px 6px 0;
    background: rgba(179, 90, 65, 0.1);
    padding: 1em 1.5em;
}

/* ── Horizontal rule ── */
hr {
    border-top: 1px solid rgba(223, 205, 182, 0.2);
    margin: 2em 0;
}

/* ── Hero / Intro header ── */
.intro-header {
    position: relative;
}

.intro-header.big-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, transparent, #2d3a24);
    pointer-events: none;
}

.intro-header .big-img .img-desc {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-style: italic;
    font-size: 1.3em;
    letter-spacing: 0.02em;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

/* ── Page header overlay (for subpages) ── */
header.intro-header .page-heading h1,
header.intro-header .post-heading h1 {
    color: #dfcdb6 !important;
}

/* Subpage Headings Fix */
.page-heading h1, .post-heading h1 {
    color: #b35a41 !important; /* Reddish terracotta */
}
.page-heading .page-subheading, 
.post-heading .post-subheading {
    color: #e5a983 !important; /* Lighter peach/sand */
    font-family: 'Lora', 'Georgia', serif;
    font-size: 1.3em;
    font-weight: 500;
    opacity: 0.95;
    display: block;
    margin-top: 10px;
}
.page-heading hr {
    border-top: 2px solid rgba(223, 205, 182, 0.4) !important;
    margin: 15px auto;
    max-width: 100px;
}

/* ── Page content polish ── */
.container .row .col-lg-8 {
    font-family: 'Lora', 'Georgia', serif;
    font-size: 1.05em;
    line-height: 1.7;
}

/* ── Text selection ── */
::selection {
    background: rgba(179, 90, 65, 0.4);
    color: #ffffff;
}

/* ── Scrollbar (Webkit) ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #2d3a24;
}
::-webkit-scrollbar-thumb {
    background: #b35a41;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d1755a;
}

/* ── CSS-only decorative icons ── */
.icon-leaf {
    display: inline-block;
    width: 20px;
    height: 20px;
    position: relative;
}
.icon-leaf::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 0 50% 0 50%;
    background: linear-gradient(135deg, #b6c8c2 0%, #768d85 100%);
    opacity: 0.7;
    transform: rotate(15deg);
}

.branch-divider {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2em auto;
    max-width: 250px;
}
.branch-divider::before {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #b35a41 30%, #e5a983 50%, #b35a41 70%, transparent 100%);
    opacity: 0.6;
}
.branch-divider::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #b35a41;
}

/* ── Timeline for Program Page ── */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 4em auto;
    padding: 2em 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background: linear-gradient(to bottom, transparent, #b35a41, transparent);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
    text-align: left;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    right: -9px;
    background-color: #dfcdb6;
    border: 4px solid #b35a41;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 0 4px rgba(45, 58, 36, 0.8);
}

.timeline-item.right::after {
    left: -9px;
}

/* Making the timeline content stand out with a light stone background */
.timeline-content {
    padding: 20px 30px;
    background: #dfcdb6; /* Light warm stone background */
    position: relative;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    border: 2px solid #b6c8c2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    border-color: #b35a41;
}

.timeline-time {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.4em;
    color: #b35a41; /* Terracotta for time */
    font-weight: 700;
    margin-bottom: 5px;
}

.timeline-desc {
    font-family: 'Lora', 'Georgia', serif;
    color: #2d3a24; /* Dark forest for text */
    font-weight: 500;
    font-size: 1.1em;
    margin: 0;
}

@media screen and (max-width: 600px) {
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        text-align: left;
    }
    
    .timeline-item.right {
        left: 0;
    }
    
    .timeline-item.left::after, .timeline-item.right::after {
        left: 22px;
    }
}