/**
 * Title And Description Section Block Styles
 * 
 * Colors:
 * - Primary Green: #006a3c
 * - Gold/Yellow: #f7b119
 * - Light Gray: #f5f6f6
 * - Text Dark: #252525
 * - Text Light: #b0cfc1
 * - White: #ffffff
 * 
 * Fonts:
 * - Roboto Bold
 * - Roboto Regular
 */

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

/* Background wrapper - Full width background */
.td-background-wrapper {
    width: 100%;
    padding: 80px 0;
    transition: background-color 0.3s ease;
}

/* Background Color Variations */
.td-bg-white {
    background-color:  #ffffff;
}

.td-bg-light-gray {
    background-color: #f5f6f6;
}

/* Content container - Uses WordPress layout width */
.td-container {
    max-width: var(--wp--style--global--content-size, 1200px);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Section Title
   ============================================ */
.td-section-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 48px;
    line-height: 1.2;
    color: #252525;
    margin: 0 0 30px 0;
    text-align: center;
}

/* ============================================
   Section Description
   ============================================ */
.td-section-description {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 1.6;
    color: var(--dark-text, #252525);
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.td-section-description p {
    margin: 0 0 20px 0;
}

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

.td-section-description strong {
    font-weight: 700;
}

.td-section-description em {
    font-style: italic;
}

.td-section-description a {
    color: var(--green-primary, #006a3c);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.td-section-description a:hover {
    color: var(--orange-accent, #f7b119);
}

/* Lists in description */
.td-section-description ul,
.td-section-description ol {
    text-align: left;
    max-width: 800px;
    margin: 20px auto;
    padding-left: 40px;
}

.td-section-description li {
    margin-bottom: 10px;
}

/* Headings in description */
.td-section-description h3,
.td-section-description h4,
.td-section-description h5,
.td-section-description h6 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    color: var(--dark-text, #252525);
    margin: 20px 0 15px 0;
}

.td-section-description h3 {
    font-size: 28px;
}

.td-section-description h4 {
    font-size: 24px;
}

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

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

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

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

/* Tablet - Large */
@media (max-width: 992px) {
    .td-background-wrapper {
        padding: 60px 0;
    }
    
    .td-section-title {
        font-size: 40px;
        margin-bottom: 25px;
    }
    
    .td-section-description {
        font-size: 17px;
    }
    
    .td-section-description h3 {
        font-size: 26px;
    }
    
    .td-section-description h4 {
        font-size: 22px;
    }
}

/* Tablet - Medium */
@media (max-width: 768px) {
    .td-background-wrapper {
        padding: 50px 0;
    }
    
    .td-section-title {
        font-size: 36px;
        margin-bottom: 20px;
    }
    
    .td-section-description {
        font-size: 16px;
        max-width: 100%;
    }
    
    .td-section-description ul,
    .td-section-description ol {
        padding-left: 30px;
    }
    
    .td-section-description h3 {
        font-size: 24px;
    }
    
    .td-section-description h4 {
        font-size: 20px;
    }
}

/* Mobile - Large */
@media (max-width: 576px) {
    .td-background-wrapper {
        padding: 40px 0;
    }
    
    .td-container {
        padding: 0 15px;
    }
    
    .td-section-title {
        font-size: 32px;
        margin-bottom: 20px;
    }
    
    .td-section-description {
        font-size: 16px;
        text-align: left;
    }
    
    .td-section-description p {
        margin-bottom: 15px;
    }
    
    .td-section-description ul,
    .td-section-description ol {
        padding-left: 25px;
        margin: 15px auto;
    }
    
    .td-section-description h3 {
        font-size: 22px;
    }
    
    .td-section-description h4 {
        font-size: 18px;
    }
}

/* Mobile - Small */
@media (max-width: 400px) {
    .td-section-title {
        font-size: 28px;
    }
    
    .td-section-description {
        font-size: 15px;
    }
}

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

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

/* ============================================
   Alignment Support
   ============================================ */
.title-description-block.alignwide .td-container {
    max-width: var(--wp--style--global--wide-size, 1400px);
}

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

.title-description-block.alignfull .td-background-wrapper {
    width: 100%;
}

.title-description-block.alignfull .td-container {
    max-width: 100%;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .title-description-block.alignfull .td-container {
        padding: 0 20px;
    }
}

@media (max-width: 576px) {
    .title-description-block.alignfull .td-container {
        padding: 0 15px;
    }
}

/* ============================================
   Accessibility
   ============================================ */
.td-section-description a:focus {
    outline: 2px solid var(--green-primary, #006a3c);
    outline-offset: 2px;
}

/* Ensure proper contrast for all text */
@media (prefers-contrast: high) {
    .td-section-title,
    .td-section-description {
        color: #000000;
    }
    
    .td-bg-light-gray {
        background-color: #f5f6f6;
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .td-background-wrapper,
    .td-section-description a {
        transition: none;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .title-description-block {
        page-break-inside: avoid;
    }
    
    .td-background-wrapper {
        padding: 40px 0;
        background-color: #ffffff !important;
    }
    
    .td-section-title,
    .td-section-description {
        color: #000000 !important;
    }
    
    .td-section-description a {
        color: #000000 !important;
        text-decoration: underline;
    }
}

