/* Residential page redesign */
.residential-header {
    background: linear-gradient(135deg, var(--navy-blue) 0%, rgba(10, 26, 46, 0.95) 100%);
    padding: 2.5rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.residential-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.residential-header::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -100px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.back-to-home-link {
    position: absolute;
    top: 0;
    left: 0;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.3s ease, transform 0.2s ease;
    padding: 0.5rem 0;
    display: inline-block;
}

.back-to-home-link:hover {
    color: rgba(255, 255, 255, 0.9);
    transform: translateX(-3px);
}

.header-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.header-logo-container:hover {
    transform: scale(1.02);
}

.header-logo-container:visited {
    color: inherit;
}

.header-logo {
    max-width: 140px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(212, 175, 55, 0.3));
}

.header-logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header-logo-text h1 {
    font-size: 4.2rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    line-height: 1.1;
}

.header-logo-text p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    letter-spacing: 1px;
    font-weight: 300;
}

.header-tagline {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.header-tagline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--gold-light) 50%, transparent 100%);
}

.header-nav {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.header-nav-link {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
    cursor: default;
    letter-spacing: 0.3px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

/* Only apply hover effect when these are links */
a.header-nav-link:hover {
    color: var(--gold-light);
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

/* Masonry Gallery */
.carousel-section {
    background: var(--navy-blue);
    padding: 3rem 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: auto;
}

.carousel-container {
    width: 100%;
    max-width: 1100px;
}

.carousel-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
    grid-auto-rows: 280px;
}

.carousel-slide {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carousel-slide:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.carousel-slide:hover .carousel-image-overlay {
    opacity: 1;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.carousel-slide:hover .carousel-image {
    transform: scale(1.05);
}

.carousel-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.carousel-image-overlay::after {
    content: '🔍';
    font-size: 2.5rem;
    color: white;
}

.carousel-button {
    display: none;
}

.carousel-indicators {
    display: none;
}

/* Lightbox Modal */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-lightbox.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 1001;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 1001;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.4);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Stats section wrapper on residential page */
.stats-bar-section {
    background: var(--bg-light);
    padding: 4rem 1.25rem;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

/* Residential page tweaks */
.residential-page .page-container {
    background: var(--bg-light);
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.residential-page .form-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.residential-page .page-title {
    color: var(--text-dark);
    font-size: 2.5rem;
}

.residential-page .page-subtitle {
    color: var(--text-light);
}

