/* Kalpavriksha Page Styles */

:root {
    --accent: #4c76ba;
}

/* Override body padding for this page */
body {
    padding-bottom: 0 !important;
}

/* Ensure navbar menu appears above all content on mobile */
@media (max-width: 767px) {
    .navbar {
        z-index: 200;
    }
    
    .navbar .menu {
        z-index: 210 !important;
    }
}

.kalpavriksha-section {
    padding: var(--section-gap) 20px 0 20px;
    background: linear-gradient(135deg, #0a0a0a 0%, #0a1420 100%);
    min-height: auto;
}

.kalpavriksha-title {
    font-size: var(--base-h1);
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    color: var(--text);
    font-family: 'Anek Devanagari', serif;
}

.kalpavriksha-subtitle {
    font-size: var(--base-h3);
    text-align: center;
    color: var(--accent);
    margin-bottom: var(--element-gap);
    font-style: italic;
    letter-spacing: 1px;
}

/* Media Container */
.media-container {
    background: rgba(11, 11, 16, 0.8);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 60px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* Presentation Section */
.presentation-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.presentation-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 1.5px;
    font-family: 'EB Garamond', serif;
    margin: 0;
}

.presentation-text strong {
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 2px;
}

/* How it all began Section */
.how-it-began-section {
    padding: 40px 60px;
    background: linear-gradient(135deg, rgba(76, 118, 186, 0.08) 0%, rgba(76, 118, 186, 0.04) 100%);
    border-radius: 12px;
    border: 1px solid rgba(76, 118, 186, 0.2);
    backdrop-filter: blur(6px);
    margin-bottom: 40px;
    margin-top: 20px;
}

/* Synopsis Containers */
.synopsis-container {
    padding: 30px;
    background: linear-gradient(135deg, rgba(76, 118, 186, 0.08) 0%, rgba(76, 118, 186, 0.04) 100%);
    border-radius: 12px;
    border: 1px solid rgba(76, 118, 186, 0.2);
    backdrop-filter: blur(6px);
    margin-bottom: 40px;
}

.synopsis-above {
    margin-bottom: 40px;
    margin-top: 20px;
}

.synopsis-below {
    margin-top: 40px;
    margin-bottom: 40px;
}

.synopsis-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px 0;
    letter-spacing: 1.2px;
    font-family: 'Fredoka One', sans-serif;
    text-transform: uppercase;
    text-align: center;
    word-spacing: 2px;
}

.synopsis-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--muted-contrast);
    margin: 0 0 14px 0;
    font-family: 'EB Garamond', serif;
    text-align: center;
    letter-spacing: 0.5px;
    word-spacing: 0.2em;
    font-weight: 400;
}

.synopsis-text:last-child {
    margin-bottom: 0;
}

.synopsis-text strong {
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.6px;
}

/* Question container */
.question {
    margin: 20px 0;
}

.question p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--accent);
    margin: 10px 0;
    font-style: italic;
    letter-spacing: 0.4px;
    font-family: 'EB Garamond', serif;
}

/* Tab Navigation */
.media-tabs {
    display: none;
}

.media-tab-btn {
    display: none;
}

/* Tab Content */
.media-tab-content {
    display: none;
}

.media-tab-content.active {
    display: none;
}

/* Video Wrapper */
.video-wrapper {
    display: none;
}

/* YouTube Wrapper */
.youtube-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

.youtube-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* Fullscreen Button */
#fullscreen-btn {
    display: none;
}

.youtube-fullscreen-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(76, 118, 186, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 10;
}

.youtube-fullscreen-btn:hover {
    background: rgba(76, 118, 186, 1);
    transform: scale(1.1);
}

/* Visitor Counter */
.visitor-counter {
    text-align: center;
    padding: 40px;
    background: rgba(76, 118, 186, 0.15);
    border-radius: var(--radius);
    border: 1px solid rgba(76, 118, 186, 0.3);
}

.counter-label {
    font-size: 18px;
    color: var(--muted-contrast);
    margin-bottom: 15px;
}

.counter-display {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent);
    font-family: 'Fredoka One', sans-serif;
    letter-spacing: 2px;
}

#visitor-count {
    display: inline-block;
    min-width: 100px;
}

/* Footer */
.kalpavriksha-footer {
    background: rgba(11, 11, 16, 0.8);
    border-top: 1px solid rgba(76, 118, 186, 0.3);
    padding: 20px 20px;
    text-align: center;
    color: var(--muted-contrast);
    margin-top: 0;
}

