/* Modern Minimalist Also Read Styles */
:root {
    /* Optimized Transitions and Effects */
    --transition: 0.3s ease-in-out;
    --radius: 8px;
    --shadow: 0 6px 12px rgba(0,0,0,0.05);
}

/* Global Also Read Section Styles */
.also-read-section {
    font-family: inherit !important;
    max-width: 100%;
    margin: 8px 0;
    padding: 6px;
    background-color: rgba(255,255,255,0.95);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all var(--transition);
    letter-spacing: -0.02em;
    border-left: 4px solid transparent;
}

/* Heading Styles - Colors and font-size will be set dynamically via inline styles */
.also-read-text {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
    position: relative;
    cursor: default;
    padding: 6px 12px;
    border-radius: 4px;
    transition: color var(--transition);
    /* Font size is set dynamically via inline styles */
}

/* Header Icon Styles - Scales with header font size */
.ar-header-icon {
    display: inline-block;
    margin-right: 6px;
    font-size: 1.2em;
    line-height: 1;
    vertical-align: middle;
    /* Icon size scales proportionally with header text */
}

/* Full Row Background Support */
.also-read-section.has-full-row-bg {
    padding-top: 12px;
    padding-bottom: 12px;
}

.also-read-text::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition);
    background: currentColor;
    opacity: 0.5;
}

.also-read-text:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* List Styles */
.also-read-section ul,
.also-read-section ol {
    list-style: none;
    padding-left: 1px !important;
    margin: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.also-read-section li {
    position: relative;
    padding: 2px 5px 2px 25px !important;
    margin-bottom: 4px;
    border-radius: 4px;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.also-read-section li:hover {
    transform: translateX(3px);
    background-color: rgba(0, 0, 0, 0.02);
}

/* Bullet Point Styling - Uses heading color dynamically */
.also-read-section li::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0.7;
    transition: all var(--transition);
    flex-shrink: 0;
}

.also-read-section li:hover::before {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
}

/* Link Styles - Colors and font-size will be set dynamically via inline styles */
.ar-headline-link {
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color var(--transition);
    /* Font size is set dynamically via inline styles */
}

/* Text Position Styles */
.also-read-text.top_left {
    text-align: left;
}

.also-read-text.top_right {
    text-align: right;
}

.also-read-text.center {
    text-align: center;
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Thumbnail Styles */
.also-read-thumbnail {
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
}

.also-read-thumbnail img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

/* Content Styles */
.also-read-content {
    display: inline-block;
    vertical-align: middle;
    flex: 1;
}

/* Animation Classes */
.ar-animation-fade {
    animation: arFadeIn 0.6s ease-in-out;
}

.ar-animation-slide {
    animation: arSlideIn 0.6s ease-out;
}

.ar-animation-bounce {
    animation: arBounce 0.8s ease-out;
}

.ar-animation-zoom {
    animation: arZoomIn 0.5s ease-out;
}

.ar-animation-flip {
    animation: arFlip 0.6s ease-out;
}

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

@keyframes arSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes arBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes arZoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes arFlip {
    from {
        opacity: 0;
        transform: rotateY(-90deg);
    }
    to {
        opacity: 1;
        transform: rotateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .also-read-section {
        padding: 8px;
        margin: 6px 0;
    }

    .also-read-section li {
        padding: 4px 10px 4px 20px;
        margin-bottom: 2px;
    }

    .also-read-text {
        letter-spacing: 1.2px;
        padding: 4px 8px;
        /* Font size remains dynamic via inline styles */
    }
    
    .ar-header-icon {
        margin-right: 4px;
        /* Icon scales with header font size */
    }
}
