/*
Theme Name: Give to Jamaica WordPress Theme
Description: A custom WordPress theme for Give to Jamaica based on the Sopot HTML template. This theme is designed for charity and non-profit organizations.
Author: MalachiLabs
Author URI: https://malachilabs.com
Version: 1.0.20
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: givetojamaica
Tags: charity, non-profit, donation, responsive, bootstrap
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
*/

/*
 * Custom WordPress Theme Styles
 *
 * The main Sopot CSS files are enqueued via functions.php
 * This file is for custom overrides and WordPress-specific styles only
 */

/* WordPress Core Styles */
.alignnone {
    margin: 5px 20px 20px 0;
}

.aligncenter,
div.aligncenter {
    display: block;
    margin: 5px auto 5px auto;
}

.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

a img.alignnone {
    margin: 5px 20px 20px 0;
}

a img.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    background: #fff;
    border: 1px solid #f0f0f0;
    max-width: 96%;
    padding: 5px 3px 10px;
    text-align: center;
}

.wp-caption.alignnone {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignleft {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignright {
    margin: 5px 0 20px 20px;
}

.wp-caption img {
    border: 0 none;
    height: auto;
    margin: 0;
    max-width: 98.5%;
    padding: 0;
    width: auto;
}

.wp-caption p.wp-caption-text {
    font-size: 11px;
    line-height: 17px;
    margin: 0;
    padding: 0 4px 5px;
}

/* Screen reader text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-size: 0.875rem;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Custom theme overrides */
.donation-contact-info div{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
}

/* Donation Modal Styles */
.donation-modal-image {
    margin-bottom: 20px;
}

.donation-modal-image img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Fix button styling for modal triggers */
button.thm-btn,
button.donate-btn,
button.causes-one__donate-btn {
    border: none !important;
    outline: none !important;
    cursor: pointer;
    text-decoration: none;
}

button.thm-btn:focus,
button.donate-btn:focus,
button.causes-one__donate-btn:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.donation-modal-form {
    padding: 0;
}

.donation-modal-description {
    font-size: 14px;
    line-height: 1.5;
    text-align: justify;
    padding: 10px;
    border: 2px solid var(--sopot-base);
    border-radius: 10px;
    color: var(--sopot-black);
}

.donation-modal-description p {
    margin-bottom: 0;
    text-align: justify;
}

/* Modal customizations */
.modal-header {
    border-bottom: none !important;
        position: absolute;
    right: 0;
    z-index: 1050;
}

/* Donation Cart Icon Styling */
.donation-cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-size: 18px;
}

.donation-cart-link i.fas.fa-shopping-cart {
    font-size: 20px;
    color: inherit;
}

.donation-cart-link .donation-cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--sopot-base);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
}

/* Cart count visibility - only affect menu cart count */
.donation-cart-link .donation-cart-count {
    display: none; /* Hidden by default in menu */
}

/* Show menu cart count when JavaScript adds the 'show' class */
.donation-cart-link .donation-cart-count.show {
    display: flex !important;
}

/* Cart page count should always be visible when it exists */
.donation-cart__title .donation-cart-count {
    display: inline-block !important;
    margin-left: 10px;
}

/* Animation for cart count updates */
.donation-cart-count.pulse-animation {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 30px;
}
.modal-content {
    box-shadow: 0 15px 40px rgba(var(--sopot-pink-rgb), 0.2);
    border: 2px solid var(--sopot-pink);
    border-radius: 10px;
    overflow:hidden;
}
/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 10px;
    }

    .modal-body {
        padding: 20px;
    }

    .donation-modal-image {
        margin-bottom: 15px;
    }
}

