/**
 * Contacto Widget Styles
 * 
 * Layout structure:
 * - Header centered (tagline, title, description)
 * - Content grid: Form left (60%) | Contact items right (40%)
 * - Contact items in auto-grid layout (side by side, wrapping)
 */

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.contacto {
    width: 100%;
}

/* Header centered */
.contacto__header,
.wb-mega-menu__widget-description {
    margin-bottom: 3rem;
}

.contacto__tagline {
    margin-bottom: 0.5rem;
}

.contacto__title {
    margin-bottom: 1rem;
}

.contacto__description {
    margin-bottom: 0;
}

/* Main content grid: Form | Contact Items */
.contacto__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* ============================================
   FORM AREA (LEFT SIDE)
   ============================================ */

.contacto__form {
    width: 100%;
    /* margin: -40px 0 0 -40px; */
}

/* Form styling inherits from theme/CF7 */
.contacto__form form {
    width: 100%;
}

/* ============================================
   CONTACT ITEMS (RIGHT SIDE)
   ============================================ */

.hbspt-form form fieldset,
.hbspt-form form fieldset {
    max-width: unset;
}

.hbspt-form form .form-columns-2 {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hbspt-form form .form-columns-2 .field {
    flex-basis: 230px !important;
    width: unset !important;
    flex-grow: 1 !important;
}

.hbspt-form form fieldset .input {
    margin-right: 0 !important;
}

.hbspt-form form fieldset .field input,
.hbspt-form form fieldset .field textarea {
    outline: none;
    margin-right: 0 !important;
}

.contacto__items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
}

/* Individual contact item */
.contacto__item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Icon wrapper */
.contacto__item-icon {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: fit-content;
    margin-bottom: 0.5rem;
}

.contacto__item-icon i,
.contacto__item-icon svg,
.contacto__item-icon .material-symbols-outlined {
    display: block;
}

/* Item content */
.contacto__item-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Text */
.contacto__item-text {
    line-height: 1.5;
}

/* Phone link styling */
.contacto__item-phone a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.contacto__item-phone a:hover {
    opacity: 0.7;
}

/* Email link styling */
.contacto__item-email a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
    word-break: break-word;
}

.contacto__item-email a:hover {
    opacity: 0.7;
}

/* Buttons wrapper */
.contacto__item-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */

@media (max-width: 991px) {
    .contacto__content {
        gap: 2.5rem;
    }
    
    .contacto__items {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 767px) {
    .contacto__header,
    .wb-mega-menu__widget-description {
        margin-bottom: 2rem;
    }
    
    /* Stack form and contact items vertically */
    .contacto__content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contacto__items {
        gap: 1.5rem;
    }
    
    .contacto__item {
        gap: 0.5rem;
    }
    
    .contacto__item-buttons {
        gap: 0.5rem;
    }

    .contacto__form {
        margin: 0 0;
    }
    
}

/* ============================================
   ELEMENTOR EDITOR SPECIFICS
   ============================================ */

/* Ensure proper spacing in Elementor editor */
.elementor-editor-active .contacto {
    min-height: 200px;
}

/* Empty state messaging */
.elementor-editor-active .contacto:empty::before {
    content: 'Contacto Widget - Agrega contenido en los controles';
    display: block;
    padding: 2rem;
    text-align: center;
    color: #999;
    border: 2px dashed #ddd;
    border-radius: 4px;
}

