/**
 * Estilos adicionales para el blog y el newsletter de Dulciverso
 */

/* Estilos para el formulario de newsletter */
.newsletter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 100%;
}

.newsletter-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 30px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

.newsletter-btn {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}

.newsletter-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.newsletter-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.newsletter-btn i {
    margin-right: 5px;
}

/* Estilos para el modal del blog */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    position: relative;
    background-color: var(--bg-color);
    margin: 5% auto;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 90%;
    max-width: 800px;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-color);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin-top: 0;
    margin-right: 30px;
    color: var(--text-color);
}

.modal-date {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.modal-body {
    margin-bottom: 30px;
    line-height: 1.7;
    color: var(--text-color);
}

.modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.modal-body h3 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    color: var(--text-color);
}

.modal-body p {
    margin-bottom: 1em;
    line-height: 1.6;
}

.modal-body ul {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.modal-body li {
    margin-bottom: 0.5em;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.share-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
}

#share-facebook {
    background-color: #3b5998;
}

#share-twitter {
    background-color: #000000;
}

#share-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

#share-whatsapp {
    background-color: #25d366;
}

#copy-link {
    background-color: var(--secondary-color);
    border: none;
}

.share-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

body.modal-open {
    overflow: hidden;
}

.modal-author {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.author-name {
    font-weight: 500;
    color: var(--primary-color);
}

.post-interaction {
    margin-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 20px;
}

.post-likes {
    margin-bottom: 20px;
}

.like-button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.like-button:hover {
    background-color: rgba(255, 107, 107, 0.1);
}

.like-button.liked {
    color: #e74c3c;
}

.heart-animation {
    position: absolute;
    font-size: 1.5rem;
    animation: heart-fly 1s forwards;
    pointer-events: none;
}

@keyframes heart-fly {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px) scale(1.5);
        opacity: 0;
    }
}

.post-comments-section {
    margin-top: 20px;
}

.post-comments-section h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.comments-list {
    margin-bottom: 30px;
}

.comment {
    display: flex;
    margin-bottom: 20px;
    animation: fade-in 0.5s ease;
}

.comment-avatar {
    margin-right: 15px;
}

.comment-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.comment-author {
    font-weight: 500;
}

.comment-date {
    font-size: 0.8rem;
    color: #777;
}

.comment-text {
    line-height: 1.5;
}

.no-comments {
    font-style: italic;
    color: #777;
}

.comment-form-container {
    margin-top: 30px;
}

.comment-form-container h4 {
    margin-bottom: 10px;
}

.comment-form {
    display: flex;
    flex-direction: column;
}

#commentText {
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    resize: vertical;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.comment-submit-btn {
    align-self: flex-end;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.comment-submit-btn:hover {
    background-color: var(--secondary-color);
}

.new-comment {
    background-color: rgba(46, 204, 113, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #2ecc71;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark Mode */
.dark-mode .modal-content {
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .modal-header,
.dark-mode .modal-footer,
.dark-mode .post-interaction {
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .comment-date,
.dark-mode .no-comments {
    color: #aaa;
}

.dark-mode #commentText {
    border-color: #444;
    background-color: #222935;
}

.dark-mode .new-comment {
    background-color: rgba(46, 204, 113, 0.05);
}

.dark-mode .newsletter-input {
    border-color: #444;
    background-color: #222935;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .share-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .comment-submit-btn {
        width: 100%;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-input {
        width: 100%;
    }
    
    .newsletter-btn {
        width: 100%;
    }
}