/* ========================================
   ARTICLE.CSS
   Styles for individual article page
======================================== */

/* ----------------------------------------
   ARTICLE TITLE SECTION
---------------------------------------- */
.article-title-section {
    max-width: 800px;
    margin: 40px auto 30px auto;
    text-align: center;
    padding: 0 20px;
}

.article-title-section h2 {
    color: #4a2c17;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
}

.article-title-section p {
    color: #5d3e2a;
    font-size: 1.2rem;
    line-height: 1.6;
    font-style: italic;
}

/* ----------------------------------------
   ARTICLE CONTENT
---------------------------------------- */
.article-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.article-image {
    margin-top: 40px;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.featured-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ----------------------------------------
   ARTICLE HEADER
---------------------------------------- */
.article-header {
    max-width: 800px;
    margin: 0 auto 40px auto;
    text-align: center;
    padding: 0 20px;
}

.article-author {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #8B4513;
    font-size: 1rem;
}

.article-author strong {
    color: #4a2c17;
}

.article-date {
    color: #8B4513;
    font-weight: 600;
    font-size: 0.95rem;
}

/* ----------------------------------------
   ARTICLE BODY
---------------------------------------- */
.article-body {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(139, 69, 19, 0.1);
    margin-bottom: 40px;
}
.block-text {
    margin-bottom: 25px;
}

.block-text p {
    color: #5d3e2a;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
    margin: 0;
}

.block-title {
    margin: 40px 0 20px 0;
}

.block-title h3 {
    color: #4a2c17;
    font-size: 1.6rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
    margin: 0;
}

.block-title h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    border-radius: 2px;
}

.block-title h4 {
    color: #4a2c17;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.block-title h5 {
    color: #4a2c17;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.block-image {
    margin: 30px 0;
    text-align: center;
}

.block-img {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.image-caption {
    color: #8B4513;
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 10px;
    margin-bottom: 0;
}

/* ----------------------------------------
   ARTICLE NAVIGATION
---------------------------------------- */
.article-navigation {
    border-top: 2px solid rgba(139, 69, 19, 0.1);
    padding-top: 30px;
    padding-bottom: 60px;
    margin-top: 20px;
}

.back-to-articles {
    display: inline-block;
    color: #8B4513;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 10px 0;
}

.back-to-articles:hover {
    color: #4a2c17;
    text-decoration: underline;
}

.article-nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
}

.nav-prev,
.nav-next {
    color: #8B4513;
    text-decoration: none;
    font-weight: 600;
    padding: 12px 20px;
    border: 2px solid rgba(139, 69, 19, 0.2);
    border-radius: 8px;
    background: white;
    flex: 1;
    text-align: center;
    max-width: 200px;
}

.nav-prev:hover,
.nav-next:hover {
    background: rgba(245, 245, 220, 0.5);
    border-color: rgba(139, 69, 19, 0.4);
    color: #4a2c17;
}


/* ----------------------------------------
   FIX TO BREAK LONG URLS AND STRINGS
---------------------------------------- */

