<?php
/**
 * Theme Name: GeneratePress Child
 * Description: Child theme for GeneratePress with alternating layout
 * Author: Your Name
 * Template: generatepress
 * Version: 2.1.00
 * Date: 7 Feb 2026
 * Purpose: Alternating image-text layout for recent posts
 */

/* Import parent theme styles */
@import url("../generatepress/style.css");

/* ==========================================================================
   ROOT VARIABLES
   ========================================================================== */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #059669;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --background-primary: #ffffff;
    --background-secondary: #f8fafc;
    --background-dark: #374151;
    --border-color: #e5e7eb;
    --border-radius: 0.5rem;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   HOMEPAGE CONTAINER
   ========================================================================== */
.homepage-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.homepage-container > section {
    display: block;
    width: 100%;
    clear: both;
    margin: 0;
    padding: 0;
}
body.home .site-header .inside-header {
    align-items: flex-start !important;
    padding-top: 0 !important;
}

.site-branding {
    align-self: flex-start !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}



/* ==========================================================================
   HOMEPAGE HERO (Logo + Slider)
   ========================================================================== */
.homepage-hero {
    display: grid !important;
    grid-template-columns: 200px 1fr;
    width: 100%;
    max-width: 1015px;
    margin: 0 auto;
    padding: 0;
    background-color: #ffffff;
    overflow: hidden;
}

.homepage-hero-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    gap: 0.75rem;
}

.homepage-hero-logo img {
    max-width: 160px;
    height: auto;
}

.homepage-hero-welcome {
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--text-primary, #1f2937);
}

.homepage-hero-welcome p {
    margin: 0;
}

.homepage-hero-search {
    width: 100%;
}

.homepage-hero-search input[type="search"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--border-radius, 0.5rem);
    font-size: 0.9rem;
}

.homepage-hero-search .search-submit {
    display: none;
}

