/**
 * FM Design Pro - Frontend Render Styles
 * Styles for the rendered page output
 */

/* ========== RESET ========== */
.fmdp-content-wrapper,
.fmdp-content-wrapper *,
.fmdp-header,
.fmdp-header *,
.fmdp-footer,
.fmdp-footer * {
    box-sizing: border-box;
}

.fmdp-content-wrapper {
    width: 100%;
}

/* ========== SECTION ========== */
.fmdp-section {
    position: relative;
    width: 100%;
}

.fmdp-section > .fmdp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.fmdp-section > .fmdp-container > .fmdp-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

/* ========== COLUMN ========== */
.fmdp-column {
    padding: 0 10px;
    min-height: 1px;
}

.fmdp-col-100 { flex: 0 0 100%; max-width: 100%; }
.fmdp-col-50 { flex: 0 0 50%; max-width: 50%; }
.fmdp-col-33 { flex: 0 0 33.333%; max-width: 33.333%; }
.fmdp-col-66 { flex: 0 0 66.666%; max-width: 66.666%; }
.fmdp-col-25 { flex: 0 0 25%; max-width: 25%; }
.fmdp-col-75 { flex: 0 0 75%; max-width: 75%; }
.fmdp-col-20 { flex: 0 0 20%; max-width: 20%; }
.fmdp-col-40 { flex: 0 0 40%; max-width: 40%; }
.fmdp-col-60 { flex: 0 0 60%; max-width: 60%; }

/* ========== HEADING ========== */
.fmdp-heading {
    margin: 0;
    line-height: 1.3;
    word-wrap: break-word;
}

/* ========== TEXT EDITOR ========== */
.fmdp-text-editor {
    line-height: 1.6;
}

.fmdp-text-editor p {
    margin: 0 0 1em;
}

.fmdp-text-editor p:last-child {
    margin-bottom: 0;
}

.fmdp-text-editor h1,
.fmdp-text-editor h2,
.fmdp-text-editor h3,
.fmdp-text-editor h4,
.fmdp-text-editor h5,
.fmdp-text-editor h6 {
    margin: 0 0 0.5em;
}

.fmdp-text-editor ul,
.fmdp-text-editor ol {
    margin: 0 0 1em;
    padding-left: 1.5em;
}

.fmdp-text-editor blockquote {
    margin: 0 0 1em;
    padding: 10px 20px;
    border-left: 3px solid #e0e0e0;
    font-style: italic;
    color: #666;
}

.fmdp-text-editor a {
    color: #4a90e2;
    text-decoration: none;
}

.fmdp-text-editor a:hover {
    text-decoration: underline;
}

.fmdp-text-editor img {
    max-width: 100%;
    height: auto;
}

.fmdp-text-editor table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1em;
}

.fmdp-text-editor th,
.fmdp-text-editor td {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
}

.fmdp-text-editor th {
    background: #f8f9fa;
    font-weight: 600;
}

/* ========== IMAGE ========== */
.fmdp-image-wrapper {
    display: block;
}

.fmdp-image {
    max-width: 100%;
    height: auto;
    display: inline-block;
    vertical-align: middle;
}

.fmdp-image-wrapper a {
    display: inline-block;
}

/* ========== BUTTON ========== */
.fmdp-button-wrapper {
    display: block;
}

.fmdp-button {
    display: inline-block;
    padding: 12px 28px;
    background: #4a90e2;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    line-height: 1.4;
    text-align: center;
}

.fmdp-button:hover {
    background: #357abd;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    color: #fff;
}

.fmdp-button:active {
    transform: translateY(0);
}

/* ========== DIVIDER ========== */
.fmdp-divider {
    border-top: 1px solid #e0e0e0;
    display: block;
}

/* ========== SPACER ========== */
.fmdp-spacer {
    display: block;
}

/* ========== ICON ========== */
.fmdp-icon-wrapper {
    display: block;
}

.fmdp-icon {
    display: inline-block;
    font-size: 48px;
    line-height: 1;
}

