/**
 * Estilos principales para Plantillas para Sublimar
 */

@font-face {
    font-family: 'Font Awesome 6 Free';
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-solid-900.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Font Awesome 6 Free';
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-regular-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Font Awesome 6 Brands';
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-brands-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Cards de publicaciones */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

/* Post content - Estilo minimalista */
.publication-content {
    max-width: 900px;
    margin: 0 auto;
}

.post-content {
    line-height: 1.9;
    color: #444;
    font-size: 1.05rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 35px;
    margin-bottom: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.post-content h2 {
    font-size: 1.75rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.post-content h3 {
    font-size: 1.5rem;
}

.post-content p {
    margin-bottom: 18px;
}

.post-content ul,
.post-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 25px 0;
    font-style: italic;
    color: #666;
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-radius: 4px;
}

.post-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.post-content a:hover {
    border-bottom-color: var(--primary-color);
}

.post-content code {
    background-color: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.post-content pre {
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 20px 0;
}

/* Breadcrumbs */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 20px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

/* Paginación */
.pagination .page-link {
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Loading lazy */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Estilos minimalistas para publicación */
.publication-content header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
    margin-bottom: 15px;
}

.publication-content .carousel-control-prev-icon,
.publication-content .carousel-control-next-icon {
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

.publication-content .carousel-control-prev,
.publication-content .carousel-control-next {
    width: 8%;
}

/* Responsive */
@media (max-width: 768px) {
    .card-img-top {
        height: 150px;
    }
    
    .publication-content header h1 {
        font-size: 1.75rem;
    }
    
    /* En móvil, las categorías al final */
    .order-1 {
        order: 1 !important;
    }
    
    .order-2 {
        order: 2 !important;
    }
    
    /* Mejorar espaciado en móvil */
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    .publication-content .carousel-control-prev,
    .publication-content .carousel-control-next {
        width: 15%;
    }
    
    .post-content {
        font-size: 1rem;
    }
}

/* Alerts */
.alert {
    border-radius: 5px;
}

/* Badges */
.badge {
    font-weight: 500;
}

/* Navbar */
.navbar-brand {
    font-weight: bold;
}

.navbar-nav .dropdown-menu {
    border-radius: 12px;
    padding: 0.5rem 0;
    min-width: 16rem;
    z-index: 2000;
    overflow: visible;
}

.navbar {
    position: relative;
    z-index: 1100;
    overflow: visible;
}

.navbar .container,
.navbar-collapse {
    overflow: visible;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Admin styles (se agregarán más adelante) */
.admin-sidebar {
    min-height: calc(100vh - 56px);
    background-color: #f8f9fa;
    padding: 20px 0;
}

.admin-content {
    padding: 20px;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    background-color: #20ba5a;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
    text-decoration: none;
}

.whatsapp-float i {
    line-height: 1;
}

/* Animación de pulso para el botón */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6);
    }
    100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
}

/* Ajustes responsive para el botón de WhatsApp */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
        font-size: 28px;
    }
}

