/* === NEW NAVBAR LAYOUT === */

.nav-grid {
    display: grid;
    grid-template-columns: 140px 1fr 300px;
    align-items: center;
    gap: 20px;
}

.nav-left {
    display: flex;
    align-items: center;
}

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

.nav-logo {
    height: 55px;
    width: auto;
    object-fit: contain;
}


.logo-text {
    font-family: 'Merriweather', serif;
    font-size: 1.9rem;
    text-align: center;
    font-weight: 700;
    color: white;
}

.nav-right {
    display: flex;
    justify-content: flex-end;
    gap: 22px;
}

/* Fix for mobile */
@media (max-width: 800px) {
    .nav-grid {
        grid-template-columns: 80px 1fr;
        grid-template-areas:
            "logo links"
            "title title";
        text-align: center;
        gap: 10px;
    }

    .nav-left { grid-area: logo; }
    .nav-center { grid-area: title; }
    .nav-right { grid-area: links; justify-content: center; }

    .nav-logo {
        height: 45px;
    }

    .logo-text {
        font-size: 1.4rem;
        margin-top: 5px;
    }
}

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

body {
    font-family: Inter, sans-serif;
    background: #f4f1ec;
    color: #2b2b2b;
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Merriweather', serif;
    color: #2a2a2a;
}

/* === Containers === */
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* === Navbar === */
.nav {
    background: #3e3a36;
    color: white;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links a {
    color: white;
    margin-left: 20px;
    text-decoration: none;
    font-weight: 500;
}

.nav-links a:hover {
    opacity: 0.8;
}

.logo {
    font-size: 1.6rem;
}

/* === Hero Split Layout === */
.hero {
    margin-top: 90px; /* fixes header overlap */
}

.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 70vh;
    background: #f4f1ec;
}

.hero-text {
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-text h1 {
    font-size: 2.7rem;
    margin-bottom: 15px;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.hero-image {
    background: url('images/tinyhome1.jpeg') center/cover no-repeat;
}

/* Buttons */
.btn-light, .btn-dark {
    padding: 12px 22px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
}

.btn-light {
    background: white;
    color: #3e3a36;
    border: 2px solid #3e3a36;
}

.btn-dark {
    background: #3e3a36;
    color: white;
}
.card-btn {
    margin-top: 20px;
    align-self: center;   /* keeps button centered */
    padding: 10px 20px;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    display: inline-block;
}

.card a.btn-dark {
    margin-top: auto;  /* Push button to bottom of card */
    display: inline-block;
    text-align: center;
}

/* === Sections === */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2rem;
}

.alt {
    background: #e7e2da;
}

/* === Cards / Products === */
.card {
    background: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    text-align: center;

    /* card height control */
    min-height: 420px;
    max-height: 460px;
    overflow: hidden;

    /* structure */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;

    /* hover animation */
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}


.card-img {
    width: 100%;
    height: 180px;   /* reduce card height here */
    object-fit: cover;
    border-radius: 4px;
    display: block;  /* ensures it respects the height rule */
}

/* Fix shed page card layout */
.grid-3 {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: start;
}




/* Make the whole card behave like a clickable link */
.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card p {
    flex-grow: 0;
}


/* === Why Steel Icons === */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.icon-circle {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

/* === Card Grid Layout (fix) === */
.card-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: start;
}


/* === Gallery === */
.gallery-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.gallery-img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 4px;
}

.product-grid, .card-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: start;
}


/* === Masonry Gallery Layout === */
.gallery-wrapper {
    padding: 120px 0 60px;
}

.masonry-gallery {
    column-count: 3;
    column-gap: 18px;
}

.masonry-gallery img {
    width: 100%;
    margin-bottom: 18px;
    border-radius: 6px;
    break-inside: avoid;
    cursor: zoom-in;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
}

/* Hover effect */
.masonry-gallery img:hover {
    transform: scale(1.02);
}

/* Responsive Masonry */
@media (max-width: 900px) {
    .masonry-gallery {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .masonry-gallery {
        column-count: 1;
    }
}

/* === Lightbox === */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0px 5px 25px rgba(0,0,0,0.5);
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    font-weight: 300;
}


/* === Contact === */
.contact {
    text-align: center;
}

/* === Footer === */
.footer {
    text-align: center;
    padding: 25px;
    background: #3e3a36;
    color: white;
    margin-top: 40px;
}

/* === Fade-in animation === */
.fade-in {
    opacity: 0;
    transform: translateY(15px);
    animation: fade 0.7s ease forwards;
}

@keyframes fade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Mobile === */
@media (max-width: 800px) {

    .hero-split {
        grid-template-columns: 1fr;
    }

    .hero-image {
        height: 300px;
    }

    .hero-text {
        padding: 40px 20px;
    }

}
