/**
 * News Title Description Section Block Styles
 * 
 * Colors:
 * - Primary Green: #006a3c (background)
 * - White: #ffffff (title text)
 * - Text Secondary: #b0cfc1 (description text)
 * 
 * Fonts:
 * - Roboto Bold
 * - Roboto Regular
 */

/* ============================================
   Block Container
   ============================================ */
.news-title-description-section {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Background wrapper - Full width green background */
.ntd-background-wrapper {
    width: 100%;
    background: #006a3c;
    background-image: url('../images/Lines-for-courses-banner-dt.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 60px 0;
}

/* Content container - Uses WordPress layout width */
.ntd-container {
    max-width: var(--theme-normal-container-max-width, 1290px);
    width: var(--theme-container-width, 100%);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   News Title
   ============================================ */
.ntd-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 48px;
    line-height: 1.2;
    color: #ffffff !important;
    margin: 0 0 20px 0;
    text-align: left;
}

/* ============================================
   News Description
   ============================================ */
.ntd-description {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.6;
    color: #b0cfc1;
    text-align: left;
    max-width: 600px;
    margin: 0;
}

.ntd-description p {
    margin: 0 0 15px 0;
}

.ntd-description p:last-child {
    margin-bottom: 0;
}

/* ============================================
   Title Only (No Description)
   ============================================ */
.ntd-title:last-child {
    margin-bottom: 0;
}

/* ============================================
   Buttons
   ============================================ */
.ntd-buttons-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-top: 30px;
}

.ntd-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Roboto', sans-serif;
    text-decoration: none;
    border-radius: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
}

button.ntd-button {
    background: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.ntd-button-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.ntd-button-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* Button Styles - Default */
.ntd-button-default {
    background-color: var(--orange-accent, #f7b119);
    color: var(--white, #ffffff);
    border-color: var(--orange-accent, #f7b119);
}

.ntd-button-default:hover {
    background-color: var(--green-primary, #006a3c);
    border-color: var(--orange-accent, #f7b119);
    color: var(--white, #ffffff);
}

/* Button Styles - Outlined */
.ntd-button-outlined {
    background-color: transparent;
    color: var(--white, #ffffff);
    border-color: var(--orange-accent, #f7b119);
}

.ntd-button-outlined:hover {
    background-color: var(--orange-accent, #f7b119);
    border-color: var(--orange-accent, #f7b119);
    color: var(--white, #ffffff);
}

/* Button Focus State */
.ntd-button:focus {
    outline: 2px solid var(--white, #ffffff);
    outline-offset: 2px;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Large Desktop */
@media (max-width: 1400px) {
    .ntd-container {
        max-width: 1200px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    .ntd-container {
        max-width: 960px;
    }
}

/* Tablet - Large */
@media (max-width: 992px) {
    .ntd-background-wrapper {
        padding: 60px 0;
    }
    
    .ntd-title {
        font-size: 40px;
        margin-bottom: 18px;
    }
    
    .ntd-description {
        font-size: 17px;
    }
    
    .ntd-buttons-wrapper {
        margin-top: 25px;
    }
    
    .ntd-button {
        font-size: 16px;
        padding: 12px 28px;
    }
}

/* Tablet - Medium */
@media (max-width: 768px) {
    .ntd-background-wrapper {
        padding: 50px 0;
    }
    
    .ntd-title {
        font-size: 36px;
        margin-bottom: 16px;
    }
    
    .ntd-description {
        font-size: 16px;
    }
}

/* Mobile - Large */
@media (max-width: 576px) {
    .ntd-background-wrapper {
        background-image: url('../images/Lines-for-courses-banner-mb.png');
        padding: 40px 0;
    }
    
    .ntd-container {
        padding: 0 15px;
    }
    
    .ntd-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    
    .ntd-description {
        font-size: 16px;
    }
    
    .ntd-description p {
        margin-bottom: 12px;
    }
    
    .ntd-buttons-wrapper {
        margin-top: 20px;
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
    }
    
    .ntd-button {
        font-size: 16px;
        padding: 12px 24px;
        width: auto;
        justify-content: center;
    }
}

/* Mobile - Small */
@media (max-width: 400px) {
    .ntd-title {
        font-size: 28px;
    }
    
    .ntd-description {
        font-size: 15px;
    }
    
    .ntd-button {
        font-size: 14px;
        padding: 10px 20px;
        gap: 8px;
    }
    
    .ntd-button-icon svg {
        width: 14px;
        height: 16px;
    }
}

/* ============================================
   Gutenberg Editor Specific Styles
   ============================================ */
.block-editor-block-list__block[data-type="acf/news-title-description-section"] {
    margin: 20px 0;
}

.block-editor-block-list__block[data-type="acf/news-title-description-section"] .news-title-description-section {
    padding: 40px 0;
}

/* ============================================
   Alignment Support
   ============================================ */
.news-title-description-section.alignwide .ntd-container {
    max-width: var(--theme-normal-container-max-width, 1290px);
    width: var(--theme-container-width, 100%);
}

.news-title-description-section.alignfull {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.news-title-description-section.alignfull .ntd-background-wrapper {
    width: 100%;
}

.news-title-description-section.alignfull .ntd-container {
    max-width: var(--theme-normal-container-max-width, 1290px);
    width: var(--theme-container-width, 100%);
}

@media (max-width: 768px) {
    .news-title-description-section.alignfull .ntd-container {
        padding: 0;
    }
}

@media (max-width: 576px) {
    .news-title-description-section.alignfull .ntd-container {
        padding: 0;
    }
}

/* ============================================
   Accessibility
   ============================================ */

/* Ensure proper contrast for text on green background */
@media (prefers-contrast: high) {
    .ntd-title {
        color: #ffffff;
    }
    
    .ntd-description {
        color: #e0f0e8;
    }
    
    .ntd-background-wrapper {
        background-color: #005030;
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none;
    }
    
    .ntd-button {
        transition: none;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .news-title-description-section {
        page-break-inside: avoid;
    }
    
    .ntd-background-wrapper {
        padding: 40px 0;
        background-color: #ffffff !important;
        border: 2px solid #006a3c;
    }
    
    .ntd-title,
    .ntd-description {
        color: #000000 !important;
    }
    
    .ntd-buttons-wrapper {
        display: none;
    }
}

