/*
Theme Name: Hello Elementor Child - Bible
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Child theme for Hello Elementor with Bible functionality
Author: Your Name
Author URI: https://yourwebsite.com
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
*/

/* ============================================
   GLOBAL & LAYOUT
   ============================================ */

body {
    margin: 0;
    min-height: 100vh;
    background:
        /* centered image in top 50% */
        url("https://biblija.samoglasnik.com/wp-content/uploads/2025/11/image-13-1.png") center 10vh no-repeat,
        /* gradient only in top 50% */
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.16) 0%,
            #ffffff 100%
        ) no-repeat;
    background-size:
        auto 40vh,   /* image confined to top 50% height */
        100% 40vh;   /* gradient covers exactly the top 50% */
}

/* General Page Wrapper */
.bible-page-wrapper {
    min-height: 100vh;
    padding: 20px 0;
    z-index: 11111;
}

.bible-container {
    max-width: 1140px;
    margin: 0 auto;
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* ============================================
   TYPOGRAPHY & TITLES
   ============================================ */

.bible-page-title {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
}

.bible-page-title h1 {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 36px;
    font-weight: 400;
    color: #2c2c2c;
    margin: 0;
    letter-spacing: 1px;
}

/* ============================================
   SEARCH SECTION
   ============================================ */

.bible-search-section {
    padding: 30px 40px;
    margin-bottom: 40px;
}

.search-row {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.search-by-term,
.search-by-reference {
    flex: 1;
    border-bottom: solid 1px #D9D9D9;
}

.search-by-term label,
.search-by-reference label {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: #182940;
}

.search-by-term form,
.search-by-reference form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-by-term input[type="text"],
.search-by-reference input[type="text"],
.search-by-reference input[type="number"],
.search-by-reference select {
    flex: 1;
    border: none;
    font-size: 14px;
    color: #182940;
    background: none;
}

.search-by-term input[type="text"] {
    color: #999 !important;
    font-style: italic;
}

.search-by-reference input[type="number"] {
    padding: 0;
}

.search-by-reference select,
.book-dropdown {
    min-width: 140px;
    cursor: pointer;
    background: none;
    color: #BFA454;
    font-family: Georgia;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 22px; 
}

.search-by-term input::placeholder,
.search-by-reference select {
    color: #BFA454;
    font-family: Georgia;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 22px; 
}
.search-by-term input::placeholder {
	color: #BDBDBD !important;
}

.search-by-reference input::placeholder {
    color: #999;
    font-style: italic;
}

.btn-pretrazi {
    background-color: #b8985f !important;
    color: #ffffff !important;
    padding: 10px 30px;
    border: none;
    border-radius: 5px 5px 0 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.btn-pretrazi:hover {
    background-color: #a08550 !important;
}

/* ============================================
   HOMEPAGE, TESTAMENTS & BOOKS
   ============================================ */

.bible-homepage-section {
    padding: 0;
    margin-bottom: 40px;
}

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

/* Testament Section Wrapper */
.testament-section {
    margin-bottom: 20px;
    border-bottom: solid 1px #D9D9D9;
    overflow: hidden;
}

.testament-section:last-child {
    margin-bottom: 40px;
}

/* The Clickable Toggle Bar */
.testament-toggle {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    text-decoration: none;
    transition: background-color 1s;
}

.testament-toggle h2 {
    font-size: 22px;
    font-weight: 400;
    font-style: italic;
    color: #b8985f !important;
    margin: 0;
}

.toggle-icon {
    font-size: 32px;
    color: #182940 !important;
    font-weight: 300;
    line-height: 1;
    transition: transform 1s ease;
}

/* The Collapsed Border Logic */
.testament-collapsed {
    border-bottom: 1px solid #D9D9D9;
    transition: border-bottom 0.3s;
    display: block !important; /* Ensures JS doesn't hide it */
}

.testament-section .testament-collapsed,
.testament-collapsed:last-child {
    border-bottom: none;
}

/* THE SLIDING CONTAINER (Animation Logic) */
.testament-books-container {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease-out, opacity 0.4s ease-out;
    display: block !important;
}

.testament-books-container.is-open {
    opacity: 1;
}

/* Remove border from toggle when expanded */
.testament-books-container.is-open + .testament-collapsed,
.testament-books-container.is-open ~ .testament-collapsed {
    border-bottom: none;
}

/* THE INNER CONTENT (Expanded View) */
.testament-books-expanded {
    padding: 0 40px;
    margin-bottom: 20px;
    transition: all 1s ease-out;
}

/* FIX: Hide the header inside the expanded content */
.testament-books-expanded .testament-header {
    display: none !important;
}

.testament-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #D9D9D9;
}

.testament-header h2 {
    font-size: 22px;
    font-weight: 400;
    font-style: italic;
    color: #b8985f !important;
    margin: 0;
}

.close-testament {
    font-size: 36px;
    color: #999;
    text-decoration: none;
    line-height: 1;
    transition: color 1s;
    cursor: pointer;
}

.close-testament:hover {
    color: #333;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px 30px;
}

.book-link {
    color: #5C5C5C;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    font-size: 14px;
    line-height: 2;
    font-weight: 700;
    transition: color 2s;
}

.book-link:hover {
    color: #b8985f;
}

/* Interactive Map Section */
.interactive-map-section {
    margin-bottom: 40px;
}

.map-placeholder {
    background-color: #d9d9d9 !important;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.map-placeholder h2 {
    font-size: 28px;
    font-weight: 400;
    color: #666;
    margin: 0;
}

/* ============================================
   CHAPTER READING SECTION
   ============================================ */

.bible-reading-section {
    position: relative;
    padding: 10px;
    margin-bottom: 40px;
}

/* Chapter Selector with Dropdowns */
.chapter-selector {
    margin-bottom: 40px;
    padding-bottom: 30px;
}

.book-chapter-dropdowns {
    display: flex;
    max-width: 600px;
    gap: 20px;
    align-items: center;
}

.book-dropdown-large {
    width: 65%;
    font-size: 22px;
    font-family: 'Georgia', 'Times New Roman', serif;
    color: #182940 !important;
    border: none !important;
    cursor: pointer;
    font-style: italic;
    font-weight: 400;
    line-height: 23px;
}
.chapter-dropdown-large {
    font-size: 22px;
    width: 35%;
    font-family: 'Georgia', 'Times New Roman', serif;
    color: #182940 !important;
    border: none !important;
    cursor: pointer;
    font-style: italic;
    font-weight: 400;
    line-height: 23px; 
}
.book-dropdown-large,
.chapter-dropdown-large {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23b8985f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center; 
    background-size: 16px; 
    padding-right: 25px; 
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.book-dropdown-large:focus,
.chapter-dropdown-large:focus {
    outline: none;
    box-shadow: none;
    border: none;
}

.book-dropdown-large:hover,
.chapter-dropdown-large:hover {
    color: #a08550;
}

/* Chapter Content & Text */
.chapter-content {
    margin-bottom: 40px;
}

.chapter-number-display {
    position: absolute;
    left: -60px;
    top: 100px;
}

.chapter-number-display h2 {
    font-size: 52px;
    font-weight: 400;
    font-family: Georgia, serif;
    color: #182940;
    margin: 0;
    text-align: left;
}

.verses-text {
    font-family: 'Inter', sans-serif;
    line-height: 2;
    font-size: 14px;
    color: #5C5C5C;
    text-align: left;
    font-weight: 300;
}

.verse {
    display: inline;
}

.verse-number {
    font-size: 11px;
    color: #BFA454;
    margin-right: 2px;
    font-weight: 300;
}

.verse-text {
    color: #5C5C5C;
}

.verse.highlighted .verse-text {
    color: #BFA454 !important;
    font-weight: 600;
}

.verse-text h2,
.verse-text h3,
.verse-text h4 {
    display: inline;
    font-family: 'Inter', sans-serif;
    color: #182940;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 700;
}

.verse-text h2::after,
.verse-text h3::after,
.verse-text h4::after {
    content: "";
    display: block !important;
}

.verse-heading {
    font-weight: 700;
    color: #2c2c2c;
    margin: 25px 0 15px 0;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

/* Navigation Footer */
.chapter-navigation-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border: 1px solid #D9D9D9;
    background: rgba(250, 250, 250, 0.60);
}

.nav-link {
    padding: 10px 20px;
    color: #182940;
    text-decoration: none;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.nav-link:hover {
    background-color: #f5f5f5;
    color: #333;
}

.nav-home {
    font-weight: 600;
}

.nav-disabled {
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .search-row {
        flex-direction: column;
        gap: 20px;
    }

    .books-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .bible-container {
        padding: 0 20px;
    }

    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 20px;
    }

    .testament-toggle {
        padding: 12px 20px;
    }

    .testament-books-expanded {
        padding: 5px 20px;
    }

    .map-placeholder {
        min-height: 300px;
    }

    .map-placeholder h2 {
        font-size: 22px;
    }

    .bible-page-title h1 {
        font-size: 32px;
    }

    .bible-search-section {
        padding: 20px;
    }

    .bible-reading-section {
        padding: 20px;
    }

    .book-chapter-dropdowns {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .book-dropdown-large,
    .chapter-dropdown-large {
        width: 100%;
        font-size: 16px;
    }

    .chapter-number-display h2 {
        font-size: 36px;
    }

    .verses-text {
        font-size: 15px;
        line-height: 1.8;
        text-align: left;
    }

    .chapter-navigation-footer {
        flex-direction: column;
        gap: 10px;
    }

    .nav-link {
        width: 100%;
        text-align: center;
    }

    .nav-disabled {
        display: none;
    }
}

@media (max-width: 480px) {
    .bible-page-title h1 {
        font-size: 30px;
    }

    .books-grid {
        grid-template-columns: 1fr;
    }

    .testament-toggle h2,
    .testament-header h2 {
        font-size: 18px;
    }

    /* SHARED MOBILE LAYOUT FOR BOTH FORMS */
    .search-by-term form,
    .search-by-reference form {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;       /* Key to multi-line layout */
        align-items: stretch;
        gap: 10px;
    }

    .search-by-term label,
    .search-by-reference label {
        width: 100%;           /* Label takes full top row */
        margin-bottom: -5px;
    }

    /* BUTTONS */
    .btn-pretrazi {
        border-radius: 5px;   /* Unified radius */
        width: auto !important;
    }

    /* SEARCH BY TERM SPECIFIC */
    .search-by-term input[type="text"] {
        flex: 1;
        border: solid 1px #D9D9D9;
        border-radius: 5px;
        font-size: 14px;
        color: #182940;
        background: none;
    }
    
    /* SEARCH BY REFERENCE SPECIFIC */
    .search-by-reference {
        margin-top: 30px;
    }
    
    .search-by-term, 
    .search-by-reference {
        border-bottom: none; /* Removes divider on mobile */
    }

    /* Force Dropdown to full width (Row 2) */
    .search-by-reference select {
        width: 100%;
        flex: 1 1 100%;
        border: 1px solid #D9D9D9;
        background-color: #fff;
        border-radius: 5px;
        padding: 10px;
        margin-bottom: 5px;
		color: #182940 !important;
    }

    /* Inputs & Button share Row 3 */
    .search-by-reference input[type="number"] {
        flex: 1;              
        min-width: 0;
        width: auto;
        text-align: center;
        background-color: #fff;
        border: 1px solid #D9D9D9;
        border-radius: 5px;
        padding: 8px 5px;
    }
    
    .search-by-reference .btn-pretrazi {
        flex: 1; /* Grows to match inputs */
        padding: 10px 5px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .bible-search-section,
    .chapter-selector,
    .chapter-navigation-footer {
        display: none;
    }

    .bible-page-wrapper {
        background-color: white;
    }

    .bible-reading-section {
        box-shadow: none;
        padding: 0;
    }

    .verses-text {
        font-size: 12pt;
        line-height: 1.6;
    }
}

/* Pulse animation for highlighted verse */
@keyframes versePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.9;
    }
}

/* Smooth scroll behavior for the whole page */
html {
    scroll-behavior: smooth;
}