/**
 * ESOBOY Theme - Custom CSS
 * 
 * @package ESOBOY
 */

/* ========================================
   Additional Styles
   ======================================== */

/* Social Share */
.social-share {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.social-share-label {
    font-weight: 500;
    color: var(--color-text-light);
}

.social-share-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-light);
    border-radius: var(--radius-md);
    color: var(--color-text-light);
    transition: all var(--transition-base);
}

.social-share-link:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.social-share-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Table of Contents */
.table-of-contents {
    background: var(--color-bg-light);
    padding: 20px 25px;
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
}

.toc-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-primary);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 8px;
}

.toc-item a {
    color: var(--color-text);
    font-size: 14px;
    display: block;
    padding: 5px 0;
    transition: color var(--transition-base);
}

.toc-item a:hover,
.toc-item a.active {
    color: var(--color-primary);
}

.toc-level-3 {
    padding-left: 15px;
}

.toc-level-4 {
    padding-left: 30px;
}

.toc-level-5 {
    padding-left: 45px;
}

.toc-level-6 {
    padding-left: 60px;
}

/* Post Navigation */
.post-navigation {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation .nav-label {
    display: block;
    font-size: 12px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.post-navigation a {
    font-weight: 500;
    color: var(--color-secondary);
}

.post-navigation a:hover {
    color: var(--color-primary);
}

/* Related Posts */
.related-posts {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--color-border);
}

.related-posts-title {
    font-size: 24px;
    margin-bottom: 30px;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, #FF8E53 100%);
    text-align: center;
    color: var(--color-white);
}

.cta-title {
    font-size: 36px;
    margin-bottom: 15px;
    color: var(--color-white);
}

.cta-description {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section .btn-outline {
    border-color: var(--color-white);
    color: var(--color-white);
}

.cta-section .btn-outline:hover {
    background: var(--color-white);
    color: var(--color-primary);
}

/* Feature Link */
.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 15px;
    font-weight: 500;
    color: var(--color-primary);
    transition: gap var(--transition-base);
}

.feature-link:hover {
    gap: 10px;
}

/* Case Results */
.case-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
    padding: 30px;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
}

.case-result-item {
    text-align: center;
}

.case-result-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 5px;
}

.case-result-label {
    font-size: 14px;
    color: var(--color-text-light);
}

/* Testimonial */
.testimonial {
    background: var(--color-bg-light);
    padding: 30px;
    border-radius: var(--radius-lg);
    margin: 30px 0;
    position: relative;
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 60px;
    color: var(--color-primary);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-content {
    font-size: 18px;
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

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

.testimonial-author-name {
    font-weight: 600;
    color: var(--color-secondary);
}

.testimonial-author-position {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* Gallery */
.case-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.case-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform var(--transition-base);
}

.case-gallery img:hover {
    transform: scale(1.02);
}

/* Whitepaper Meta */
.whitepaper-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.whitepaper-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-text-light);
}

.whitepaper-meta-item .dashicons {
    color: var(--color-primary);
}

/* Download Form */
.download-form {
    background: var(--color-bg-light);
    padding: 30px;
    border-radius: var(--radius-lg);
    margin: 30px 0;
}

.download-form-title {
    font-size: 20px;
    margin-bottom: 20px;
}

/* Blog Meta */
.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--color-text-muted);
}

.blog-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-meta-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.post-tag {
    display: inline-block;
    padding: 5px 15px;
    background: var(--color-bg-light);
    border-radius: var(--radius-full);
    font-size: 14px;
    color: var(--color-text-light);
    transition: all var(--transition-base);
}

.post-tag:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Author Box */
.author-box {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    margin: 30px 0;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    margin-bottom: 5px;
}

.author-info p {
    font-size: 14px;
    color: var(--color-text-light);
    margin: 0;
}

/* Milestones */
.milestones-timeline {
    position: relative;
    padding: 20px 0;
}

.milestones-timeline::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.milestone-item {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    position: relative;
}

.milestone-year {
    width: 100px;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    text-align: right;
}

.milestone-content {
    flex: 1;
    padding-left: 30px;
    position: relative;
}

.milestone-content::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 8px;
    width: 12px;
    height: 12px;
    background: var(--color-primary);
    border-radius: 50%;
}

/* Map */
.contact-map {
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: 30px;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 100px 0;
}

.error-code {
    font-size: 120px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 20px;
}

.error-title {
    font-size: 32px;
    margin-bottom: 15px;
}

.error-description {
    font-size: 18px;
    color: var(--color-text-light);
    margin-bottom: 30px;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

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

.animate-slide-up {
    animation: slideUp 0.6s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-base);
}

.modal-close:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Search Form */
.search-form-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-form-wrapper.active {
    opacity: 1;
    visibility: visible;
}

.search-form-wrapper .search-form {
    width: 100%;
    max-width: 600px;
    padding: 0 20px;
}

.search-form-wrapper input[type="search"] {
    width: 100%;
    padding: 20px;
    font-size: 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--color-white);
    color: var(--color-white);
    outline: none;
}

.search-form-wrapper input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    cursor: pointer;
    font-size: 24px;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .hero-title {
        font-size: 32px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .cta-title {
        font-size: 28px;
    }
    
    .case-results {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .hero-title {
        font-size: 26px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .cta-title {
        font-size: 24px;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        margin: 0 auto;
    }
    
    .post-navigation .nav-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .post-navigation .nav-next {
        text-align: left;
    }
    
    .milestones-timeline::before {
        left: 20px;
    }
    
    .milestone-year {
        width: 40px;
        font-size: 16px;
    }
    
    .milestone-content {
        padding-left: 20px;
    }
    
    .case-results {
        grid-template-columns: 1fr;
    }
}
