/**
 * Personal Theme - Travel & Lifestyle Blog
 * Diseño elegante inspirado en blogs personales visuales
 */

/* ========================================
   Variables CSS
   ======================================== */
:root {
    --primary-color: #5b7fa6;
    --text-dark: #333333;
    --text-muted: #707070;
    --text-light: #999999;
    --bg-light: #f8f9fa;
    --bg-gray: #eeeeee;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* ========================================
   Reset y Base
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 16px;
    background-color: var(--bg-white);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--text-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   Header
   ======================================== */
.site-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.site-header.transparent-header {
    position: absolute;
    width: 100%;
    background: transparent;
    box-shadow: none;
}

.site-header.transparent-header .navbar-brand,
.site-header.transparent-header .nav-link {
    color: var(--bg-white) !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.site-header.transparent-header .navbar-brand {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.site-header.transparent-header .nav-link {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.site-header.transparent-header .nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
}

.navbar-brand:hover {
    background: rgba(0, 0, 0, 0.05);
}

.navbar-brand img {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.site-header.transparent-header .navbar-brand img {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    color: var(--text-dark);
    transition: var(--transition);
    margin: 0 0.25rem;
    border-radius: 8px;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background: rgba(0, 0, 0, 0.05);
}

.nav-link.social-link {
    font-size: 1.1rem;
    padding: 0.75rem 0.5rem !important;
}

.btn-search {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-search:hover {
    background: rgba(0, 0, 0, 0.1);
}

.site-header.transparent-header .btn-search {
    background: rgba(0, 0, 0, 0.2);
    color: var(--bg-white);
    backdrop-filter: blur(5px);
}

.site-header.transparent-header .btn-search:hover {
    background: rgba(255, 255, 255, 0.2);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-gray);
    color: var(--bg-white);
    text-align: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.5));
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-label {
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 12px rgba(0,0,0,0.4);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.95;
    font-weight: 300;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    padding: 4rem 0;
    min-height: 50vh;
}

.home-page .main-content {
    padding: 3rem 0;
}

/* ========================================
   Category Cards Section (Home)
   ======================================== */
.category-cards-section {
    padding: 3rem 0;
}

.category-card {
    position: relative;
    height: 350px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    margin-bottom: 2rem;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.category-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: var(--transition);
}

.category-card:hover .category-card-bg {
    transform: scale(1.05);
}

.category-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.4));
    z-index: 1;
}

.category-card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    padding: 2rem;
}

.category-card-title {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    margin: 0;
}

/* ========================================
   Posts Grid
   ======================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin: 2rem 0;
}

.post-card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.post-card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-card-image {
    transform: scale(1.05);
}

.post-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.post-card-meta span {
    margin-right: 1rem;
}

.post-card-meta i {
    margin-right: 0.35rem;
}

.post-card-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-card-title a {
    color: var(--text-dark);
}

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

.post-card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1rem;
}

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.post-card-category {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-card-read-more {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

.post-card-read-more i {
    transition: var(--transition);
}

.post-card-read-more:hover i {
    transform: translateX(5px);
}

/* ========================================
   Single Post
   ======================================== */
.single-post {
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 2.5rem;
}

.post-category-label {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.post-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.post-meta {
    font-size: 0.95rem;
    color: var(--text-muted);
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.post-meta span {
    margin-right: 1.5rem;
}

.post-featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.post-content h2 {
    font-size: 2rem;
}

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

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content img {
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-muted);
}

.post-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .post-title {
        font-size: 2rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
    background-color: var(--bg-gray);
    color: var(--text-dark);
    margin-top: 4rem;
    position: relative;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.footer-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Sobre mí */
.about-image-wrapper {
    max-width: 150px;
}

.about-image {
    width: 100%;
    height: auto;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

.btn-link-arrow {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.btn-link-arrow:hover {
    color: var(--primary-color);
}

.btn-link-arrow i {
    transition: var(--transition);
}

.btn-link-arrow:hover i {
    transform: translateX(5px);
}

/* Newsletter */
.newsletter-form .form-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
}

.newsletter-form .form-control {
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.newsletter-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(91, 127, 166, 0.15);
}

.newsletter-form .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 2rem;
    font-weight: 500;
}

.newsletter-form .btn-primary:hover {
    background-color: var(--text-dark);
    border-color: var(--text-dark);
}

/* Footer links */
.footer-menu {
    list-style: none;
    padding: 0;
}

.footer-menu li {
    margin-bottom: 0.75rem;
}

.footer-menu a {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-menu a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* Footer legal links */
.footer-legal-links {
    font-size: 0.85rem;
}

.footer-legal-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-legal-link:hover {
    color: var(--primary-color);
}

/* Footer social */
.footer-social {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Footer bottom */
.footer-bottom {
    border-top: 1px solid var(--border-color);
}

.copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========================================
   Botón Scroll Top
   ======================================== */
.btn-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--bg-white);
    border: none;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    font-size: 1.25rem;
}

.btn-scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.btn-scroll-top:hover {
    background-color: var(--text-dark);
    transform: translateY(-5px);
}

/* ========================================
   Paginación
   ======================================== */
.pagination {
    margin-top: 3rem;
}

.pagination .page-link {
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

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

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 992px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 2rem 0;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-card {
        height: 280px;
    }
    
    .category-card-title {
        font-size: 1.5rem;
    }
}

/* ========================================
   Sidebar
   ======================================== */
.sidebar .card {
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.sidebar .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.sidebar .list-group-item {
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    background: transparent;
    transition: var(--transition);
}

.sidebar .list-group-item:last-child {
    border-bottom: none;
}

.sidebar .list-group-item a {
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.sidebar .list-group-item:hover a {
    color: var(--primary-color);
}

.sidebar .list-group-item.active {
    background-color: var(--bg-light);
    border-left: 3px solid var(--primary-color);
    padding-left: 1rem;
    margin-left: -1.25rem;
    padding-right: 1rem;
}

.sidebar .list-group-item.active a {
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar .badge {
    background-color: #6c757d;
    color: var(--bg-white);
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    border-radius: 12px;
    font-size: 0.85rem;
}

.sidebar .list-group-item.active .badge {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

/* ========================================
   Utilidades
   ======================================== */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--text-dark);
    border-color: var(--text-dark);
}

.text-primary-custom {
    color: var(--primary-color) !important;
}

