/* ============================================
   BLOG INDIVIDUAL - ESTILOS COMPLETOS
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Nunito', sans-serif;
    line-height: 1.7;
    color: #2c3e50;
    background: #f8fafc;
}

/* Hero Section con Imagen Principal */
.blog-hero {
    position: relative;
    height: 45vh;
    min-height: 320px;
    max-height: 500px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.blog-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
}

.blog-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0.1) 0%, 
        rgba(0, 0, 0, 0.2) 40%, 
        rgba(0, 0, 0, 0.6) 100%);
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 20px;
}

.blog-hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: #ffffff;
    text-shadow: 
        2px 2px 0px rgba(0, 0, 0, 0.9),
        4px 4px 8px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(102, 126, 234, 0.3);
    line-height: 1.2;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.2);
    padding: 16px 26px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.blog-hero-meta {
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    color: #ffffff;
    text-shadow: 
        1px 1px 0px rgba(0, 0, 0, 0.9),
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    border-radius: 25px;
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.blog-hero-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Botón de regreso flotante */
.back-button-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: rgba(102, 126, 234, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 12px 20px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.back-button-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.back-btn:hover {
    color: white;
    text-decoration: none;
}

/* Contenido del artículo */
.blog-content-wrapper {
    background: white;
    margin: -60px auto 0;
    max-width: 900px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.blog-content {
    padding: 60px 60px 60px;
}

/* Tipografía mejorada */
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    color: #2c3e50;
    font-weight: 600;
    margin: 40px 0 20px;
    line-height: 1.3;
}

.blog-content h1 { font-size: 2.8rem; }
.blog-content h2 { font-size: 2.4rem; }
.blog-content h3 { font-size: 2rem; }
.blog-content h4 { font-size: 1.6rem; }
.blog-content h5 { font-size: 1.4rem; }
.blog-content h6 { font-size: 1.2rem; }

.blog-content p {
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: 25px;
    color: #34495e;
    text-align: justify;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease;
}

.blog-content img:hover {
    transform: scale(1.02);
}

/* Imágenes flotantes con texto alrededor */
.blog-content figure {
    margin: 20px 0;
    max-width: 100%;
}

.blog-content figure img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-content figure:nth-of-type(odd) {
    float: left;
    max-width: 45%;
    margin: 10px 30px 20px 0;
}

.blog-content figure:nth-of-type(even) {
    float: right;
    max-width: 45%;
    margin: 10px 0 20px 30px;
}

.blog-content figcaption {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    text-align: center;
    margin-top: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
}

/* Clearfix para los floats */
.blog-content::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive: En móvil, las imágenes ocupan todo el ancho */
@media (max-width: 768px) {
    .blog-content figure:nth-of-type(odd),
    .blog-content figure:nth-of-type(even) {
        float: none;
        max-width: 100%;
        margin: 20px 0;
    }
}

.blog-content blockquote {
    border-left: 5px solid #667eea;
    padding: 25px 30px;
    margin: 30px 0;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    font-size: 1.3rem;
    color: #555;
    position: relative;
}

.blog-content blockquote::before {
    content: '"';
    font-size: 4rem;
    color: #667eea;
    position: absolute;
    top: -10px;
    left: 15px;
    opacity: 0.3;
}

.blog-content ul,
.blog-content ol {
    margin: 25px 0;
    padding-left: 40px;
}

.blog-content li {
    margin-bottom: 12px;
    font-size: 1.2rem;
    line-height: 1.7;
}

.blog-content a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.blog-content a:hover {
    color: #764ba2;
    border-bottom-color: #764ba2;
    text-decoration: none;
}

/* Tablas mejoradas */
.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.blog-content th,
.blog-content td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    font-size: 1.1rem;
}

/* Tablas en móvil */
@media (max-width: 768px) {
    .blog-content th,
    .blog-content td {
        padding: 15px 16px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .blog-content th,
    .blog-content td {
        padding: 12px 14px;
        font-size: 1.25rem;
    }
}

.blog-content th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

/* Footer del artículo */
.blog-footer {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    padding: 50px 60px;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.blog-footer h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.share-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.share-btn.facebook { background: linear-gradient(135deg, #3b5998, #4c70ba); }
.share-btn.twitter { background: linear-gradient(135deg, #1da1f2, #0d8bd9); }
.share-btn.whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); }
.share-btn.email { background: linear-gradient(135deg, #34495e, #2c3e50); }

/* Location Section */
.blog-location-section {
    background: #f8f9fa;
    padding: 60px 0;
}

.blog-location-wrapper {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    max-width: 900px;
    margin: 0 auto;
}

.location-title {
    text-align: center;
    margin-bottom: 30px;
}

.location-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.location-title p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.location-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #34495e;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Dropdown Search Styles */
.dropdown-search {
    position: relative;
    width: 100%;
}

.dd-selected {
    padding: 12px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    cursor: pointer;
    background: white;
    font-size: 15px;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.dd-selected:hover {
    border-color: rgba(102, 126, 234, 0.4);
    background: #f8f9fa;
}

.dd-arrow {
    transition: transform 0.3s ease;
    color: #999;
}

.dropdown-search.active .dd-arrow {
    transform: rotate(180deg);
}

.dd-list {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 300px;
    overflow: hidden;
    display: none;
}

.dd-list.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.dd-search {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid #ecf0f1;
    border-radius: 12px 12px 0 0;
    font-size: 14px;
    outline: none;
}

.dd-options {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 250px;
    overflow-y: auto;
}

.dd-options li {
    padding: 12px 16px;
    cursor: pointer;
    color: #555;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.dd-options li:hover {
    background: #f8f9fa;
    color: #333;
    padding-left: 20px;
}

.dd-options li.hidden {
    display: none;
}

.btn-comprar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-comprar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Categories Section */
.blog-categories-section {
    padding: 60px 0;
    background: white;
}

.categories-header {
    text-align: center;
    margin-bottom: 40px;
}

.categories-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.categories-header p {
    font-size: 1.1rem;
    color: #7f8c8d;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 220px;
}

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

.category-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
}

.category-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 30px 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-name {
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

.category-arrow {
    color: white;
    font-size: 1.8rem;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.category-card:hover .category-arrow {
    transform: translateX(5px);
}

/* Related Blogs Section */
.related-blogs-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.related-blogs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.related-blogs-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.view-all-link {
    color: #667eea;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: #764ba2;
    gap: 12px;
}

.related-blogs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-card-small {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card-small:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.blog-card-small-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card-small-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-card-small-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card-small:hover .blog-card-small-image img {
    transform: scale(1.05);
}

.blog-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-image-placeholder i {
    font-size: 3rem;
    color: rgba(255,255,255,0.8);
}

.blog-card-small-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-small-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-small:hover .blog-card-small-title {
    color: #667eea;
}

.blog-card-small-description {
    color: #7f8c8d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-small-date {
    color: #667eea;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 992px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .related-blogs-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .blog-hero {
        height: 40vh;
        min-height: 280px;
        max-height: 400px;
    }
    
    .blog-hero-title {
        font-size: 2.8rem;
        padding: 18px 22px;
        margin: 0 10px 20px 10px;
    }
    
    .blog-hero-meta {
        font-size: 1.15rem;
        gap: 20px;
        padding: 14px 22px;
        margin: 0 15px;
    }
    
    .back-button-float {
        bottom: 20px;
        right: 20px;
        padding: 10px 16px;
    }
    
    .blog-content-wrapper {
        margin: -40px 10px 0;
        border-radius: 15px;
    }
    
    .blog-content,
    .blog-footer {
        padding: 35px 25px 30px;
    }
    
    .blog-content h1 { font-size: 2.8rem; }
    .blog-content h2 { font-size: 2.4rem; }
    .blog-content h3 { font-size: 2rem; }
    .blog-content h4 { font-size: 1.8rem; }
    .blog-content h5 { font-size: 1.6rem; }
    .blog-content h6 { font-size: 1.5rem; }
    
    .blog-content p {
        font-size: 1.5rem;
        line-height: 1.9;
    }
    
    .blog-content .lead {
        font-size: 1.7rem !important;
        line-height: 1.8;
    }
    
    .blog-content li {
        font-size: 1.45rem;
        line-height: 1.9;
    }
    
    .blog-content blockquote {
        font-size: 1.5rem;
        padding: 20px 25px;
    }
    
    .blog-footer h3 {
        font-size: 1.6rem;
    }
    
    .blog-footer p {
        font-size: 1.15rem;
    }
    
    .share-buttons {
        gap: 18px;
    }
    
    .share-btn {
        width: 58px;
        height: 58px;
        font-size: 1.3rem;
    }
    
    .blog-location-wrapper {
        padding: 30px 20px;
    }
    
    .location-title h2 {
        font-size: 1.9rem;
    }
    
    .location-title p {
        font-size: 1.15rem;
    }
    
    .location-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dd-selected {
        font-size: 1.15rem;
        padding: 14px 18px;
    }
    
    .dd-options li {
        font-size: 1.15rem;
        padding: 14px 18px;
    }
    
    .form-group label {
        font-size: 1.05rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .category-card {
        height: 180px;
    }
    
    .categories-header h2,
    .related-blogs-header h2 {
        font-size: 2.2rem;
    }
    
    .related-blogs-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .view-all-link {
        font-size: 1.15rem;
    }
    
    .related-blogs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .blog-card-small-title {
        font-size: 1.5rem;
    }
    
    .blog-card-small-description {
        font-size: 1.15rem;
    }
    
    .blog-card-small-date {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-hero-title {
        font-size: 2.5rem;
        padding: 15px 18px;
    }
    
    .blog-hero-meta {
        font-size: 1.1rem;
        gap: 15px;
        padding: 12px 18px;
    }
    
    .blog-content,
    .blog-footer {
        padding: 30px 20px 25px;
    }
    
    .blog-content h1 { font-size: 2.3rem; }
    .blog-content h2 { font-size: 2rem; }
    .blog-content h3 { font-size: 1.8rem; }
    .blog-content h4 { font-size: 1.6rem; }
    .blog-content h5 { font-size: 1.5rem; }
    .blog-content h6 { font-size: 1.4rem; }
    
    .blog-content p {
        font-size: 1.4rem;
        line-height: 1.9;
    }
    
    .blog-content .lead {
        font-size: 1.6rem !important;
        line-height: 1.8;
        margin-bottom: 30px !important;
    }
    
    .blog-content li {
        font-size: 1.35rem;
        line-height: 1.9;
    }
    
    .blog-content blockquote {
        font-size: 1.4rem;
        padding: 18px 20px;
    }
    
    .blog-footer h3 {
        font-size: 1.5rem;
    }
    
    .blog-footer p {
        font-size: 1.15rem;
    }
    
    .share-buttons {
        gap: 16px;
    }
    
    .share-btn {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }
    
    .location-title h2 {
        font-size: 1.7rem;
    }
    
    .location-title p {
        font-size: 1.15rem;
    }
    
    .btn-comprar {
        width: 100%;
        font-size: 1.2rem;
        padding: 16px 30px;
    }
    
    .dd-selected {
        font-size: 1.2rem;
        padding: 15px 18px;
    }
    
    .dd-options li {
        font-size: 1.2rem;
        padding: 15px 18px;
    }
    
    .form-group label {
        font-size: 1.1rem;
    }
    
    .category-name {
        font-size: 1.2rem;
    }
    
    .related-blogs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-card-small-title {
        font-size: 1.5rem;
    }
    
    .blog-card-small-description {
        font-size: 1.2rem;
    }
    
    .blog-card-small-date {
        font-size: 1.05rem;
    }
    
    .related-blogs-header h2 {
        font-size: 2rem;
    }
    
    .view-all-link {
        font-size: 1.15rem;
    }
    
    .back-btn {
        font-size: 1.05rem;
    }
}