.kalpavriksha-footer p {
    margin: 6px 0;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.kalpavriksha-footer a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.kalpavriksha-footer a:hover {
    color: var(--text);
}

/* Site Footer - Kalpavriksha Page */
.site-footer {
    padding: 35px 0 10px;
    margin-bottom: 0;
    margin-top: 0;
    position: relative;
}

.footer-back-link {
    position: absolute;
    top: 20px;
    right: 20px;
}

.back-to-home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid rgba(76, 118, 186, 0.4);
}

.back-to-home-link:hover {
    color: var(--text);
    background: rgba(76, 118, 186, 0.15);
    border-color: rgba(76, 118, 186, 0.8);
    transform: translateX(-3px);
}

.back-to-home-link i {
    font-size: 12px;
}

.site-footer .footer-inner {
    gap: 30px;
}

.footer-heading {
    font-size: clamp(22px, 4vw, 36px);
    margin-bottom: 25px;
}

.footer-contact-links {
    gap: 25px;
    margin-bottom: 15px;
}

.footer-contact-link {
    font-size: clamp(13px, 1.8vw, 15px);
    padding: 10px 16px;
}

.site-footer .footer-bottom {
    padding-right: 0;
    justify-content: center;
    width: 100%;
}

.site-footer .copyright {
    font-size: 12px;
    margin-top: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .kalpavriksha-section {
        padding: 40px 16px;
    }

    .presentation-section {
        margin-bottom: 35px;
        padding: 18px 0;
    }

    .presentation-text {
        font-size: 19px;
        letter-spacing: 1.2px;
    }

    .media-container {
        padding: 20px;
    }

    .synopsis-container {
        padding: 26px;
        margin-bottom: 30px;
    }

    .synopsis-above {
        margin-bottom: 30px;
        margin-top: 20px;
    }

    .synopsis-title {
        font-size: 18px;
        margin-bottom: 14px;
        letter-spacing: 1px;
    }

    .synopsis-text {
        font-size: 15px;
        line-height: 1.55;
        margin-bottom: 12px;
        letter-spacing: 0.4px;
    }

    .question {
        margin: 18px 0;
    }

    .question p {
        font-size: 14px;
        line-height: 1.5;
        margin: 8px 0;
    }

    .counter-display {
        font-size: 36px;
    }

    .youtube-fullscreen-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
        bottom: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .kalpavriksha-title {
        font-size: 28px;
    }

    .kalpavriksha-subtitle {
        font-size: 18px;
        margin-bottom: 30px;
    }

    .presentation-section {
        margin-bottom: 30px;
        padding: 16px 0;
    }

    .presentation-text {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .media-container {
        padding: 16px;
        margin-bottom: 40px;
    }

    .synopsis-container {
        padding: 20px;
        margin-bottom: 25px;
    }

    .synopsis-above {
        margin-bottom: 25px;
        margin-top: 15px;
    }

    .synopsis-title {
        font-size: 15px;
        margin-bottom: 12px;
        letter-spacing: 0.9px;
    }

    .synopsis-text {
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 10px;
        letter-spacing: 0.3px;
    }

    .question {
        margin: 16px 0;
    }

    .question p {
        font-size: 12px;
        line-height: 1.45;
        margin: 6px 0;
    }

    .counter-display {
        font-size: 32px;
    }

    .youtube-fullscreen-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* Fullscreen Styles */
.youtube-wrapper.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    padding-bottom: 0;
    border-radius: 0;
    background: #000;
}

.youtube-wrapper.fullscreen iframe {
    border-radius: 0;
}

/* Team Section */
.team-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(10, 10, 16, 0.8) 0%, rgba(20, 15, 40, 0.6) 100%);
    border-top: 1px solid rgba(76, 118, 186, 0.3);
    border-bottom: 1px solid rgba(76, 118, 186, 0.3);
    margin: 60px 0;
    position: relative;
    overflow: hidden;
}

.team-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(76, 118, 186, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Cast Section */
.cast-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(10, 10, 16, 0.8) 0%, rgba(20, 15, 40, 0.6) 100%);
    border-top: 1px solid rgba(76, 118, 186, 0.3);
    border-bottom: 1px solid rgba(76, 118, 186, 0.3);
    margin: 0 0 60px 0;
    position: relative;
    overflow: hidden;
}

