/* =========================================
   Additional Interactive Modules CSS
   ========================================= */

/* --- Fixed WhatsApp Button --- */
.whatsapp-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 9990;
    /* below page transition but above everything else */
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-widget:hover {
    transform: translateY(-5px);
}

.wa-tooltip {
    background: var(--surface);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    pointer-events: none;
    position: relative;
    white-space: nowrap;
}

.whatsapp-widget:hover .wa-tooltip {
    opacity: 1;
    transform: translateX(0);
}

.wa-icon {
    width: 60px;
    height: 60px;
    background-color: #25D366;
    /* Official WhatsApp Green */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    position: relative;
}

.wa-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #25D366;
    z-index: -1;
    animation: wa-pulse 2s infinite;
}

.wa-svg {
    width: 35px;
    height: 35px;
    fill: white;
}

@keyframes wa-pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .whatsapp-widget {
        bottom: 20px;
        right: 20px;
    }

    .wa-icon {
        width: 50px;
        height: 50px;
    }

    .wa-svg {
        width: 30px;
        height: 30px;
    }

    .wa-tooltip {
        display: none;
    }
}

/* --- FAQ Accordion --- */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-item:hover {
    border-color: var(--border-glass);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.5rem 2rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: var(--font-heading);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-icon {
    width: 24px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background-color: var(--accent-light);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
}

.faq-icon::before {
    width: 16px;
    height: 2px;
}

.faq-icon::after {
    width: 2px;
    height: 16px;
}

.faq-item.active .faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-answer-inner {
    padding: 0 2rem 1.5rem 2rem;
    color: var(--text-secondary);
    line-height: 1.7;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    margin-top: 10px;
    padding-top: 15px;
}

/* --- Project Modal & Map --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 11, 16, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-main);
    width: 95vw;
    max-width: 1600px;
    height: 95vh;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: row;
    /* Force row layout for desktop */
    overflow: hidden;
    transform: translateY(30px) scale(0.98);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(15, 28, 41, 0.6);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    transition: all 0.3s;
    padding: 0;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 1000;
    cursor: pointer;
}

.modal-close:hover {
    background: var(--accent);
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

@media (max-width: 900px) {
    .modal-content {
        flex-direction: column;
    }

    .modal-body {
        flex-direction: column;
        overflow-y: auto;
    }
}

.modal-gallery {
    flex: 1.6;
    /* 61.5% approx width */
    background: #000;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-media-container {
    flex: 1;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-main-img,
.modal-main-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Bleeding edge to edge */
}

/* Horizontal scrollable thumbnails overlaid at bottom */
.modal-thumbnail-strip {
    height: 100px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 15px 25px;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-thumbnail-strip::-webkit-scrollbar {
    height: 6px;
}

.modal-thumbnail-strip::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.modal-thumbnail-strip::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

.thumb-item {
    width: 100px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    background: #111;
}

.thumb-item.active,
.thumb-item:hover {
    opacity: 1;
    border-color: var(--accent-light);
}

.thumb-item img,
.thumb-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.thumb-video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    pointer-events: none;
}

.modal-info {
    flex: 1;
    /* 38.5% approx width */
    background: var(--surface);
    border-left: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    overflow-y: hidden;
}

/* The scrollable wrapper added via JS */
.modal-info-scrollable {
    overflow-y: auto;
    height: 100%;
    padding: 3rem 2.5rem;
}

.modal-info-scrollable::-webkit-scrollbar {
    width: 6px;
}

.modal-info-scrollable::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.modal-info-scrollable::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

.modal-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.modal-features {
    list-style: none;
    margin-bottom: 2rem;
}

.modal-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.modal-features li::before {
    content: '✓';
    color: var(--accent);
    font-weight: bold;
}

/* Map specific styles */
.map-container {
    width: 100%;
    flex-grow: 1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    min-height: 250px;
    border: 1px solid var(--border-light);
    background: #1a1a1a;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Interactive click hint on project cards */
.proj-box {
    cursor: pointer;
}

.proj-box::after {
    content: 'Harita & Bilgi İçin Tıklayın';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(33, 125, 141, 0.9);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    opacity: 0;
    z-index: 10;
    transition: all 0.3s ease;
    pointer-events: none;
    font-size: 0.9rem;
}

.proj-box:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}