@import 'variables.css';

/* Navigation */
#navbar-placeholder {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 var(--spacing-md);
    height: 70px;
    width: 94%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-weight: 600;
    /* Matches h1/h2 weight */
    font-size: 1.25rem;
    color: var(--color-text-main);
    gap: var(--spacing-sm);
    justify-self: start;
}

.nav-brand span {
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    letter-spacing: -0.02em;
}

.nav-brand img {
    height: 32px;
    width: auto;
}

.nav-center {
    display: flex;
    gap: calc(var(--spacing-lg) * 1.7);
    align-items: center;
    justify-self: center;
}

.nav-right {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 15px;
    /* Spacing between CTA and Mobile Menu */
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

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

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--color-text-main);
    background: none;
}

/* Mobile Menu Dropdown (Global) */
.mobile-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.mobile-menu.active {
    display: flex;
    animation: slideDown 0.3s ease forwards;
}

.mobile-nav-link {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text-main);
    text-decoration: none;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

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

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

/* Footer */
.footer {
    background: white;
    padding: var(--spacing-2xl) 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: var(--spacing-2xl);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-xl);
}

.footer-col h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: var(--spacing-sm);
}

.footer-col a {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

.footer-bottom {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    color: var(--color-text-light);
    font-size: 0.875rem;
}

/* Buttons & Badges */
.app-store-badge {
    background-color: #000;
    color: #fff;
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 8px;
    /* Standard badge radius */
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-store-badge:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.badge-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    fill: currentColor;
}

.badge-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.badge-small {
    font-size: 0.625rem;
    font-weight: 400;
}

.badge-large {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.btn-secondary {
    background: white;
    color: var(--color-primary);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    border-radius: var(--border-radius-pill);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #f5f5f7;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .navbar {
        display: flex;
        justify-content: space-between;
        /* Ensure distinct left/right alignment */
        padding-left: 30px !important;
        padding-right: 30px !important;
        width: 100%;
    }

    .nav-center {
        display: none;
    }

    .nav-right .app-store-badge {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        margin-left: auto;
        /* Force explicit right alignment just in case */
    }
}

/* Image Comparison Slider Styles */
.img-comp-container {
    position: relative;
    height: 400px;
    /* Fixed height for consistency */
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    cursor: col-resize;
}

.img-comp-img {
    position: absolute;
    width: auto;
    height: 100%;
    overflow: hidden;
    /* Default width logic handled by JS or override below */
    width: 100%;
}

.img-comp-img img {
    display: block;
    height: 100%;
    width: 100%;
    object-fit: cover;
    min-width: 100%;
    /* Important: Ensure both images are exactly same size/position */
}

.img-comp-overlay {
    width: 50%;
    /* JS will override */
    z-index: 2;
    border-right: 1px solid rgba(255, 255, 255, 0.8);
}

.img-comp-slider {
    position: absolute;
    z-index: 9;
    cursor: ew-resize;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid white;
    top: 50%;
    transform: translateY(-50%);
}

.prompt-pill {
    display: inline-block;
    margin-top: var(--spacing-md);
    background: rgba(255, 255, 255, 0.4);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* Blog Carousel */
.blog-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 40px;
    /* Increased padding to capture hover shadows */
    margin: -40px;
    /* Negative margin to offset padding visually in the layout */
    /* Ensure overflow doesn't clip unless necessary */
}

@media (max-width: 768px) {
    .blog-carousel {
        display: flex;
        /* Switch to flex for horizontal scroll on mobile */
        grid-template-columns: unset;
        flex-wrap: nowrap;
        scroll-snap-type: x mandatory;
        padding-right: 20px;
        /* Padding for scroll end */
    }

    .carousel-card {
        min-width: 280px;
        scroll-snap-align: start;
    }
}

/* Blog Article Images */
.article-image {
    width: 100%;
    margin: 40px 0;
}

.article-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: block;
}

.article-image-hero {
    margin-bottom: 40px;
}

.article-image-caption {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* Blog Article Layout */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 120px 20px 100px;
}

@media (max-width: 768px) {
    .article-container {
        padding: 120px 30px 100px !important;
        /* Explicit increase to 30px horizontal */
    }
}

/* Renovation Insights Section */
.blog-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    /* Increased gap for cleaner look */
    margin-top: 40px;
}

@media (max-width: 900px) {
    .blog-preview-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.blog-preview-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.blog-preview-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.65);
}

.blog-card-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    position: relative;
    background-color: #f0f0f0;
}

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

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

.blog-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
}

/* Minimalist Title */
.blog-card-title {
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--color-text-main);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}