/* === Custom Styles for MetalCorp Theme === */

:root {
    --primary-color: #455a64;
    --secondary-color: #607d8b;
    --accent-color: #90a4ae;
    --light-color: #cfd8dc;
    --text-dark: #2c3e50;
    --text-light: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--light-color) 0%, #ffffff 100%);
}

/* Headings use sans-serif */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
}

/* Sticky Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(69, 90, 100, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(69, 90, 100, 0.98);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-light);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* Hero Split Section */
.hero-section {
    margin-top: 80px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 60px 0;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
}

/* Organic Button Styles */
.btn-primary {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 15px 35px;
    border: none;
    border-radius: 25px 15px 25px 15px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(69, 90, 100, 0.3);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(69, 90, 100, 0.4);
    background: var(--secondary-color);
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    border-radius: 20px 5px 15px 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Pinterest Masonry Layout */
.masonry-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    grid-auto-rows: 10px;
}

.masonry-item {
    background: white;
    border-radius: 15px 8px 12px 18px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    break-inside: avoid;
}

.masonry-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* Different heights for masonry effect */
.masonry-item:nth-child(1) { grid-row-end: span 25; }
.masonry-item:nth-child(2) { grid-row-end: span 20; }
.masonry-item:nth-child(3) { grid-row-end: span 30; }
.masonry-item:nth-child(4) { grid-row-end: span 22; }
.masonry-item:nth-child(5) { grid-row-end: span 28; }
.masonry-item:nth-child(6) { grid-row-end: span 18; }
.masonry-item:nth-child(7) { grid-row-end: span 24; }
.masonry-item:nth-child(8) { grid-row-end: span 26; }

.masonry-item h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.masonry-item img {
    width: 100%;
    border-radius: 10px 5px 8px 12px;
    margin-bottom: 15px;
}

.masonry-item p {
    color: var(--secondary-color);
    font-size: 0.95rem;
}

/* Icon styling */
.service-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

/* Contact form */
.contact-form {
    background: white;
    padding: 30px;
    border-radius: 18px 10px 15px 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid var(--light-color);
    border-radius: 8px 15px 8px 15px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent-color);
    outline: none;
    transform: scale(1.02);
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* WordPress Specific Styles */
/* Post List */
.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 120px auto 40px;
    padding: 0 20px;
}

.post-item {
    background: white;
    border-radius: 15px 8px 12px 18px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.post-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-item h3 {
    margin: 20px;
    font-size: 1.3rem;
    line-height: 1.4;
}

.post-item h3 a {
    color: var(--primary-color);
    text-decoration: none;
}

.post-item h3 a:hover {
    color: var(--secondary-color);
}

.post-item p {
    margin: 0 20px 20px;
    color: var(--secondary-color);
    flex: 1 0 auto;
}

.post-item > a:last-of-type {
    align-self: flex-start;
    margin: 0 20px 20px;
    background: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px 15px 25px 15px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(69, 90, 100, 0.3);
}

.post-item > a:last-of-type:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(69, 90, 100, 0.4);
}

/* Pagination */
nav.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px auto;
    font-weight: 600;
}

.page-numbers {
    display: inline-block;
    padding: 10px 15px;
    border: 2px solid var(--light-color);
    border-radius: 25px 15px 25px 15px;
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.page-numbers.current,
.page-numbers:hover {
    background: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(69, 90, 100, 0.3);
}

/* Breadcrumbs */
.breadcrumbs {
    max-width: 1200px;
    margin: 100px auto 20px;
    padding: 0 20px;
    font-size: 0.95rem;
    color: var(--secondary-color);
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumbs a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.breadcrumbs span {
    color: var(--secondary-color);
}

/* Single Post/Page Content */
.page-content {
    max-width: 800px;
    margin: 20px auto 60px;
    padding: 30px;
    background: white;
    border-radius: 15px 8px 12px 18px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.page-content .post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px 5px 8px 12px;
    margin-bottom: 20px;
}

.page-content h1 {
    font-size: 2.5rem;
    margin: 20px 0;
    line-height: 1.3;
    color: var(--primary-color);
}

.page-content .content {
    color: var(--text-dark);
}

.page-content .content p {
    margin-bottom: 20px;
}

/* 404 Page */
.error-404 {
    text-align: center;
    padding: 60px 20px;
}

.error-404 h1 {
    font-size: 6rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.error-404 h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.error-404 p {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .masonry-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        display: none;
    }
    
    .post-list {
        grid-template-columns: 1fr;
    }
    
    .page-content h1 {
        font-size: 2rem;
    }
    
    .error-404 h1 {
        font-size: 4rem;
    }
    
    .error-404 h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .breadcrumbs {
        font-size: 0.85rem;
    }
    
    .page-content {
        padding: 20px;
    }
    
    .page-content h1 {
        font-size: 1.8rem;
    }
    
    .error-404 h1 {
        font-size: 3rem;
    }
}

/* === Homepage Styles === */

/* Random Posts Section */
.random-posts {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 20px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.post-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 20px;
}

.post-content h3 {
    font-size: 1.2rem;
    margin: 0;
    line-height: 1.4;
}

.post-content h3 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-content h3 a:hover {
    color: var(--primary-color);
}

/* Blog Link Section */
.blog-link-section {
    text-align: center;
    margin-top: 40px;
}

.blog-link {
    display: inline-block;
    padding: 15px 30px;
    background: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.blog-link:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(69, 90, 100, 0.3);
}

/* Responsive Design for Homepage */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .post-thumbnail {
        height: 180px;
    }
    
    .post-content {
        padding: 15px;
    }
    
    .post-content h3 {
        font-size: 1.1rem;
    }
}