/**
 * Divi Compatibility Styles
 * This file ensures Divi Builder works properly with Maritime Institute theme
 */

/* Ensure header remains fixed and styled */
.maritime-header {
    position: relative;
    z-index: 99999;
}

/* Main content area adjustments for Divi */
#main-content {
    min-height: 0;
}

/* Override theme's section styles for Divi sections */
.et_pb_section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Ensure Divi rows don't get theme's container restrictions */
.et_pb_row {
    width: 80%;
    max-width: 1200px;
    margin: auto;
}

/* Fix Divi column padding */
.et_pb_column {
    padding: 0;
}

/* Ensure Divi text colors work in dark sections */
.et_pb_section[style*="background-color: #1e3a8a"] .et_pb_text,
.et_pb_section[style*="background-color: #0f172a"] .et_pb_text,
.et_pb_section[style*="background-color: #1e293b"] .et_pb_text,
.et_pb_section[style*="background-color: #2563eb"] .et_pb_text {
    color: inherit;
}

/* Fix Divi button styles to match theme */
.et_pb_button {
    padding: 16px 32px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

/* Fix form field styles */
.et_pb_contact_form input,
.et_pb_contact_form textarea,
.et_pb_contact_form select {
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 12px 16px !important;
    font-family: 'Gomme Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 300 !important;
}

/* Fix blurb module icon sizes */
.et_pb_blurb .et_pb_main_blurb_image .et-pb-icon {
    font-size: 48px !important;
}

/* Ensure proper spacing between sections */
.et_pb_section + .et_pb_section {
    margin-top: 0;
}

/* Fix number counter animations */
.et_pb_number_counter {
    opacity: 1 !important;
}

/* Blog module fixes */
.et_pb_blog_grid .et_pb_post {
    margin-bottom: 30px;
}

.et_pb_blog_grid .et_pb_image_container {
    margin-bottom: 15px;
}

/* Tab module fixes */
.et_pb_tabs .et_pb_tabs_controls {
    background: transparent !important;
    border: none !important;
}

.et_pb_tabs .et_pb_tab {
    padding: 20px !important;
}

/* Toggle module fixes */
.et_pb_toggle {
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 10px !important;
}

/* Testimonial module fixes */
.et_pb_testimonial {
    background: #ffffff !important;
    padding: 40px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
}

/* Social media follow module fixes */
.et_pb_social_media_follow li a {
    border-radius: 50% !important;
}

/* Ensure footer stays below Divi content */
.maritime-footer {
    margin-top: 0;
}