.organization-search-section {
                background: #f8f9fa;
                padding: 30px 30px 0px 30px;
                border-radius: 10px;
                box-shadow: 0 2px 10px rgba(0,0,0,0.3);
            }

            .search-input-group input:focus,
            .search-input-group select:focus {
                outline: none;
                border-color: #ff6b35;
                box-shadow: 0 0 5px rgba(255, 107, 53, 0.3);
            }

            .search-input-group button:hover {
                background: #e55a2b !important;
                transform: translateY(-1px);
                transition: all 0.3s ease;
            }

            #organization-results.loading {
                opacity: 0.6;
                pointer-events: none;
            }

            .no-results {
                text-align: center;
                font-size: 18px;
                color: #666;
                padding: 40px 0;
            }

            .error-message {
                text-align: center;
                color: #dc3545;
                font-size: 16px;
                padding: 20px 0;
            }

            .organization-pagination {
                display: inline-block;
                padding: 8px 12px;
                margin: 0 2px;
                text-decoration: none;
                border: 1px solid #ddd;
                color: #333;
                border-radius: 4px;
                transition: all 0.3s ease;
            }

            .organization-pagination:hover,
            .organization-pagination.current {
                background: #ff6b35;
                color: white;
                border-color: #ff6b35;
                text-decoration: none;
            }

            @media (max-width: 768px) {
                .search-input-group {
                    flex-direction: column !important;
                    gap: 10px !important;
                }

                .search-input-group > div {
                    min-width: auto !important;
                }
            }

            /* Global Search Popup Enhancements */

            .search-type-toggle input[type="radio"] {
                margin-right: 5px;
            }

            .search-type-toggle label {
                cursor: pointer;
                transition: all 0.3s ease;
            }

            .search-type-toggle label:hover {
                opacity: 0.8;
            }f

            #live-search-results {
                border: 1px solid #ddd;
                border-radius: 5px;
                box-shadow: 0 4px 6px rgba(0,0,0,0.1);
                background: white;
                max-height: 400px;
                overflow-y: auto;
            }

            .search-result-item:hover {
                background-color: #f8f9fa !important;
                transform: translateY(-1px);
                transition: all 0.2s ease;
            }

            .search-result-item:last-child {
                border-bottom: none !important;
            }
            .small-card{
                justify-content: space-between;
                display: inline-flex;
                width: 100%;    
                
                gap: 20px;
                margin-top: 10px;
                margin-bottom:20px;
            }
            .small-info{
                margin-top: 0px !important;
                flex: 1 1 calc(33.333% - 20px);
            }

            /* Video gallery styles */
            .gallery-page__video {
                position: relative;
            }

            .gallery-page__video-overlay {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                background: rgba(0, 0, 0, 0.7);
                border-radius: 50%;
                width: 60px;
                height: 60px;
                display: flex;
                align-items: center;
                justify-content: center;
                pointer-events: none;
                transition: all 0.3s ease;
            }

            .gallery-page__video-overlay i {
                color: white;
                font-size: 24px;
                margin-left: 3px; /* Slight offset for play icon visual balance */
            }

            .gallery-page__video:hover .gallery-page__video-overlay {
                background: rgba(0, 0, 0, 0.8);
                transform: translate(-50%, -50%) scale(1.1);
            }

            /* Ensure video thumbnails match image sizing */
            .gallery-page__video img {
                height: 350px !important;
                object-fit: cover !important;
            }

            /* Style uploaded videos */
            .uploaded-video-popup video {
                box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            }

            /* Fix close button for uploaded videos to match YouTube */
            .mfp-inline-holder .mfp-close {
                top: -40px !important;
                color: #fff !important;
                border-radius: 50% !important;
                width: 100% !important;
                height: 44px !important;
                line-height: 44px !important;
                text-align: right !important;
                opacity: 0.8 !important;
            }

            .mfp-inline-holder .mfp-close:hover {
                opacity: 1 !important;
            }

            /* Ensure consistent popup sizing for both video types */
            .mfp-content {
                max-width: 900px;
                margin: 40px auto;
            }

            /* Responsive Organization Details */
            .project-details__list .small-info h4 {
                word-wrap: break-word;
                overflow-wrap: break-word;
            }

            .project-details__list .small-info p,
            .project-details__list .small-info a {
                word-wrap: break-word;
                overflow-wrap: anywhere;
                margin-bottom: 0;
            }

            /* Responsive breakpoints for organization details */
            @media (max-width: 768px) {
                .small-card {
                    flex-direction: column !important;
                    gap: 10px !important;
                }

                .small-info {
                    flex: 1 1 100% !important;
                    margin-bottom: 15px !important;
                }


                /* Center aligned items (Phone, Email, Follow Us) */
                .project-details__list .small-info .center {
                    text-align: center !important;
                    padding: 10px !important;
                }

                .project-details__list .small-info .center h4 {
                    margin-bottom: 8px !important;
                }

                .project-details__list .small-info .center a {
                    word-break: break-all;
                }

                /* Social media icons responsive */
                .project-details__social a {
                    margin: 0 8px !important;
                }
            }

            @media (max-width: 480px) {
                .project-details__list .small-info .center h4 {
                    font-size: 14px !important;
                }

                .project-details__list .small-info .center a {
                    font-size: 12px !important;
                }

                .project-details__social a {
                    margin: 0 5px !important;
                    font-size: 16px !important;
                }
            }