.cast-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 50%, rgba(76, 118, 186, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.section-title {
    font-size: var(--base-h2);
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text);
    font-family: 'Anek Devanagari', serif;
    letter-spacing: 0.5px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.cast-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.team-member:hover {
    transform: translateY(-8px);
}

.member-photo-container {
    width: 100%;
    max-width: 240px;
    aspect-ratio: 4 / 5;
    margin: 0 auto 20px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(76, 118, 186, 0.4);
    background: linear-gradient(135deg, rgba(76, 118, 186, 0.15) 0%, rgba(76, 118, 186, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(76, 118, 186, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

.member-photo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(76, 118, 186, 0.1) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.member-photo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    z-index: 2;
    padding: 8px;
    box-sizing: border-box;
}

.team-member:hover .member-photo {
    transform: scale(1.08) rotate(1deg);
}

.member-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 5px;
    letter-spacing: 0.3px;
}

.member-role {
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.member-instagram {
    font-size: 24px;
    color: rgba(76, 118, 186, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid rgba(76, 118, 186, 0.4);
    background: rgba(76, 118, 186, 0.05);
}

.member-instagram:hover {
    color: #e1306c;
    border-color: #e1306c;
    background: rgba(225, 48, 108, 0.15);
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 4px 16px rgba(225, 48, 108, 0.2);
}

.team-member.cast-member .member-role {
    color: var(--accent);
}

/* Behind The Scenes Gallery - Full Width */
.bts-section {
    padding: 50px 0 0 0;
    background: #0a0a0a;
    margin: 40px 0 0 0;
}

.bts-section .section-title {
    padding: 0 20px;
}

.bts-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.bts-item {
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: #000;
}

.bts-item:hover {
    filter: brightness(1.05);
}

.bts-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.8);
    transition: filter 0.35s ease;
}

.bts-item:hover .bts-photo {
    filter: saturate(1.15) brightness(1.08);
}

/* Fullscreen Photo Modal */
.photo-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.photo-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2001;
}

.modal-close:hover {
    color: var(--accent);
    transform: scale(1.2);
}

/* BTS Slideshow Modal */
.slideshow-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    animation: fadeIn 0.3s ease;
}

.slideshow-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    animation: slideIn 0.3s ease;
}

.slideshow-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2001;
}

.slideshow-close:hover {
    color: var(--accent);
    transform: scale(1.2);
}

.slideshow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(76, 118, 186, 0.7);
    color: #fff;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    z-index: 2001;
}

.slideshow-nav:hover {
    background: rgba(76, 118, 186, 1);
    transform: scale(1.1);
}

.slideshow-prev {
    left: 20px;
}

.slideshow-next {
    right: 20px;
}

.slideshow-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 2001;
}

/* Hide slideshow on small screens */
@media (max-width: 768px) {
    .slideshow-modal {
        display: none !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        max-width: 100%;
        padding: 0 10px;
    }

    .cast-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        max-width: 100%;
        padding: 0 10px;
    }

    .member-photo-container {
        width: 100%;
        max-width: 180px;
        aspect-ratio: 4 / 5;
    }

    .team-section,
    .cast-section {
        padding: 45px 15px;
        margin: 45px 0;
    }

    .bts-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-title {
        font-size: var(--base-h3);
        margin-bottom: 35px;
    }

    .member-name {
        font-size: 15px;
        margin-bottom: 4px;
    }

    .member-role {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .member-instagram {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }

    .modal-close {
        top: 20px;
        right: 25px;
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0;
    }

    .cast-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0;
    }

    .member-photo-container {
        width: 100%;
        max-width: 130px;
        aspect-ratio: 4 / 5;
    }

    .member-name {
        font-size: 13px;
        margin-bottom: 3px;
    }

    .member-role {
        font-size: 10px;
        letter-spacing: 0.5px;
        margin-bottom: 8px;
    }

    .member-instagram {
        width: 33px;
        height: 33px;
        font-size: 16px;
    }

    .bts-gallery {
        grid-template-columns: 1fr;
    }

    .team-section,
    .cast-section {
        padding: 30px 12px;
        margin: 35px 0;
    }

    .bts-section {
        padding: 30px 0;
    }

    .section-title {
        font-size: 22px;
        margin-bottom: 25px;
    }

    .modal-close {
        top: 15px;
        right: 15px;
        font-size: 24px;
    }
}

/* Ultra Small Screens (320px - 375px) */
@media (max-width: 375px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0;
    }

    .cast-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0;
    }

    .member-photo-container {
        width: 110px;
        height: 145px;
    }

    .member-name {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .member-role {
        font-size: 9px;
        margin-bottom: 6px;
    }

    .member-instagram {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .team-section,
    .cast-section {
        padding: 25px 10px;
        margin: 30px 0;
    }

    .section-title {
        font-size: 19px;
        margin-bottom: 20px;
    }

    .bts-item {
        aspect-ratio: 1;
    }
}