.homepage-hero-translate {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.translate-info-link {
    font-size: 1.2rem;
    color: var(--secondary-color, #64748b);
    text-decoration: none;
    line-height: 1;
}

.translate-info-link:hover {
    color: var(--primary-color, #2563eb);
}

/* Hide the floating GTranslate widget on front page */
body.home .gt_float_switcher {
    display: none !important;
}

body.home .gtranslate_wrapper:not(#gt-hero-wrapper .gtranslate_wrapper) {
    display: none !important;
}

.homepage-hero-slider {
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.homepage-hero-slider #metaslider-id-27 {
    max-width: 100% !important;
}

.homepage-hero-slider .slides li {
    max-width: 100% !important;
}

.homepage-hero-slider .slides li img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
}

/* Mobile hint - hidden on desktop */
.mobile-hint {
    display: none;
}

@media (max-width: 768px) {
    .mobile-hint {
        display: block;
        text-align: center;
        font-size: 0.85rem;
        color: var(--text-secondary, #6b7280);
        background: var(--background-secondary, #f8fafc);
        padding: 0.5rem 1rem;
        margin: 0;
    }

    .homepage-hero {
        grid-template-columns: 1fr !important;
    }

    .homepage-hero-logo {
        justify-content: center;
        padding: 1rem;
    }

    .homepage-hero-logo img {
        max-width: 120px;
    }
}

/* ==========================================================================
   ALTERNATING POST LAYOUT
   ========================================================================== */
.alternate-post,
.alternate-post-reverse {
    display: flex !important;
    flex-direction: row !important;
    gap: 0;
    align-items: stretch;
    margin-bottom: 0;
    margin-top: 0;
    padding: 0;
    width: 100%;
    height: 500px;
}

.alternate-post-reverse {
    flex-direction: row-reverse !important;
}

.alternate-post-image {
    flex: 0 0 65% !important;
    max-width: 65%;
    overflow: hidden;
    height: 500px;
}

.alternate-post-image a {
    display: block;
    height: 100%;
    width: 100%;
}

.alternate-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.alternate-post-content-link {
    flex: 1 1 35% !important;
    text-decoration: none;
    display: flex;
    height: 500px;
}

.alternate-post-content {
    flex: 1;
    background-color: #4a5568;
    padding: 1rem 3rem;  /* 4rem top/bottom, 5rem left/right */
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.alternate-post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #ffffff;
    line-height: 1.2;
}

.alternate-post-title a {
    color: #ffffff;
    text-decoration: none;
}

.alternate-post-title a:hover {
    color: #e5e7eb;
}

.alternate-post-excerpt {
    color: #e5e7eb;
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 0;
}

.alternate-post-readmore {
    display: none;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    line-height: 1.5;
    min-height: 44px;
}

.btn-primary {
    background-color: #b5cdf2;
    color: #000000 !important;
    border: none;
}

.btn-primary:hover {
    background-color: #8eb6ee;
    color: #000000 !important;
    border: none;
}

/* ==========================================================================
   FEATURED AUTHORS SECTION
   ========================================================================== */

.author-posts-section {
    margin-bottom: 3rem;
    margin-top: 4rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.author-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.author-post-box {
    background-color: var(--background-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.author-post-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.author-post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.author-post-image img, .page-content-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.author-post-box:hover .author-post-image img {
    transform: scale(1.05);
}

.author-post-content {
    padding: 1.5rem;
}

.author-post-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.author-post-title a {
    color: inherit;
    text-decoration: none;
}

.author-post-title a:hover {
    color: var(--primary-color);
}

.author-post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ==========================================================================
   VIDEO SECTION
   ========================================================================== */

/* Video Info Hint Tooltip */
.video-info-hint {
    position: relative;
    font-size: 1.2rem;
    color: var(--secondary-color, #64748b);
    cursor: pointer;
    vertical-align: middle;
}

.video-info-tooltip {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 2rem;
    background: var(--background-dark, #374151);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 400;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius, 0.5rem);
    width: 260px;
    line-height: 1.5;
    box-shadow: var(--shadow-lg);
    z-index: 10;
    text-align: left;
}

.video-info-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--background-dark, #374151);
}

.video-info-hint:hover .video-info-tooltip,
.video-info-hint:focus .video-info-tooltip {
    display: block;
}

.video-section-standalone {
    margin-bottom: 3rem;
    margin-top: 4rem;
}

.video-section {
    background-color: var(--background-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.section-content {
    padding: 1.5rem;
}

.video-container {
    text-align: center;
}

.video-player {
    width: 100%;
    max-width: 100%;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.video-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Video Thumbnail Bar */
.video-thumbnail-bar {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 1rem 0 0.5rem;
    scrollbar-width: thin;
}

.video-thumbnail-bar::-webkit-scrollbar {
    height: 6px;
}

.video-thumbnail-bar::-webkit-scrollbar-thumb {
    background: var(--secondary-color, #64748b);
    border-radius: 3px;
}

.video-thumb {
    flex: 0 0 auto;
    width: 120px;
    background: none;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 0;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.video-thumb:hover {
    border-color: var(--primary-color, #2563eb);
    transform: translateY(-2px);
}

.video-thumb-active {
    border-color: var(--primary-color, #2563eb);
    box-shadow: 0 0 0 1px var(--primary-color, #2563eb);
}

.video-thumb-preview {
    width: 100%;
    height: 68px;
    object-fit: cover;
    display: block;
    pointer-events: none;
    background: #000;
}


/* ==========================================================================
   CUSTOM FOOTER
   ========================================================================== */

.custom-footer {
    background-color: #374151 !important;
    color: white !important;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p, .footer-section a {
    color: #d1d5db;
    line-height: 1.6;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #4b5563;
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: #9ca3af;
}

/* ==========================================================================
   MOBILE RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .homepage-container {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .alternate-post,
    .alternate-post-reverse {
        flex-direction: column;
        gap: 1.5rem;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .alternate-post-image {
        flex: none;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .alternate-post-title {
        font-size: 1.5rem;
    }
    
    .author-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .alternate-post-excerpt {
        font-size: 1rem;
    }
    
    .author-post-content {
        padding: 1rem;
    }
    
    .section-content {
        padding: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* iPad specific - keep side-by-side but ensure full width */
    .homepage-container {
        padding: 2rem 2rem !important;
        width: 100% !important;
    }
    
    .alternate-post,
    .alternate-post-reverse {
        width: 100% !important;
    }
}


/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.text-center { text-align: center; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }

/* Hide MetaSlider Lightbox "Open in Lightbox" button on gallery pages */
.ml-lightbox-button {
    display: none !important;
}

/* ==========================================================================
   MASONRY GALLERY
   ========================================================================== */

.gallery-back-btn {
    display: inline-block;
    font-size: 0.95rem;
    color: var(--primary-color, #2563eb);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--primary-color, #2563eb);
    border-radius: var(--border-radius, 0.5rem);
    transition: background-color 0.2s, color 0.2s;
}

.gallery-back-btn:hover {
    background-color: var(--primary-color, #2563eb);
    color: #fff;
}

.gallery-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.gallery-page-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.masonry-gallery {
    column-count: 3;
    column-gap: 1rem;
}

.masonry-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 1rem;
    break-inside: avoid;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    text-decoration: none;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.masonry-item:hover img {
    transform: scale(1.03);
}

.masonry-caption {
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    font-size: 0.85rem;
    padding: 2rem 0.75rem 0.5rem;
}

@media (max-width: 768px) {
    .masonry-gallery {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .masonry-gallery {
        column-count: 1;
    }
}

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */

.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox.lightbox-active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-caption {
    color: #d1d5db;
    font-size: 0.95rem;
    margin-top: 0.75rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 100000;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-close {
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    line-height: 1;
}

.lightbox-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
}

.lightbox-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
}

/* File: style.css | Version: 2.1.00 */
/* Hide ONLY menu items, keep header structure */
body.home .main-navigation .main-nav ul,
body.home .main-navigation .mobile-bar-items,
.menu-toggle,
.navigation-search,
.header-widget .widget,
.inside-header .main-navigation {
    display: none !important;
}

/* Hide default header logo - keep only homepage-hero logo */
body.home .site-header .site-logo,
body.home .site-header .custom-logo-link {
    display: none !important;
}
