/**
 * Puerto Vallarta Travel Blog - Modern Travel Blog Design
 * Inspired by travel blog templates and puertovallarta.net
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color scheme inspired by Puerto Vallarta (ocean blues, warm accents) */
    --primary-blue: #1e88e5;
    --dark-blue: #1565c0;
    --ocean-teal: #00897b;
    --warm-orange: #ff6f00;
    --light-orange: #ffa726;
    --sand-beige: #f5f5dc;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e0e0e0;
    --dark-gray: #424242;
    --text-dark: #212121;
    --text-light: #757575;
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Container */
    --container-padding: 1rem;
    --container-max-width: 1200px;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-dark);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Header */
.site-header {
    background: var(--white);
    color: var(--text-dark);
    padding: var(--spacing-md) 0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-logo {
    max-height: 80px;
    width: auto;
    object-fit: contain;
}

.site-title-fallback {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ocean-teal);
    letter-spacing: -0.5px;
}

.site-tagline {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 300;
    text-transform: lowercase;
    letter-spacing: 0.5px;
}

/* Hero Section */
.hero-section {
    width: 100%;
    margin-bottom: var(--spacing-xl);
}

.hero-image-container {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    max-height: 600px;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.5) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    color: var(--white);
    padding: var(--spacing-lg);
    max-width: 800px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.5;
}

/* Main Content */
.main-content {
    padding: var(--spacing-xl) 0;
    min-height: calc(100vh - 200px);
}

/* Posts List */
.posts-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

/* Post Card (Listing View) */
.post-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.post-card-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--light-gray);
}

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

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

.post-card-content {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-header {
    margin-bottom: var(--spacing-sm);
}

.post-card-date {
    font-size: 0.875rem;
    color: var(--text-light);
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 400;
}

.post-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.post-card-title a {
    color: var(--dark-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.post-card-excerpt {
    flex-grow: 1;
    margin-bottom: var(--spacing-md);
}

.post-card-excerpt p {
    color: var(--text-dark);
    line-height: 1.7;
    margin: 0;
}

.post-card-footer {
    margin-top: auto;
}

.read-more-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-blue);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s ease, transform 0.2s ease;
}

.read-more-btn:hover {
    background: var(--dark-blue);
    transform: translateX(4px);
}

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

.breadcrumb {
    margin-bottom: var(--spacing-lg);
    padding-top: var(--spacing-md);
}

.breadcrumb-bottom {
    margin-top: var(--spacing-xl);
    margin-bottom: 0;
    padding-bottom: var(--spacing-md);
}

.back-home-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-blue);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s ease, transform 0.2s ease;
}

.back-home-link:hover {
    background: var(--dark-blue);
    transform: translateX(-4px);
}

.post-full {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.post-featured-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: var(--light-gray);
}

.post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Post (Full View) */
.post {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.post-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--medium-gray);
    background: linear-gradient(to bottom, var(--light-gray) 0%, var(--white) 100%);
}

.post-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    line-height: 1.3;
}

.post-title-link {
    color: var(--dark-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-title-link:hover {
    color: var(--ocean-teal);
}

.post-date {
    font-size: 0.875rem;
    color: var(--text-light);
    display: block;
    font-weight: 400;
}

.post-content {
    padding: var(--spacing-lg);
}

.post-content p {
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.post-content p:last-child {
    margin-bottom: 0;
}

.post-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-blue);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
}

.post-content h2:first-child {
    margin-top: 0;
}

.post-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ocean-teal);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
}

.post-content ul,
.post-content ol {
    margin-left: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-md);
    line-height: 1.8;
}

.post-content li {
    margin-bottom: var(--spacing-xs);
}

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

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

/* Post Footer - Related Articles */
.post-footer {
    padding: var(--spacing-lg);
    background: var(--light-gray);
    border-top: 1px solid var(--medium-gray);
    margin-top: var(--spacing-md);
}

.related-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.related-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.related-links li {
    margin-bottom: var(--spacing-xs);
}

.related-links li:last-child {
    margin-bottom: 0;
}

.related-link {
    display: inline-block;
    color: var(--primary-blue);
    text-decoration: none;
    padding: var(--spacing-xs) 0;
    transition: color 0.2s ease, transform 0.2s ease;
    font-weight: 500;
}

.related-link:hover {
    color: var(--dark-blue);
    text-decoration: underline;
    transform: translateX(4px);
}

.related-link::before {
    content: "→ ";
    margin-right: var(--spacing-xs);
    color: var(--ocean-teal);
    transition: transform 0.2s ease;
}

.related-link:hover::before {
    transform: translateX(-2px);
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
    color: var(--text-light);
}

.no-posts p {
    margin-bottom: var(--spacing-sm);
}

.note {
    font-size: 0.875rem;
    font-style: italic;
}

/* Footer */
.site-footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
    text-align: center;
}

.site-footer p {
    margin-bottom: var(--spacing-xs);
    font-size: 0.875rem;
}

.site-footer a {
    color: var(--light-orange);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.footer-note {
    opacity: 0.8;
    font-size: 0.8rem;
}

/* Responsive Design - Tablet and Up */
@media (min-width: 768px) {
    :root {
        --container-padding: 2rem;
        --font-size-base: 17px;
    }
    
    .site-header {
        padding: var(--spacing-lg) 0;
    }
    
    .site-logo {
        max-height: 100px;
    }
    
    .site-tagline {
        font-size: 1rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-image-container {
        height: 70vh;
        min-height: 500px;
    }
    
    .posts-list {
        grid-template-columns: 1fr;
    }
    
    .post-card {
        flex-direction: row;
    }
    
    .post-card-image {
        width: 40%;
        height: auto;
        min-height: 300px;
    }
    
    .post-card-content {
        width: 60%;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .post-header,
    .post-content,
    .post-footer {
        padding: var(--spacing-lg);
    }
    
    .main-content {
        padding: var(--spacing-xl) 0;
    }
    
    .post-featured-image {
        height: 500px;
    }
}

/* Responsive Design - Desktop */
@media (min-width: 1024px) {
    .posts-list {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .post-card-image {
        width: 35%;
    }
    
    .post-card-content {
        width: 65%;
    }
    
    .post-content {
        font-size: 1.05rem;
    }
    
    .post-content h2 {
        font-size: 1.75rem;
    }
    
    .post-content h3 {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.75rem;
    }
    
    .post-featured-image {
        height: 600px;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .post-footer,
    .hero-section {
        display: none;
    }
    
    .post {
        box-shadow: none;
        page-break-inside: avoid;
    }
}
