/* Custom Post Styles - Single Post Template */

/* Custom Container for Elegant Posts */
.single-post article.elegant-post {
    width: 80% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 2rem !important;
}

/* Mobile styles */
@media (max-width: 768px) {
    .single-post article.elegant-post {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 1rem !important;
    }
}

/* Elegant Single Post Styles */
.elegant-post {
    margin: 0;
    padding: 0;
}

/* Hero Section with Featured Image */
.post-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.hero-image {
    width: 100%;
    height: auto;
    max-height: 60vh;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* Hero content moved below image */
.hero-overlay {
    position: static;
    width: 100%;
    background: none;
    display: block;
    padding: 2rem 0;
}

.hero-content {
    text-align: center;
    color: #1e293b;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-content .post-meta {
    margin-bottom: 1.5rem;
}

.hero-content .post-category {
    background: #3d5a7f;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 1rem;
}

.hero-content .post-category a {
    color: white !important;
}

.hero-content .post-date {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.hero-content .post-title {
    font-size: 40px !important;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #1e293b !important;
}

.post-content p {
    font-size: 20px !important;
}

/* Mobile responsive font size */
@media (max-width: 768px) {
    .hero-content .post-title {
        font-size: 30px !important;
    }
    .post-content p {
        font-size: 20px !important;
    }
}

.post-content-wrapper {
    padding-top: 0 !important;
}

.hero-content .post-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.hero-content .author-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
}

.hero-content .author-name {
    color: #64748b;
    font-weight: 500;
}

/* Post Header without Image */
.post-header-no-image {
    padding: 3rem 0;
    text-align: center;
    background: #f8f9fa;
    margin-bottom: 0;
}

.post-header-no-image .post-meta {
    margin-bottom: 1rem;
}

.post-header-no-image .post-category {
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 1rem;
}

.post-header-no-image .post-date {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.post-header-no-image .post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.post-header-no-image .post-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.post-header-no-image .author-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
}

.post-header-no-image .author-name {
    color: #64748b;
    font-weight: 500;
}

/* Post Content Wrapper */
.post-content-wrapper {
    padding: 3rem 0;
    background: white;
    width: 100%;
}

.post-content-wrapper .elegant-post-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}


.post-content-wrapper .elegant-post-container .post-content {
    padding: 0 !important;
}

/* Post Content */
.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #374151;
    width: 100%;
}

/* Hide first image in post content */
.post-content img:first-of-type {
    display: none !important;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    color: #1e293b;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
}

.post-content h1 { font-size: 2.2rem; }
.post-content h2 { font-size: 1.8rem; }
.post-content h3 { font-size: 1.5rem; }
.post-content h4 { font-size: 1.3rem; }

.post-content p {
    margin-bottom: 1.5rem;
    color: #374151;
    font-size: 1.125rem;
    line-height: 1.8;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.post-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #64748b;
    font-size: 1.1rem;
}

