/* Custom styles for Janjan */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --dark-color: #212529;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Hepta Slab', serif;
    font-size: 1.125rem;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex: 1;
}

main a {
    color: #000;
    font-weight: bold;
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

main a:hover {
    color: #000;
    opacity: 0.7;
}

/* Navbar customization */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Logo responsive */
.logo-img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 991.98px) {
    .logo-img {
        max-width: 170px;
    }
}

.navbar-toggler {
    border-radius: 0;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background-color: rgba(0, 0, 0, 0.4);
    padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5rem;
    height: 1.5rem;
}

.navbar-nav {
    margin-left: 2rem;
}

@media (max-width: 991.98px) {
    .navbar-nav {
        margin-left: 0;
    }
}

.navbar .nav-link {
    color: #fff !important;
    opacity: 1;
    transition: all 0.3s ease;
    font-size: 1.05rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.navbar .nav-link.active {
    color: #000 !important;
    background-color: rgba(255, 255, 255, 0.4);
    text-shadow: 0 0 10px rgba(255, 255, 255, 1), 0 0 20px rgba(255, 255, 255, 0.8);
}

.navbar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Greek frise before footer */
.frise-grec {
    background-image: url('../images/frise-grec.svg');
    background-repeat: repeat-x;
    height: 18px;
    background-size: auto 100%;
    margin-top: auto;
}

/* Footer */
footer {
}

/* Header with background image - maintains 16:9 ratio */
header {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 800px;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    transition: filter 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Gradient overlay under nav for readability on header images */
header:not(.header-compact) .navbar {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 70%, transparent 100%);
}

/* Compact header (no background image, nav only) */
header.header-compact {
    aspect-ratio: auto;
    max-height: none;
    background-color: #000;
}

/* Custom header content - positioned at the bottom */
.header-custom-content {
    position: relative;
    z-index: 2;
    color: white;
    margin-top: auto;
}

/* Dark overlay when mobile menu is open */
@media (max-width: 991.98px) {
    header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0);
        z-index: 1;
        transition: background-color 0.3s ease;
    }

    header:has(.navbar-collapse.show)::before {
        background-color: rgba(0, 0, 0, 0.6);
    }

    header nav {
        position: relative;
        z-index: 2;
    }
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Video container */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Share block */
.share-block {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.share-label {
    font-size: 0.875rem;
    color: #666;
}

.share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #000;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.share-icon:hover {
    opacity: 0.7;
    color: #fff;
}

.share-icon i {
    font-size: 1rem;
}

/* Justified text */
.text-justify {
    text-align: justify;
}

/* Side image for content pages */
.side-image {
    position: sticky;
    bottom: 0;
    align-self: flex-end;
}

.side-image img {
    width: 100%;
    height: auto;
}

/* Gallery thumbnails */
.gallery-thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 1;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-thumb:hover img {
    transform: scale(1.08);
    opacity: 0.85;
}

/* Sticky sidebar TOC */
.toc-sidebar {
    top: 2rem;
    padding: 1rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    background-color: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.toc-sidebar .nav-link,
main .toc-sidebar a {
    color: #555;
    font-size: 0.875rem;
    padding: 0.35rem 0.75rem;
    border-left: 2px solid transparent;
    border-radius: 0;
    font-weight: normal;
    text-decoration: none;
    transition: all 0.2s ease;
}

.toc-sidebar .nav-link.active,
main .toc-sidebar a.active {
    color: #000;
    font-weight: bold;
    border-left-color: #000;
    background-color: transparent;
    text-decoration: none;
}

.toc-sidebar .nav-link:hover,
main .toc-sidebar a:hover {
    color: #000;
    background-color: rgba(0, 0, 0, 0.03);
    text-decoration: none;
}

/* Mobile TOC */
.toc-mobile-btn {
    font-size: 0.9rem;
}

.toc-mobile .nav-link,
main .toc-mobile a {
    font-size: 0.9rem;
    color: #333;
    padding: 0.25rem 0.75rem;
    text-decoration: none;
    font-weight: normal;
}

.toc-mobile .nav-link:hover,
main .toc-mobile a:hover {
    color: #000;
    text-decoration: none;
}

/* Zoomable images hover effect */
.section-separator img,
section img {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.section-separator img:hover,
section img:hover {
    opacity: 0.85;
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Video thumbnails with play button */
.video-thumb {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background-color: #000;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.video-thumb:hover img {
    opacity: 0.7;
    transform: scale(1.03);
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255, 0, 0, 0.85);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.video-thumb:hover .video-play-btn {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: rgba(255, 0, 0, 1);
}

/* Section separators */
.section-separator + .section-separator {
    padding-top: 3rem;
    position: relative;
}

.section-separator + .section-separator::before {
    content: '';
    display: block;
    height: 18px;
    background-image: url('../images/frise-grec.svg');
    background-repeat: repeat-x;
    background-size: auto 100%;
    margin-bottom: 3rem;
}

