/* 
 * PPF-VARIOPOOL CUSTOM GALLERY & LIGHTBOX SYSTEM
 * Optimized for speed, security, and white-label branding.
 */

/* 1. About Us Gallery (Elementor-style structure) */
.elementor-gallery__container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px !important;
    width: 100% !important;
    margin: 20px 0 !important;
}

@media (max-width: 921px) {
    .elementor-gallery__container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 544px) {
    .elementor-gallery__container {
        grid-template-columns: 1fr !important;
    }
}

.elementor-gallery-item {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    padding-bottom: 66.66% !important; /* 16:9 Aspect Ratio */
    overflow: hidden !important;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.e-gallery-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.elementor-gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    z-index: 10;
}

/* 2. Homepage Gallery (Basic WordPress structure) */
.gallery {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    width: 100% !important;
    margin: 20px 0 !important;
}

@media (max-width: 921px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 544px) {
    .gallery {
        grid-template-columns: 1fr !important;
    }
}

.gallery-item {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

.gallery-icon, .gallery-icon a {
    display: block !important;
    width: 100% !important;
    height: auto !important;
}

.gallery-icon img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    object-fit: cover !important;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.gallery-item:hover img {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.gallery-caption {
    display: none !important;
}

/* 3. Global Lightbox Styling */
#custom-lightbox {
    display: none;
    position: fixed;
    z-index: 2147483640; /* Maximum safe z-index */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#custom-lightbox.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.lightbox-content-container {
    position: relative;
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2147483641;
}

.lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,1);
    z-index: 2147483642;
}

.lightbox-close {
    position: fixed;
    top: 30px;
    right: 30px;
    color: #ffffff !important;
    background: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    line-height: 46px;
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    z-index: 2147483647;
    border-radius: 50%;
    transition: all 0.2s ease;
    border: 2px solid rgba(255,255,255,0.2);
}

.lightbox-close:hover {
    background: #bf0202;
    border-color: #ffffff;
    transform: rotate(90deg);
}

.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: fixed;
    top: 50%;
    color: white !important;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s ease;
    user-select: none;
    background-color: rgba(0,0,0,0.6);
    border-radius: 50%;
    z-index: 2147483647;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.2);
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 40px;
}

.lightbox-next {
    right: 40px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: #bf0202;
    border-color: #ffffff;
    width: 70px;
    height: 70px;
}

@media (max-width: 768px) {
    .lightbox-prev, .lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close { top: 15px; right: 15px; width: 40px; height: 40px; font-size: 30px; line-height: 38px; }
}

/* =============================================
   TEAM MEMBER CARDS - Premium Styling
   ============================================= */

/* Card wrapper */
.elementor-widget-image-box .elementor-image-box-wrapper {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 20px 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    height: 100%;
    box-sizing: border-box;
}

.elementor-widget-image-box .elementor-image-box-wrapper:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(15, 60, 79, 0.16);
}

/* Circular photo */
.elementor-widget-image-box .elementor-image-box-img {
    margin: 0 auto 18px !important;
    overflow: hidden;
    border-radius: 50% !important;
    width: 170px !important;
    height: 170px !important;
    border: 4px solid #dbe8eb;
    transition: border-color 0.3s ease;
    display: block;
}

.elementor-widget-image-box .elementor-image-box-wrapper:hover .elementor-image-box-img {
    border-color: #0f3c4f;
}

.elementor-widget-image-box .elementor-image-box-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
}

/* Text content */
.elementor-widget-image-box .elementor-image-box-content {
    text-align: center;
}

.elementor-widget-image-box .elementor-image-box-title {
    color: #0f3c4f !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    margin-bottom: 6px !important;
    font-family: 'Montserrat', sans-serif !important;
    line-height: 1.3 !important;
}

.elementor-widget-image-box .elementor-image-box-description {
    color: #666 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 !important;
}

/* Centre the 3-person bottom row */
.team-row-centered {
    justify-content: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
}

/* Responsive team cards */
@media (max-width: 768px) {
    .elementor-widget-image-box .elementor-image-box-img {
        width: 130px !important;
        height: 130px !important;
    }
    .elementor-widget-image-box .elementor-image-box-wrapper {
        padding: 20px 14px 18px;
    }
}


/* =============================================
   LINKEDIN COMPANY WIDGET
   ============================================= */

.linkedin-widget-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 50px;
    box-shadow: 0 8px 32px rgba(15, 60, 79, 0.10);
    flex-wrap: wrap;
}

.linkedin-widget-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    min-width: 250px;
}

.linkedin-icon-box {
    width: 72px;
    height: 72px;
    background: #0A66C2;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(10, 102, 194, 0.35);
}

.linkedin-text h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #0f3c4f;
    margin: 0 0 8px 0 !important;
    line-height: 1.3;
}