.article-body a,
.block-text a,
.block-text p,
.article-body p {
    word-break: break-word;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.article-body,
.block-text,
.article-content {
    word-break: break-word;
    overflow-wrap: break-word;
}

.article-body a[href*="http"] {
    word-break: break-all !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    display: inline-block;
    max-width: 100%;
    line-height: 1.4;
}

/* ----------------------------------------
  RESPONSIVE DESIGN
---------------------------------------- */

/* Large tablets and medium screens */
@media (max-width: 1024px) {
   .article-title-section {
       margin: 35px auto 25px auto;
       padding: 0 30px;
   }
   
   .article-title-section h2 {
       font-size: 2.3rem;
       margin-bottom: 12px;
   }
   
   .article-title-section p {
       font-size: 1.15rem;
       line-height: 1.5;
   }
   
   .article-content {
       padding: 0 30px;
   }
   
   .article-image {
       margin-top: 35px;
       margin-bottom: 25px;
       border-radius: 10px;
   }
   
   .article-header {
       margin-bottom: 35px;
       padding: 0 30px;
   }
   
   .article-author {
       font-size: 0.95rem;
       gap: 6px;
   }
   
   .article-date {
       font-size: 0.9rem;
   }
   
   .article-body {
       padding: 35px;
       margin-bottom: 35px;
       border-radius: 10px;
   }
   
   .block-text p {
       font-size: 1.05rem;
       line-height: 1.7;
       margin-bottom: 20px;
   }
   
   .block-title {
       margin: 35px 0 18px 0;
   }
   
   .block-title h3 {
       font-size: 1.5rem;
       padding-bottom: 8px;
   }
   
   .block-title h3::after {
       width: 50px;
       height: 2px;
   }
   
   .block-title h4 {
       font-size: 1.25rem;
   }
   
   .block-title h5 {
       font-size: 1.05rem;
   }
   
   .block-image {
       margin: 25px 0;
   }
   
   .block-img {
       max-width: 550px;
       border-radius: 6px;
   }
   
   .image-caption {
       font-size: 0.85rem;
       margin-top: 8px;
   }
   
   .article-navigation {
       padding-top: 25px;
       padding-bottom: 50px;
       margin-top: 18px;
   }
   
   .back-to-articles {
       font-size: 0.95rem;
       padding: 8px 0;
   }
   
   .article-nav-links {
       gap: 18px;
       margin-top: 18px;
   }
   
   .nav-prev,
   .nav-next {
       padding: 10px 18px;
       max-width: 180px;
       font-size: 0.95rem;
   }
}

/* Tablets */
@media (max-width: 768px) {
   .article-title-section {
       margin: 30px auto 20px auto;
       padding: 0 20px;
   }
   
   .article-title-section h2 {
       font-size: 2rem;
       line-height: 1.1;
       margin-bottom: 10px;
   }

   .article-title-section p {
       font-size: 1.1rem;
       line-height: 1.4;
   }

   .article-header {
       margin-bottom: 30px;
       padding: 0 20px;
   }
   
   .article-author {
       font-size: 0.9rem;
       gap: 5px;
   }
   
   .article-date {
       font-size: 0.85rem;
   }

   .article-content {
       padding: 0 20px;
   }
   
   .article-image {
       margin-top: 30px;
       margin-bottom: 20px;
       border-radius: 8px;
   }

   .article-body {
       padding: 25px 20px;
       margin-bottom: 30px;
       border-radius: 8px;
   }
   
   .block-text {
       margin-bottom: 20px;
   }
   
   .block-text p {
       font-size: 1rem;
       line-height: 1.6;
       text-align: left;
   }
   
   .block-title {
       margin: 30px 0 15px 0;
   }

   .block-title h3 {
       font-size: 1.4rem;
       padding-bottom: 6px;
   }
   
   .block-title h3::after {
       width: 40px;
   }

   .block-title h4 {
       font-size: 1.2rem;
   }
   
   .block-title h5 {
       font-size: 1rem;
   }
   
   .block-image {
       margin: 20px 0;
   }
   
   .block-img {
       max-width: 100%;
       border-radius: 4px;
   }
   
   .image-caption {
       font-size: 0.8rem;
       margin-top: 6px;
   }

   .featured-image {
       height: 250px;
       object-fit: cover;
   }
   
   .article-navigation {
       padding-top: 20px;
       padding-bottom: 40px;
       margin-top: 15px;
   }
   
   .back-to-articles {
       font-size: 0.9rem;
       padding: 6px 0;
   }

   .article-nav-links {
       flex-direction: column;
       gap: 15px;
       margin-top: 15px;
   }

   .nav-prev,
   .nav-next {
       max-width: none;
       padding: 10px 16px;
       font-size: 0.9rem;
   }

    .article-body a,
    .block-text a {
        word-break: break-all !important;
        line-height: 1.3;
        display: inline;
        max-width: 100%;
    }
    
    .article-body p,
    .block-text p {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* Small tablets and large phones */
@media (max-width: 600px) {
   .article-title-section {
       margin: 25px auto 18px auto;
       padding: 0 16px;
   }
   
   .article-title-section h2 {
       font-size: 1.8rem;
       margin-bottom: 8px;
   }
   
   .article-title-section p {
       font-size: 1.05rem;
       line-height: 1.3;
   }
   
   .article-header {
       margin-bottom: 25px;
       padding: 0 16px;
   }
   
   .article-author {
       font-size: 0.85rem;
       gap: 4px;
   }
   
   .article-date {
       font-size: 0.8rem;
   }
   
   .article-content {
       padding: 0 16px;
   }
   
   .article-image {
       margin-top: 25px;
       margin-bottom: 18px;
       border-radius: 6px;
   }
   
   .article-body {
       padding: 20px 16px;
       margin-bottom: 25px;
       border-radius: 6px;
   }
   
   .block-text {
       margin-bottom: 18px;
   }
   
   .block-text p {
       font-size: 0.95rem;
       line-height: 1.5;
   }
   
   .block-title {
       margin: 25px 0 12px 0;
   }
   
   .block-title h3 {
       font-size: 1.3rem;
       padding-bottom: 5px;
   }
   
   .block-title h3::after {
       width: 35px;
   }
   
   .block-title h4 {
       font-size: 1.15rem;
   }
   
   .block-title h5 {
       font-size: 0.95rem;
   }
   
   .block-image {
       margin: 18px 0;
   }
   
   .image-caption {
       font-size: 0.75rem;
       margin-top: 5px;
   }
   
   .featured-image {
       height: 200px;
   }
   
   .article-navigation {
       padding-top: 18px;
       padding-bottom: 35px;
       margin-top: 12px;
   }
   
   .back-to-articles {
       font-size: 0.85rem;
       padding: 5px 0;
   }
   
   .article-nav-links {
       gap: 12px;
       margin-top: 12px;
   }
   
   .nav-prev,
   .nav-next {
       padding: 8px 14px;
       font-size: 0.85rem;
       border-radius: 6px;
   }
}

/* Mobile phones */
@media (max-width: 480px) {
   .article-title-section {
       margin: 20px auto 15px auto;
       padding: 0 12px;
   }
   
   .article-title-section h2 {
       font-size: 1.6rem;
       line-height: 1.0;
       margin-bottom: 6px;
   }
   
   .article-title-section p {
       font-size: 1rem;
       line-height: 1.2;
   }
   
   .article-header {
       margin-bottom: 20px;
       padding: 0 12px;
   }
   
   .article-author {
       font-size: 0.8rem;
       gap: 3px;
       flex-direction: row;
       flex-wrap: wrap;
       justify-content: center;
   }
   
   .article-date {
       font-size: 0.75rem;
   }
   
   .article-content {
       padding: 0 12px;
   }
   
   .article-image {
       margin-top: 20px;
       margin-bottom: 15px;
       border-radius: 4px;
   }
   
   .article-body {
       padding: 16px 12px;
       margin-bottom: 20px;
       border-radius: 4px;
   }
   
   .block-text {
       margin-bottom: 15px;
   }
   
   .block-text p {
       font-size: 0.9rem;
       line-height: 1.4;
   }
   
   .block-title {
       margin: 20px 0 10px 0;
   }
   
   .block-title h3 {
       font-size: 1.2rem;
       padding-bottom: 4px;
   }
   
   .block-title h3::after {
       width: 30px;
       height: 2px;
   }
   
   .block-title h4 {
       font-size: 1.1rem;
   }
   
   .block-title h5 {
       font-size: 0.9rem;
   }
   
   .block-image {
       margin: 15px 0;
   }
   
   .image-caption {
       font-size: 0.7rem;
       margin-top: 4px;
       line-height: 1.2;
   }
   
   .featured-image {
       height: 180px;
   }
   
   .article-navigation {
       padding-top: 15px;
       padding-bottom: 30px;
       margin-top: 10px;
   }
   
   .back-to-articles {
       font-size: 0.8rem;
       padding: 4px 0;
   }
   
   .article-nav-links {
       gap: 10px;
       margin-top: 10px;
   }
   
   .nav-prev,
   .nav-next {
       padding: 6px 12px;
       font-size: 0.8rem;
       border-radius: 4px;
   }

    .article-body a[href*="http"] {
        font-size: 0.85rem;
        line-height: 1.2;
    }
}

/* Very small screens */
@media (max-width: 320px) {
   .article-title-section {
       margin: 15px auto 12px auto;
       padding: 0 8px;
   }
   
   .article-title-section h2 {
       font-size: 1.4rem;
       margin-bottom: 4px;
   }
   
   .article-title-section p {
       font-size: 0.95rem;
   }
   
   .article-header {
       margin-bottom: 15px;
       padding: 0 8px;
   }
   
   .article-content {
       padding: 0 8px;
   }
   
   .article-body {
       padding: 12px 8px;
       margin-bottom: 15px;
   }
   
   .block-text p {
       font-size: 0.85rem;
       line-height: 1.3;
   }
   
   .block-title h3 {
       font-size: 1.1rem;
   }
   
   .block-title h4 {
       font-size: 1.05rem;
   }
   
   .block-title h5 {
       font-size: 0.85rem;
   }
   
   .featured-image {
       height: 150px;
   }
   
   .article-navigation {
       padding-top: 12px;
       padding-bottom: 25px;
   }
   
   .back-to-articles {
       font-size: 0.75rem;
   }
   
   .nav-prev,
   .nav-next {
       padding: 5px 10px;
       font-size: 0.75rem;
   }
}