/* ACF Front Display - Frontend Styles */

/* Container */
.afd-fields-container {
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.afd-group-title {
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2271b1;
    font-size: 24px;
    font-weight: 600;
    color: #1e1e1e;
}

/* List Style */
.afd-style-list .afd-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.afd-style-list .afd-field-item {
    padding: 15px;
    background: #f9f9f9;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.afd-style-list .afd-field-item:hover {
    background: #f0f0f1;
    border-left-color: #135e96;
}

.afd-style-list .afd-field-label {
    font-weight: 600;
    font-size: 14px;
    color: #2271b1;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.afd-style-list .afd-field-value {
    font-size: 15px;
    line-height: 1.6;
    color: #1e1e1e;
}

/* Grid Style */
.afd-style-grid .afd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.afd-style-grid .afd-grid-item {
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.afd-style-grid .afd-grid-item:hover {
    background: #fff;
    border-color: #2271b1;
    box-shadow: 0 4px 8px rgba(34, 113, 177, 0.1);
    transform: translateY(-2px);
}

.afd-style-grid .afd-field-label {
    font-weight: 600;
    font-size: 13px;
    color: #2271b1;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.afd-style-grid .afd-field-value {
    font-size: 15px;
    line-height: 1.5;
    color: #1e1e1e;
}

/* Table Style */
.afd-style-table .afd-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.afd-style-table .afd-table thead th {
    background: #2271b1;
    color: #fff;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.afd-style-table .afd-table tbody td {
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 15px;
    color: #1e1e1e;
}

.afd-style-table .afd-table tbody tr:hover {
    background: #f9f9f9;
}

.afd-style-table .afd-table tbody tr:last-child td {
    border-bottom: none;
}

/* Card Style */
.afd-style-card .afd-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.afd-style-card .afd-card-item {
    padding: 25px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-align: center;
    color: #fff;
    transition: all 0.3s ease;
}

.afd-style-card .afd-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.afd-style-card .afd-card-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.afd-style-card .afd-field-label {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.afd-style-card .afd-field-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

/* Field Icons */
.afd-field-icon {
    display: inline-block;
    font-size: 18px;
}

.afd-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Empty Value */
.afd-empty-value {
    color: #999;
    font-style: italic;
}

/* Image Fields */
.afd-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.afd-image:hover {
    transform: scale(1.02);
}

/* Links */
.afd-url-link,
.afd-file-link,
.afd-email-link {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.afd-url-link:hover,
.afd-file-link:hover,
.afd-email-link:hover {
    color: #135e96;
    text-decoration: underline;
}

/* WYSIWYG Content */
.afd-wysiwyg {
    line-height: 1.8;
}

.afd-wysiwyg p {
    margin-bottom: 15px;
}

.afd-wysiwyg ul,
.afd-wysiwyg ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.afd-wysiwyg img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Textarea */
.afd-textarea {
    white-space: pre-wrap;
    line-height: 1.6;
}

/* Color Picker */
.afd-color {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Repeater */
.afd-repeater {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.afd-repeater-row {
    padding: 12px;
    background: #f9f9f9;
    border-radius: 4px;
    border-left: 3px solid #2271b1;
}

.afd-repeater-item {
    display: inline-block;
    margin-right: 15px;
    font-size: 14px;
}

.afd-repeater-item strong {
    color: #2271b1;
}

/* Map Address */
.afd-map-address {
    padding: 10px 15px;
    background: #f9f9f9;
    border-left: 3px solid #2271b1;
    border-radius: 4px;
    font-style: italic;
}

/* Error Message */
.afd-error {
    padding: 15px;
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    color: #d63638;
    border-radius: 4px;
    font-weight: 500;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .afd-fields-container {
        padding: 15px;
        margin: 20px 0;
    }
    
    .afd-group-title {
        font-size: 20px;
    }
    
    .afd-style-grid .afd-grid {
        grid-template-columns: 1fr;
    }
    
    .afd-style-card .afd-cards {
        grid-template-columns: 1fr;
    }
    
    .afd-style-table .afd-table {
        font-size: 14px;
    }
    
    .afd-style-table .afd-table thead th,
    .afd-style-table .afd-table tbody td {
        padding: 10px;
    }
}

@media screen and (max-width: 480px) {
    .afd-style-list .afd-field-item {
        padding: 12px;
    }
    
    .afd-style-grid .afd-grid-item {
        padding: 15px;
    }
    
    .afd-style-card .afd-card-item {
        padding: 20px 15px;
    }
}

/* Timeline Style */
.afd-style-timeline .afd-timeline {
    position: relative;
    padding: 20px 0;
}

.afd-style-timeline .afd-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #2271b1;
    transform: translateX(-50%);
}

.afd-style-timeline .afd-timeline-item {
    display: flex;
    margin-bottom: 30px;
    position: relative;
}

.afd-style-timeline .afd-timeline-left {
    flex-direction: row-reverse;
}

.afd-style-timeline .afd-timeline-right {
    flex-direction: row;
}

.afd-style-timeline .afd-timeline-left .afd-timeline-content {
    text-align: right;
    margin-right: 40px;
}

.afd-style-timeline .afd-timeline-right .afd-timeline-content {
    text-align: left;
    margin-left: 40px;
}

.afd-style-timeline .afd-timeline-marker {
    width: 40px;
    height: 40px;
    background: #2271b1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    z-index: 2;
    flex-shrink: 0;
}

.afd-style-timeline .afd-timeline-dot {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    display: block;
}

.afd-style-timeline .afd-timeline-content {
    flex: 1;
    max-width: 45%;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Accordion Style */
.afd-style-accordion .afd-accordion {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.afd-style-accordion .afd-accordion-item {
    border-bottom: 1px solid #e5e5e5;
}

.afd-style-accordion .afd-accordion-item:last-child {
    border-bottom: none;
}

.afd-style-accordion .afd-accordion-header {
    width: 100%;
    padding: 15px 20px;
    background: #f9f9f9;
    border: none;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s;
}

.afd-style-accordion .afd-accordion-header:hover {
    background: #f0f0f1;
}

.afd-style-accordion .afd-accordion-header.active {
    background: #2271b1;
    color: #fff;
}

.afd-style-accordion .afd-accordion-icon {
    transition: transform 0.3s;
}

.afd-style-accordion .afd-accordion-header.active .afd-accordion-icon {
    transform: rotate(180deg);
}

.afd-style-accordion .afd-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 20px;
}

.afd-style-accordion .afd-accordion-content.active {
    max-height: 500px;
    padding: 20px;
}

/* Tabs Style */
.afd-style-tabs .afd-tabs-nav {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid #e5e5e5;
    margin-bottom: 20px;
}

.afd-style-tabs .afd-tab-button {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #646970;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.afd-style-tabs .afd-tab-button:hover {
    color: #2271b1;
}

.afd-style-tabs .afd-tab-button.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
    background: #f0f6fc;
}

.afd-style-tabs .afd-tab-panel {
    display: none;
    animation: afd-fade-in 0.3s;
}

.afd-style-tabs .afd-tab-panel.active {
    display: block;
}

/* Masonry Style */
.afd-style-masonry .afd-masonry {
    column-count: 3;
    column-gap: 20px;
}

.afd-style-masonry .afd-masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    background: #fff;
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.afd-style-masonry .afd-masonry-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.afd-style-masonry .afd-masonry-icon {
    font-size: 32px;
    margin-bottom: 15px;
    color: #2271b1;
}

/* Slider Style */
.afd-style-slider .afd-slider {
    position: relative;
    overflow: hidden;
    padding: 0 60px;
}

.afd-style-slider .afd-slider-track {
    display: flex;
    transition: transform 0.5s ease;
}

.afd-style-slider .afd-slider-slide {
    min-width: 100%;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
}

.afd-style-slider .afd-slide-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: #2271b1;
}

.afd-style-slider .afd-slider-prev,
.afd-style-slider .afd-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s;
}

.afd-style-slider .afd-slider-prev:hover,
.afd-style-slider .afd-slider-next:hover {
    background: #135e96;
}

.afd-style-slider .afd-slider-prev {
    left: 10px;
}

.afd-style-slider .afd-slider-next {
    right: 10px;
}

/* Comparison Style */
.afd-style-comparison .afd-comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.afd-style-comparison .afd-comparison-table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
}

.afd-style-comparison .afd-comparison-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.afd-style-comparison .afd-comparison-label {
    padding: 15px 20px;
    font-weight: 600;
    width: 40%;
}

.afd-style-comparison .afd-comparison-value {
    padding: 15px 20px;
}

/* Pricing Style */
.afd-style-pricing .afd-pricing {
    background: #fff;
    border: 2px solid #2271b1;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(34, 113, 177, 0.1);
}

.afd-style-pricing .afd-pricing-feature {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e5e5e5;
}

.afd-style-pricing .afd-pricing-feature:last-child {
    border-bottom: none;
}

.afd-style-pricing .afd-pricing-icon {
    width: 24px;
    height: 24px;
    background: #00a32a;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.afd-style-pricing .afd-pricing-content {
    flex: 1;
}

.afd-style-pricing .afd-pricing-content strong {
    display: block;
    margin-bottom: 5px;
    color: #2271b1;
}

/* Statistics Style */
.afd-style-stats .afd-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.afd-style-stats .afd-stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    color: #fff;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    transition: all 0.3s;
}

.afd-style-stats .afd-stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.afd-style-stats .afd-stat-icon {
    font-size: 40px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.afd-style-stats .afd-stat-value {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    animation: afd-count-up 1s ease-out;
}

.afd-style-stats .afd-stat-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes afd-count-up {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive adjustments for new styles */
@media screen and (max-width: 768px) {
    .afd-style-timeline .afd-timeline::before {
        left: 20px;
    }
    
    .afd-style-timeline .afd-timeline-item {
        flex-direction: row !important;
    }
    
    .afd-style-timeline .afd-timeline-content {
        max-width: none !important;
        text-align: left !important;
        margin-left: 40px !important;
        margin-right: 0 !important;
    }
    
    .afd-style-masonry .afd-masonry {
        column-count: 1;
    }
    
    .afd-style-tabs .afd-tabs-nav {
        flex-wrap: wrap;
    }
    
    .afd-style-stats .afd-stats {
        grid-template-columns: 1fr;
    }
}

    .afd-fields-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .afd-style-card .afd-card-item {
        background: #fff;
        color: #000;
        border: 1px solid #000;
    }
    
    .afd-url-link,
    .afd-file-link,
    .afd-email-link {
        text-decoration: underline;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .afd-fields-container {
        background: #1e1e1e;
        border-color: #3e3e3e;
        color: #e5e5e5;
    }
    
    .afd-group-title {
        color: #e5e5e5;
    }
    
    .afd-style-list .afd-field-item {
        background: #2a2a2a;
        color: #e5e5e5;
    }
    
    .afd-style-list .afd-field-item:hover {
        background: #333;
    }
    
    .afd-style-grid .afd-grid-item {
        background: #2a2a2a;
        border-color: #3e3e3e;
        color: #e5e5e5;
    }
    
    .afd-style-grid .afd-grid-item:hover {
        background: #333;
    }
    
    .afd-style-list .afd-field-value,
    .afd-style-grid .afd-field-value {
        color: #e5e5e5;
    }
    
    .afd-style-table .afd-table tbody td {
        color: #e5e5e5;
        border-bottom-color: #3e3e3e;
    }
    
    .afd-style-table .afd-table tbody tr:hover {
        background: #2a2a2a;
    }
}