/* ========== ICON BOX ========== */
.fmdp-icon-box {
    text-align: center;
    padding: 30px 20px;
}

.fmdp-icon-box-icon {
    font-size: 48px;
    color: #4a90e2;
    margin-bottom: 15px;
}

.fmdp-icon-box-icon i {
    display: inline-block;
    line-height: 1;
}

.fmdp-icon-box-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #333;
}

.fmdp-icon-box-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* ========== IMAGE BOX ========== */
.fmdp-image-box {
    text-align: center;
    padding: 20px;
}

.fmdp-image-box img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    border-radius: 8px;
}

.fmdp-image-box-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px;
}

.fmdp-image-box-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* ========== VIDEO ========== */
.fmdp-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.fmdp-video-iframe,
.fmdp-video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.fmdp-video-player {
    background: #000;
}

/* ========== GOOGLE MAPS ========== */
.fmdp-map-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.fmdp-map-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ========== TESTIMONIAL ========== */
.fmdp-testimonial {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
}

.fmdp-testimonial-content {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 20px;
    font-style: italic;
}

.fmdp-testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.fmdp-testimonial-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.fmdp-testimonial-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fmdp-testimonial-name {
    font-weight: 600;
    color: #333;
}

.fmdp-testimonial-title {
    font-size: 13px;
    color: #888;
}

/* ========== ALERT ========== */
.fmdp-alert {
    padding: 16px 20px;
    border-radius: 8px;
    position: relative;
    margin-bottom: 15px;
}

.fmdp-alert-info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.fmdp-alert-success {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.fmdp-alert-warning {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
}

.fmdp-alert-danger {
    background: #ffebee;
    border-left: 4px solid #f44336;
}

.fmdp-alert-title {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 15px;
}

.fmdp-alert-description {
    font-size: 14px;
    line-height: 1.5;
}

.fmdp-alert-dismiss {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 4px;
}

.fmdp-alert-dismiss:hover {
    color: #333;
}

/* ========== COUNTER ========== */
.fmdp-counter {
    text-align: center;
    padding: 20px;
}

.fmdp-counter-number {
    font-size: 48px;
    font-weight: 700;
    color: #4a90e2;
    line-height: 1;
    margin-bottom: 8px;
}

.fmdp-counter-value {
    display: inline;
}

.fmdp-counter-title {
    font-size: 14px;
    color: #666;
}

/* ========== PROGRESS BAR ========== */
.fmdp-progress-bar {
    padding: 15px;
}

.fmdp-progress-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #444;
}

.fmdp-progress-track {
    background: #e0e0e0;
    border-radius: 100px;
    overflow: hidden;
}

.fmdp-progress-fill {
    background: #4a90e2;
    height: 100%;
    border-radius: 100px;
    transition: width 1s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    min-width: 40px;
}

.fmdp-progress-percentage {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

/* ========== SOCIAL ICONS ========== */
.fmdp-social-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.fmdp-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    color: #555;
    text-decoration: none;
    border-radius: 50%;
    font-size: 16px;
    transition: all 0.2s ease;
}

.fmdp-social-icon:hover {
    background: #4a90e2;
    color: #fff;
    transform: translateY(-2px);
}

.fmdp-social-icons.fmdp-social-rounded .fmdp-social-icon {
    border-radius: 6px;
}

.fmdp-social-icons.fmdp-social-square .fmdp-social-icon {
    border-radius: 0;
}

/* ========== ACCORDION ========== */
.fmdp-accordion-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}

.fmdp-accordion-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.2s;
    -webkit-user-select: none;
    user-select: none;
}

.fmdp-accordion-title:hover {
    background: #f0f0f0;
}

.fmdp-accordion-icon {
    transition: transform 0.2s;
    font-size: 12px;
    color: #888;
}

.fmdp-accordion-item.active .fmdp-accordion-icon {
    transform: rotate(45deg);
}

.fmdp-accordion-content {
    display: none;
    padding: 16px;
    background: #fff;
    font-size: 14px;
    line-height: 1.6;
    border-top: 1px solid #e8e8e8;
}

