/* ==========================================================================
 * 1. Fonts Import & Global Reset
 * ========================================================================== */
@font-face {
    font-family: 'Benne';
    src: url('../../fonts/Benne-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Bitstream Vera Sans Mono';
    src: url('../../fonts/VeraMono-regular.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Bitstream Vera Sans Mono';
    src: url('../../fonts/VeraMono-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../../Pictures/bsnlbg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    font-family: 'Benne', 'Bitstream Vera Sans Mono', sans-serif, serif;
    font-weight: 500;
    line-height: 1.7;
    background-color: #f4f7f6;
    color: #222222;

    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
}

/* ==========================================================================
 * 2. Header & Navigation
 * ========================================================================== */
header {
    background-color: rgba(255, 255, 255, 0.92);
    padding: 24px 28px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: inline-block;
    width: 100%;
    max-width: 800px;
    margin-bottom: 28px;
    text-align: center;
    position: relative;
}

header h1 {
    font-size: 2.6rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 16px;
}

.lang-btn {
    position: absolute;
    top: 14px;
    left: 14px;
    display: inline-block;
    background-color: #0056b3;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
}

nav {
    font-size: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
}

nav a {
    color: #2d3748;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
}

nav a:hover {
    background-color: #cbd5e0;
    color: #004494;
}

/* ==========================================================================
 * 3. Main Article Layout
 * ========================================================================== */
.voip-main {
    width: 100%;
    max-width: 900px;
    background-color: rgba(255, 255, 255, 0.92);
    padding: 40px;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    margin-bottom: 28px;
}

.blog-header {
    margin-bottom: 32px;
    border-bottom: 2px solid #cbd5e0;
    padding-bottom: 20px;
}

.blog-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-meta {
    font-size: 1.2rem;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 20px;
}

.disclaimer-box {
    background-color: #fff0f0;
    border-left: 5px solid #e53e3e;
    color: #9b2c2c;
    padding: 18px 22px;
    border-radius: 6px;
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.7;
}

/* ==========================================================================
 * 4. Theory Section & Flowchart Image Provision
 * ========================================================================== */
.theory-section {
    margin-bottom: 40px;
}

.theory-section h3,
.steps-section h3 {
    font-size: 1.9rem;
    font-weight: 700;
    color: #004494;
    margin-bottom: 18px;
}

.theory-section p {
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 20px;
}

/* Outer Container */
.theory-diagram-container {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #cbd5e0;
    border-radius: 10px;
    padding: 24px;
    margin: 28px 0;
    text-align: center;
}

.theory-diagram-container h4 {
    color: #1a202c;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 22px;
}

/* Desktop Layout: Side-by-Side Flexbox */
.theory-diagram-grid {
    display: flex;
    flex-direction: row;
    gap: 24px;
    justify-content: center;
    align-items: stretch;
}

/* Individual Flowchart Cards */
.theory-diagram-card {
    flex: 1;
    min-width: 0;
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.diagram-title {
    color: #1a202c;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.theory-diagram-wrapper {
    display: inline-block;
    width: 100%;
    position: relative;
}

.theory-diagram-photo {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: zoom-in;
    transition: transform 0.2s ease, opacity 0.2s ease;
    margin: 0 auto;
}

.theory-diagram-photo:hover {
    opacity: 0.92;
    transform: scale(1.01);
}

.theory-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
}

.theory-card {
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid #cbd5e0;
    border-radius: 10px;
    padding: 20px;
}

.theory-card h4 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 10px;
}

.theory-card p {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0;
}

code {
    background-color: #e2e8f0;
    color: #b7791f;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Bitstream Vera Sans Mono', monospace;
}

/* ==========================================================================
 * 5. Step-by-Step Layout
 * ========================================================================== */
.steps-intro {
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 28px;
}

.step-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.step-card {
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    border: 1px solid #cbd5e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step-photo-wrapper {
    position: relative;
    width: 100%;
}

.step-photo {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.step-photo.cropped-thumb {
    height: 220px;
    object-fit: cover;
    object-position: top center;
}

.step-photo:hover {
    opacity: 0.92;
    transform: scale(1.01);
}

.photo-hint {
    font-size: 1.05rem;
    font-weight: 600;
    color: #4a5568;
    display: block;
    text-align: center;
    margin-top: 8px;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
}

.step-desc {
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 500;
}

.step-list-items {
    margin-left: 24px;
    margin-top: 12px;
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 500;
}

.step-list-items li {
    margin-bottom: 8px;
}

/* ==========================================================================
 * 6. Lightbox & Zoom Modal Styles
 * ========================================================================== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-toolbar {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 10000;
}

.lightbox-toolbar button {
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.lightbox-toolbar button:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.lightbox-toolbar .close-lightbox {
    background-color: #e53e3e;
    border: none;
}

.lightbox-toolbar .close-lightbox:hover {
    background-color: #c53030;
}

.lightbox-content-container {
    width: 90%;
    height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#lightbox-img {
max-width: 90%;
max-height: 85vh;
object-fit: contain;
transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
cursor: grab;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
 * 7. Desktop Layout
 * ========================================================================== */
@media (min-width: 900px) {
    header,
    footer,
    .voip-main {
        width: 95%;
        max-width: 1300px;
    }

    .theory-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .step-card {
        flex-direction: row;
        align-items: center;
        gap: 36px;
    }

    .step-text {
        flex: 1;
    }

    .step-photo-wrapper {
        width: 45%;
        max-width: 480px;
        flex-shrink: 0;
    }
}

/* ==========================================================================
 * 8. Mobile Responsiveness (max-width: 899px)
 * ========================================================================== */
@media (max-width: 899px) {
    header {
        padding-top: 20px;
    }

    .lang-btn {
        position: static;
        display: inline-block;
        margin: 0 0 14px 0;
    }

    nav a {
        padding: 8px 14px;
    }

    .theory-diagram-grid {
        flex-direction: column;
    }
}

/* ==========================================================================
 * 9. Footer
 * ========================================================================== */
footer {
    width: 100%;
    max-width: 900px;
    margin-top: 28px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    text-align: center;
}

footer p {
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
}
