/* Foreword Section Styles */

@font-face {
    font-family: 'New Rocker';
    src: url('../../assets/fonts/New_Rocker/NewRocker-Regular.ttf') format('truetype');
}

.foreword {
    width: 100%;
    padding: 4rem 2rem;
    background-color: #f5f1e8;
    min-height: auto;
}

.foreword__container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 3rem;
}

.foreword__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.foreword__line-thick-top,
.foreword__line-thin-top,
.foreword__line-thin-bottom,
.foreword__line-thick-bottom {
    width: 100%;
    background-color: #2c2c2c;
}

.foreword__line-thick-top,
.foreword__line-thick-bottom {
    height: 2px;
}

.foreword__line-thin-top,
.foreword__line-thin-bottom {
    height: 1px;
}

.foreword__title {
    font-family: 'New Rocker', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    letter-spacing: 2px;
}

.foreword__content {
    display: flex;
    gap: 0.1rem;
    align-items: center;
}

.foreword__left {
    flex: 0 0 35%;
}

.foreword__image-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.foreword__border {
    width: 100%;
    max-width: 80%;
    height: auto;
    margin-bottom: 1.5rem;
}

.foreword__author-info {
    text-align: center;
}

.foreword__author-name {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a3a52;
    margin-bottom: 0.5rem;
    font-family: 'Inria Serif', serif;
}

.foreword__author-title {
    font-size: 1.4rem;
    font-style: italic;
    color: #555;
    font-family: 'Inria Serif', serif;
}

.foreword__right {
    flex: 1;
}

.foreword__text-box {
    padding: 2rem;
    background-color: #f5f1e8;
    width: 100%;
    margin: 0 auto;
    outline: 1px solid rgba(37, 52, 79, 0.8);
    outline-offset: -3px;
    background-image: 
        /* top line */
        repeating-linear-gradient(90deg, #25344FCC 0, #25344FCC 8px, transparent 8px, transparent 20px),
        /* right line */
        repeating-linear-gradient(0deg, #25344FCC 0, #25344FCC 8px, transparent 8px, transparent 20px),
        /* bottom line */
        repeating-linear-gradient(90deg, #25344FCC 0, #25344FCC 8px, transparent 8px, transparent 20px),
        /* left line */
        repeating-linear-gradient(0deg, #25344FCC 0, #25344FCC 8px, transparent 8px, transparent 20px);
    background-position: 0 0, 100% 0, 0 100%, 0 0;
    background-size: 100% 3px, 3px 100%, 100% 3px, 3px 100%;
    background-repeat: repeat-x, repeat-y, repeat-x, repeat-y;
    background-attachment: local;
}

.foreword__paragraph {
    font-size: 1rem;
    line-height: 1.8;
    color: #2c2c2c;
    margin-bottom: 1.2rem;
    font-family: 'Georgia', serif;
    text-align: justify;
}

.foreword__paragraph:last-child {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .foreword {
        padding: 2.5rem 0.5rem;
    }

    .foreword__container {
        margin: 0;
        padding: 0 0.5rem;
    }

    .foreword__header {
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .foreword__title {
        font-size: 2.5rem;
    }

    .foreword__line-top,
    .foreword__line-bottom {
        display: none;
    }

    .foreword__content {
        flex-direction: column;
        gap: 2rem;
    }

    .foreword__left {
        min-width: auto;
        width: 100%;
    }

    .foreword__text-box {
        padding: 1.5rem;
    }

    .foreword__paragraph {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .foreword {
        padding: 1.5rem 1rem;
    }

    .foreword__title {
        font-size: 2.5rem;
    }

    .foreword__text-box {
        padding: 1rem;
    }

    .foreword__paragraph {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .foreword__author-name {
        font-size: 1rem;
    }

    .foreword__author-title {
        font-size: 0.9rem;
    }
}