/* Insurance Pages Styles */
.insurance-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.insurance-container {
    background: var(--white);
}

.section-title {
    font-size: 1.8rem;
    color: var(--dark-grey);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-blue);
}

/* Images Section */
.images-section {
    margin-bottom: 4rem;
    position: relative;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

.images-grid.fullscreen {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1500;
    background: rgba(0, 0, 0, 0.95);
    overflow-y: auto;
}

.images-grid.fullscreen {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.images-grid.fullscreen .image-item {
    width: 100%;
    height: 100vh;
    flex-shrink: 0;
    aspect-ratio: auto;
    border-radius: 0;
}

.images-grid.fullscreen .image-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-item {
    width: 100%;
    overflow: hidden;
    margin-bottom: 0;
    transition: all 0.3s;
    cursor: pointer;
    border-radius: 8px;
    background: var(--grey-bg);
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.placeholder-text {
    text-align: center;
    color: var(--grey-text);
    padding: 3rem;
    background: var(--grey-bg);
    border-radius: 8px;
}

/* Fullscreen Toggle Button */
.fullscreen-toggle {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.fullscreen-toggle:hover {
    background: var(--dark-blue);
    transform: translateY(-50%) scale(1.05);
}

.fullscreen-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.fullscreen-toggle.active {
    background: var(--dark-grey);
}

.images-section.fullscreen-mode .fullscreen-toggle {
    position: fixed;
    right: 20px;
    top: 20px;
    transform: none;
    z-index: 1600;
}

/* Board Section */
.board-section {
    margin-bottom: 4rem;
}

.board-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.board-list {
    background: var(--white);
    border: 1px solid var(--border-grey);
    border-radius: 8px;
    overflow: hidden;
}

.board-item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-grey);
    cursor: pointer;
    transition: background 0.3s;
}

.board-item:hover {
    background: var(--grey-bg);
}

.board-item:last-child {
    border-bottom: none;
}

.board-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.board-item-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark-grey);
}

.board-item-date {
    color: var(--grey-text);
    font-size: 0.9rem;
}

.board-item-meta {
    display: flex;
    gap: 1rem;
    color: var(--grey-text);
    font-size: 0.9rem;
}

/* FAQ Section */
.faq-section {
    margin-bottom: 4rem;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--border-grey);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--grey-bg);
    transition: background 0.3s;
}

.faq-question:hover {
    background: var(--border-grey);
}

.faq-question-text {
    font-weight: 500;
    color: var(--dark-grey);
}

.faq-toggle {
    font-size: 1.5rem;
    color: var(--primary-blue);
    transition: transform 0.3s;
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
}

.faq-answer-content {
    padding: 1.5rem;
    color: var(--grey-text);
    line-height: 1.8;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 800px;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--grey-text);
    line-height: 1;
}

.modal-close:hover {
    color: var(--dark-grey);
}

/* Post Detail */
.post-detail {
    padding: 1rem 0;
}

.post-detail-header {
    border-bottom: 2px solid var(--border-grey);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.post-detail-title {
    font-size: 1.5rem;
    color: var(--dark-grey);
    margin-bottom: 0.5rem;
}

.post-detail-meta {
    display: flex;
    gap: 1rem;
    color: var(--grey-text);
    font-size: 0.9rem;
}

.post-detail-content {
    margin-bottom: 3rem;
    line-height: 1.8;
    color: var(--dark-grey);
    white-space: pre-wrap;
}

/* Comments Section */
.comments-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-grey);
}

.comments-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--dark-grey);
}

.comment-form {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--grey-bg);
    border-radius: 8px;
}

.comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-grey);
    border-radius: 4px;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
}

.comment-form input {
    width: 200px;
    padding: 0.75rem;
    border: 1px solid var(--border-grey);
    border-radius: 4px;
    margin-right: 1rem;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-item {
    padding: 1.5rem;
    background: var(--white);
    border: 1px solid var(--border-grey);
    border-radius: 8px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 500;
    color: var(--dark-grey);
}

.comment-date {
    color: var(--grey-text);
    font-size: 0.9rem;
}

.comment-content {
    color: var(--grey-text);
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Image Viewer Modal */
.image-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.image-viewer.active {
    display: flex;
}

.image-viewer-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.image-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    font-size: 2.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3001;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.image-viewer-prev,
.image-viewer-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    font-size: 3rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3001;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.image-viewer-prev {
    left: 20px;
}

.image-viewer-next {
    right: 20px;
}

.image-viewer-prev:hover,
.image-viewer-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.image-viewer-controls {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 3001;
    flex-wrap: wrap;
    justify-content: center;
}

.image-viewer-btn {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.image-viewer-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.image-viewer-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.image-viewer-image-container {
    width: 100%;
    height: calc(100% - 120px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: auto;
    padding: 80px 100px 40px;
    position: relative;
}

.image-viewer-image-container.fit-mode {
    align-items: center;
}

.image-viewer-image-container img {
    transition: all 0.3s ease;
    display: block;
}

.image-fit-width {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
}

.image-fit-height {
    width: auto !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
}

.image-fit-screen {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover;
}

.image-fit-original {
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.image-viewer-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 3001;
}

/* Responsive */
@media (max-width: 768px) {
    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .image-item {
        aspect-ratio: 3 / 4;
    }
    
    .fullscreen-toggle {
        display: none !important;
    }
    
    .image-viewer-controls {
        top: 70px;
        left: 10px;
        right: 10px;
        transform: none;
        flex-wrap: wrap;
    }
    
    .image-viewer-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .image-viewer-prev,
    .image-viewer-next {
        width: 50px;
        height: 50px;
        font-size: 2.5rem;
    }
    
    .image-viewer-image-container {
        padding: 100px 20px 60px;
    }
    
    .board-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
