/**
 * HW Builder Grid - Contact Page Styles
 *
 * Matches the Valencia contact page layout.
 * Uses --dbg-primary and --dbg-accent CSS variables from plugin settings.
 *
 * @package HW_Builder_Grid
 */

/* ==========================================================================
   Contact Section Container
   ========================================================================== */

.dbg-contacts-section {
    width: 1500px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Break out of WordPress theme content container */
.entry-content .dbg-contacts-section,
.wp-block-post-content .dbg-contacts-section,
.site-content .dbg-contacts-section,
.content-area .dbg-contacts-section,
article .dbg-contacts-section {
    width: 1500px;
    max-width: 100%;
}

/* ==========================================================================
   Section Dividers & Headings
   ========================================================================== */

.dbg-contacts-divider {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 50px 0 30px;
    padding: 0 20px;
}

.dbg-contacts-divider:first-child {
    margin-top: 20px;
}

.dbg-contacts-hrule {
    flex: 1;
    height: 1px;
    background-color: var(--dbg-border, #d4d4d4);
}

.dbg-contacts-section-title {
    font-family: ivyora-display, serif !important;
    font-size: 28px !important;
    font-weight: 400 !important;
    font-style: normal;
    color: var(--dbg-primary, #3D6B4D) !important;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    text-align: center;
    letter-spacing: 0.5px !important;
}

/* ==========================================================================
   Builder Block
   ========================================================================== */

.dbg-contacts-builder-block {
    text-align: center;
    margin-bottom: 50px;
    padding: 0 20px;
}

.dbg-contacts-builder-logo {
    display: block;
    margin: 0 auto 20px;
    max-width: 200px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.dbg-contacts-builder-name {
    font-family: ivyora-display, serif !important;
    font-size: 22px !important;
    font-weight: 600 !important;
    color: var(--dbg-primary, #3D6B4D) !important;
    text-transform: uppercase;
    letter-spacing: 2px !important;
    margin: 0 0 20px;
    text-align: center;
}

.dbg-contacts-builder-homesite {
    font-size: 17px !important;
    font-weight: 500 !important;
    color: var(--dbg-primary, #3D6B4D);
    margin: -10px 0 25px;
    text-align: center;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Contact Cards Grid
   ========================================================================== */

.dbg-contacts-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 30px;
    max-width: calc((var(--dbg-contact-card-width, 350px) + 30px) * var(--dbg-contact-columns, 4));
    margin-left: auto;
    margin-right: auto;
}

.dbg-contact-card {
    flex: 0 0 var(--dbg-contact-card-width, 350px);
    text-align: center;
    padding: 10px 5px;
}

/* ==========================================================================
   Contact Card Content
   ========================================================================== */

.dbg-contact-homesite {
    font-family: 'Montserrat', 'Open Sans', sans-serif;
    font-size: 17px;
    font-weight: 500;
    color: var(--dbg-primary, #3D6B4D);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.dbg-contact-name {
    font-family: 'Montserrat', 'Open Sans', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--dbg-primary, #3D6B4D);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 3px;
    line-height: 1.3;
}

.dbg-contact-title {
    font-family: 'Montserrat', 'Open Sans', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--dbg-primary, #3D6B4D);
    margin: 0 0 10px;
    line-height: 1.3;
}

.dbg-contact-phone {
    display: block;
    font-family: 'Montserrat', 'Open Sans', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--dbg-primary, #3D6B4D);
    text-decoration: none;
    margin-bottom: 4px;
    transition: opacity 0.2s ease;
}

.dbg-contact-phone:hover {
    opacity: 0.7;
    text-decoration: none;
}

.dbg-contact-email {
    display: block;
    font-family: 'Montserrat', 'Open Sans', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--dbg-accent, #E8924B);
    text-decoration: none;
    word-break: break-word;
    transition: opacity 0.2s ease;
}

.dbg-contact-email:hover {
    opacity: 0.7;
    text-decoration: none;
}

/* ==========================================================================
   No Contacts Message
   ========================================================================== */

.dbg-no-contacts {
    text-align: center;
    font-size: 16px;
    color: var(--dbg-text-light, #666);
    padding: 40px 20px;
}

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

@media screen and (max-width: 768px) {
    .dbg-contacts-section {
        padding: 0 15px;
    }
    
    .dbg-contacts-divider {
        gap: 12px;
        margin: 35px 0 20px;
        padding: 0;
    }
    
    .dbg-contacts-section-title {
        font-size: 22px;
    }
    
    .dbg-contacts-builder-block {
        padding: 0;
        margin-bottom: 35px;
    }
    
    .dbg-contacts-cards {
        gap: 8px 15px;
        max-width: 100%;
    }
    
    .dbg-contact-card {
        flex: 0 0 150px;
    }
}

@media screen and (max-width: 480px) {
    .dbg-contacts-section-title {
        font-size: 18px;
    }
    
    .dbg-contacts-cards {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .dbg-contact-card {
        flex: 0 0 auto;
        width: 100%;
        max-width: 280px;
    }
    
    .dbg-contacts-builder-logo {
        max-width: 160px;
    }
}