.linkedin-text p {
    font-size: 14px;
    color: #666;
    margin: 0 !important;
    line-height: 1.6;
    max-width: 400px;
}

.linkedin-widget-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.linkedin-follow-btn {
    display: inline-flex;
    align-items: center;
    background: #0A66C2;
    color: #ffffff !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 15px;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none !important;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 16px rgba(10, 102, 194, 0.30);
    white-space: nowrap;
}

.linkedin-follow-btn:hover {
    background: #004182;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(10, 102, 194, 0.45);
    color: #ffffff !important;
}

.linkedin-company-url {
    font-size: 12px;
    color: #999;
    margin: 0 !important;
}

/* Responsive LinkedIn widget */
@media (max-width: 768px) {
    .linkedin-widget-wrapper {
        flex-direction: column;
        padding: 30px 24px;
        text-align: center;
        gap: 24px;
    }
    .linkedin-widget-left {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    .linkedin-widget-right {
        width: 100%;
    }
    .linkedin-follow-btn {
        width: 100%;
        justify-content: center;
    }
    .linkedin-text p {
        max-width: 100%;
    }
}

/* =============================================
   MODERN FOOTER - PPF Variopool
   ============================================= */

.ppf-footer {
    background: linear-gradient(160deg, #0a1e2c 0%, #0f3c4f 100%);
    color: #cdd8dd;
    font-family: 'Montserrat', Verdana, sans-serif;
    margin-top: 0;
}

.ppf-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px 30px;
}

/* Top brand row */
.ppf-footer-top {
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
}

.ppf-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ppf-footer-logo {
    max-width: 220px;
    height: auto;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
    opacity: 1;
}

.ppf-footer-tagline {
    font-size: 14px;
    color: #7fa8b8;
    margin: 0 !important;
    line-height: 1.6;
    max-width: 400px;
    font-style: italic;
}

/* Divider line */
.ppf-footer-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin: 0 0 40px 0;
}

/* 3-column grid */
.ppf-footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

/* Column headings */
.ppf-footer-heading {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff !important;
    margin: 0 0 18px 0 !important;
    padding-bottom: 10px;
    border-bottom: 2px solid #0f7ca4;
    display: inline-block;
}

/* Nav links */
.ppf-footer-links {
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
}

.ppf-footer-links li {
    margin-bottom: 10px;
}

.ppf-footer-links a,
.ppf-footer-links a:visited {
    color: #a8c4cf !important;
    text-decoration: none !important;
    font-size: 14px;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: inline-block;
}

.ppf-footer-links a:hover {
    color: #ffffff !important;
    padding-left: 5px;
}

/* Address block */
.ppf-footer-address {
    font-style: normal;
    font-size: 14px;
    color: #a8c4cf;
    line-height: 1.9;
}

/* Bottom bar */
.ppf-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ppf-footer-copy {
    font-size: 12px;
    color: #5a8090;
    margin: 0 !important;
    text-align: center;
}

/* Responsive footer */
@media (max-width: 768px) {
    .ppf-footer-inner {
        padding: 40px 24px 24px;
    }
    .ppf-footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .ppf-footer-top {
        margin-bottom: 30px;
    }
    .ppf-footer-logo {
        max-width: 160px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .ppf-footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =============================================
   VACANCIES PAGE - Hiring Poster Card
   ============================================= */

.ppf-vacancy-card {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin: 40px 0;
    background: #f3f9fb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(15,60,79,0.10);
}

.ppf-vacancy-poster {
    flex: 0 0 auto;
    width: 340px;
    overflow: hidden;
}

.ppf-vacancy-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    transition: transform 0.3s ease;
}

.ppf-vacancy-poster a:hover img {
    transform: scale(1.03);
}

.ppf-vacancy-info {
    flex: 1;
    padding: 36px 36px 36px 0;
}

.ppf-vacancy-info h2 {
    color: #0f3c4f !important;
    font-size: 28px !important;
    margin-top: 0 !important;
    margin-bottom: 12px !important;
}

.ppf-vacancy-info h3 {
    color: #0f7ca4 !important;
    font-size: 18px !important;
    margin-top: 20px !important;
    margin-bottom: 8px !important;
}

.ppf-vacancy-info ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.ppf-vacancy-info ul li {
    margin-bottom: 6px;
    color: #333;
}

.ppf-vacancy-info p {
    color: #444;
    line-height: 1.7;
}

.ppf-apply-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 14px 36px;
    background: #0f3c4f;
    color: #ffffff !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none !important;
    border-radius: 4px;
    transition: background 0.25s ease, transform 0.2s ease;
}

.ppf-apply-btn:hover {
    background: #0f7ca4 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .ppf-vacancy-card {
        flex-direction: column;
        gap: 0;
    }
    .ppf-vacancy-poster {
        width: 100%;
    }
    .ppf-vacancy-info {
        padding: 24px;
    }
}