.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Post Tags */
.post-tags {
    margin: 3rem 0;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.post-tags h4 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-weight: 600;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #f1f5f9;
    color: #64748b;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.tag:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Author Bio */
.author-bio {
    margin: 3rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.author-avatar-large img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #667eea;
}

.author-details h3 {
    margin: 0;
    color: #1e293b;
    font-weight: 600;
}

.author-description {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.author-links {
    display: flex;
    gap: 1rem;
}

.author-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.author-link:hover {
    color: #5a67d8;
}

/* Post Navigation */
.post-navigation {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-previous a,
.nav-next a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 1rem;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
}

.nav-previous a:hover,
.nav-next a:hover {
    color: #667eea;
    background: #f1f5f9;
    transform: translateY(-2px);
}

.nav-arrow {
    font-size: 1.25rem;
    font-weight: bold;
}

.nav-text {
    font-size: 0.875rem;
}

/* Post Sidebar */
.post-sidebar {
    margin: 3rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.sidebar-widget {
    margin-bottom: 2rem;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    margin-bottom: 1rem;
    color: #1e293b;
    font-weight: 600;
    font-size: 1.125rem;
}

/* Related Posts */
.related-post {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.related-post:last-child {
    margin-bottom: 0;
}

.related-thumbnail {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-content {
    flex: 1;
}

.related-title {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 600;
}

.related-title a {
    color: #1e293b;
    text-decoration: none;
}

.related-title a:hover {
    color: #667eea;
}

.related-date {
    font-size: 0.75rem;
    color: #64748b;
}

/* Responsive Design for Posts */
@media (max-width: 768px) {
    .elegant-post-container,
    .post-content-wrapper .elegant-post-container {
        width: 95%;
        padding: 0 1rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .author-info {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-previous,
    .nav-next {
        width: 100%;
    }
    
    /* Mobile hero adjustments */
    .hero-content .post-title {
        font-size: 2rem;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-overlay {
        padding: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .elegant-post-container,
    .post-content-wrapper .elegant-post-container {
        width: 100%;
        padding: 0 1rem;
    }
    
    .post-content {
        font-size: 0.95rem;
    }
    
    .post-content h1 { font-size: 1.8rem; }
    .post-content h2 { font-size: 1.5rem; }
    .post-content h3 { font-size: 1.3rem; }
    
    .post-content p {
        font-size: 1rem;
    }
}

/* Fix for Elementor conflicts */
.single-post article.elegant-post, .single-post article.elegant-post .hero-content {
    z-index: 1;
}

.ast-article-single .elementor-element, .ast-article-single .e-con-inner {
    max-width: none !important;
}

.ast-article-single .elementor-element, .ast-article-single .e-con-inner {
    width: 100% !important;
}

.ast-article-single .elementor-element, .ast-article-single .e-con-inner {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Fix for posts listing shortcode */
.posts-listing-shortcode.elegant-posts .post-card {
    z-index: 1;
}

/* Site content fixes */
#page .site-content {
    overflow: visible;
} 

.wp-block-button__link.has-blue-background-color.has-text-color.has-background.wp-element-button {
    color: black !important;
}

/* Estilos para botones de contacto en posts */
.wp-block-button__link,
.wp-block-button .wp-block-button__link {
    display: inline-block !important;
    padding: 12px 24px !important;
    background-color: #3d5a7f !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    border: 2px solid #3d5a7f !important;
    cursor: pointer !important;
    min-width: 120px !important;
}

.wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:hover {
    background-color: #2d4a6f !important;
    border-color: #2d4a6f !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(61, 90, 127, 0.3) !important;
}

/* Botones específicos de contacto */
.contact-button,
.contact-btn,
.wp-block-button__link[href*="contact"],
.wp-block-button__link[href*="contacto"] {
    background-color: #667eea !important;
    border-color: #667eea !important;
}

.contact-button:hover,
.contact-btn:hover,
.wp-block-button__link[href*="contact"]:hover,
.wp-block-button__link[href*="contacto"]:hover {
    background-color: #5a67d8 !important;
    border-color: #5a67d8 !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

/* Estilos específicos para la clase contact-button */
.contact-button {
    display: inline-block !important;
    padding: 15px 30px !important;
    background-color: #667eea !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    line-height: 1.4 !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    border: 2px solid #667eea !important;
    cursor: pointer !important;
    min-width: 150px !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.contact-button:hover {
    background-color: #5a67d8 !important;
    border-color: #5a67d8 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
}

/* Responsive para contact-button */
@media (max-width: 768px) {
    .contact-button {
        padding: 12px 24px !important;
        font-size: 16px !important;
        min-width: 120px !important;
    }
}

/* Responsive para botones */
@media (max-width: 768px) {
    .wp-block-button__link,
    .wp-block-button .wp-block-button__link {
        padding: 10px 20px !important;
        font-size: 14px !important;
        min-width: 100px !important;
    }
}