.fmdp-accordion-item.active .fmdp-accordion-content {
    display: block;
}

.fmdp-accordion-content p {
    margin: 0;
}

/* ========== TABS ========== */
.fmdp-tabs {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.fmdp-tabs-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.fmdp-tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    font-family: inherit;
}

.fmdp-tab-btn:hover {
    color: #4a90e2;
    background: rgba(74, 144, 226, 0.05);
}

.fmdp-tab-btn.active {
    color: #4a90e2;
    border-bottom-color: #4a90e2;
    background: #fff;
}

.fmdp-tabs-content {
    padding: 16px;
    background: #fff;
}

.fmdp-tab-panel {
    display: none;
    animation: fadeIn 0.2s ease;
}

.fmdp-tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fmdp-tab-panel p:first-child {
    margin-top: 0;
}

/* Vertical Tabs */
.fmdp-tabs-vertical {
    display: flex;
}

.fmdp-tabs-vertical .fmdp-tabs-nav {
    flex-direction: column;
    border-bottom: none;
    border-right: 1px solid #e0e0e0;
    min-width: 150px;
}

.fmdp-tabs-vertical .fmdp-tab-btn {
    border-bottom: none;
    border-right: 2px solid transparent;
    text-align: left;
}

.fmdp-tabs-vertical .fmdp-tab-btn.active {
    border-bottom: none;
    border-right-color: #4a90e2;
}

.fmdp-tabs-vertical .fmdp-tabs-content {
    flex: 1;
}

/* ========== HTML ========== */
.fmdp-html {
    line-height: 1.6;
}

.fmdp-html code,
.fmdp-html pre {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.fmdp-html pre {
    padding: 16px;
    overflow-x: auto;
}

/* ========== SHORTCODE ========== */
.fmdp-shortcode {
    padding: 15px;
    background: #f8f9fa;
    border: 1px dashed #ddd;
    border-radius: 6px;
    text-align: center;
    color: #888;
    font-size: 13px;
}

/* ========== SIDEBAR ========== */
.fmdp-sidebar {
    padding: 20px 0;
}

/* ========== RESPONSIVE ========== */
@media screen and (max-width: 768px) {
    .fmdp-col-50,
    .fmdp-col-33,
    .fmdp-col-66,
    .fmdp-col-25,
    .fmdp-col-75,
    .fmdp-col-20,
    .fmdp-col-40,
    .fmdp-col-60 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .fmdp-counter-number {
        font-size: 36px;
    }

    .fmdp-tabs-nav {
        flex-wrap: wrap;
    }

    .fmdp-tab-btn {
        flex: 1 1 auto;
        min-width: 80px;
    }

    .fmdp-section > .fmdp-container {
        padding: 0 15px;
    }
}

/* ========== ANIMATIONS ========== */
.fmdp-content-wrapper .fmdp-counter[data-end] .fmdp-counter-value {
    display: inline-block;
}

/* ========== GLOBAL STYLES ========== */
.fmdp-content-wrapper img,
.fmdp-header img,
.fmdp-footer img {
    max-width: 100%;
    height: auto;
}

/* Header/Footer specific */
.fmdp-header {
    width: 100%;
}

.fmdp-footer {
    width: 100%;
}

/* ========== WORDPRESS COMPATIBILITY ========== */
.fmdp-content-wrapper .alignleft {
    float: left;
    margin: 0 20px 20px 0;
}

.fmdp-content-wrapper .alignright {
    float: right;
    margin: 0 0 20px 20px;
}

.fmdp-content-wrapper .aligncenter {
    display: block;
    margin: 0 auto 20px;
}

.fmdp-content-wrapper .wp-caption {
    max-width: 100%;
    margin-bottom: 20px;
}

.fmdp-content-wrapper .wp-caption-text {
    font-size: 13px;
    color: #666;
    text-align: center;
    margin-top: 8px;
}

.fmdp-content-wrapper .gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.fmdp-content-wrapper .gallery-item {
    flex: 1 1 200px;
}

.fmdp-content-wrapper .gallery-icon img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}
