@font-face {
    font-family: 'Amatic SC';
    src: url('fonts/AmaticSC-Regular.woff2') format('woff2'),
    url('fonts/AmaticSC-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Amatic SC';
    src: url('fonts/AmaticSC-Bold.woff2') format('woff2'),
    url('fonts/AmaticSC-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #ffffff, #ffffff);
    font-family: 'Vazirmatn', 'Estedad', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* TOP NAVIGATION */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1100;
    overflow: visible;
    min-height: 60px;
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    flex-wrap: wrap;
}

.logo img {
    max-height: 80px;
    width: auto;
    object-fit: contain;
}

.main-menu ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.main-menu ul li {
    margin-left: 20px;
}

.main-menu ul li a {
    text-decoration: none;
    color: #1A1919;
    font-size: 16px;
    transition: color 0.3s ease;
}

.main-menu ul li a:hover,
.main-menu ul li a:focus {
    color: #FEC33F;
}

/* Main view area with PDF viewer */
.viewport {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 20px 20px;
    overflow: auto;
}

.pdf-viewer {
    width: 100%;
    max-width: 1000px;
    text-align: center;
}

#pdf-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    max-height: 80vh;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    cursor: pointer;
}

#pdf-canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.nav-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.nav-button {
    background-color: #ffffff;
    color: #1A1919;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.nav-button:hover:not(:disabled) {
    background-color: #EAB000;
    transform: scale(1.05);
}

.nav-button:disabled {
    background-color: #ddd;
    cursor: not-allowed;
}

#page-info {
    font-size: 16px;
    color: #1A1919;
    font-family: Helvetica, cursive;
}

/* Footer fixed at bottom */
.site-footer {
    background: linear-gradient(135deg, #F5F5F5 0%, #FFFFFF 100%);
    padding: 10px 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 5;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1150px;
    margin: 0 auto;
    color: #444444;
    font-size: 16px;
    font-family: Helvetica, Cambria, serif;
}

.footer-inner .footer-icons img {
    height: 30px;
    width: auto;
    margin-left: 12px;
    transition: transform 0.3s ease;
}

.footer-inner .footer-icons img:hover {
    transform: scale(1.2) rotate(10deg);
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 10px;
    }

    .main-menu ul {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }

    .main-menu ul li {
        margin-left: 0;
    }

    .viewport {
        padding: 70px 10px 10px;
    }

    .pdf-viewer {
        max-width: 90%;
    }

    #pdf-container {
        max-height: 70vh;
    }

    .nav-controls {
        flex-direction: column;
        gap: 10px;
    }

    .nav-button {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .nav-container {
        padding: 5px 10px;
    }

    .main-menu ul {
        flex-direction: column;
        gap: 5px;
    }

    .main-menu ul li a {
        font-size: 18px;
        text-align: center;
    }

    .viewport {
        padding: 60px 5px 5px;
    }

    .pdf-viewer {
        max-width: 100%;
    }

    #pdf-container {
        max-height: 60vh;
    }

    #page-info {
        font-size: 14px;
    }
}