/* =====================================================
   RESET
===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #f3faef;

    color: #111;

    line-height: 1.6;

}



/* =====================================================
   NAVIGATION
===================================================== */

header {

    background: #ffffff;

    position: sticky;

    top: 0;

    z-index: 1000;

    border-bottom:
        1px solid #dcebd7;

    box-shadow:
        0 2px 10px
        rgba(0, 0, 0, 0.06);

}


.navbar {

    max-width: 1200px;

    margin: auto;

    padding: 18px 25px;

    display: flex;

    justify-content:
        space-between;

    align-items: center;

}


.logo {

    font-size: 25px;

    font-weight: bold;

    color: #176b35;

}


.nav-links {

    display: flex;

    gap: 25px;

    flex-wrap: wrap;

}


.nav-links a {

    text-decoration: none;

    color: #222;

    font-weight: 500;

}


.nav-links a:hover {

    color: #176b35;

}



/* =====================================================
   HERO
===================================================== */

.hero {

    min-height:
        calc(100vh - 70px);

    display: flex;

    justify-content: center;

    align-items: center;

    text-align: center;

    position: relative;

    background:
        linear-gradient(
            135deg,
            #dff2d7,
            #c8e8bd
        );

}


.hero-content {

    max-width: 900px;

    padding: 40px;

}


.welcome {

    font-size: 25px;

    margin-bottom: 10px;

}


.hero h1 {

    font-size: 80px;

    color: #176b35;

    margin-bottom: 15px;

    font-weight: 800;

}


.subtitle {

    font-size: 24px;

    margin-bottom: 35px;

}


.explore-button {

    display: inline-block;

    background: #16803a;

    color: white;

    text-decoration: none;

    padding: 15px 30px;

    border-radius: 8px;

    font-weight: bold;

    transition: 0.2s;

}


.explore-button:hover {

    background: #0f642d;

    transform:
        translateY(-2px);

}


.developer-credit {

    position: absolute;

    right: 30px;

    bottom: 20px;

    color: #176b35;

    font-size: 13px;

}



/* =====================================================
   PAGE HEADER
===================================================== */

.page-header {

    background:
        linear-gradient(
            135deg,
            #dff2d7,
            #c8e8bd
        );

    text-align: center;

    padding: 80px 25px;

    border-bottom:
        1px solid #c9e2c1;

}


.page-header h1 {

    color: #176b35;

    font-size: 52px;

    margin-bottom: 12px;

}


.page-header p {

    font-size: 20px;

}



/* =====================================================
   SECTIONS
===================================================== */

.section {

    max-width: 1100px;

    margin: auto;

    padding: 75px 25px;

}


.section h2 {

    text-align: center;

    color: #176b35;

    font-size: 36px;

    margin-bottom: 25px;

}


.section > p {

    max-width: 800px;

    margin:
        0 auto;

    text-align: center;

}



/* =====================================================
   MAIN CARDS
===================================================== */

.cards {

    margin-top: 40px;

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 22px;

}


.card-link {

    text-decoration: none;

    color: inherit;

}


.card {

    background: #ffffff;

    padding: 30px;

    border-radius: 14px;

    text-align: center;

    border:
        1px solid #dcebd7;

    box-shadow:
        0 6px 20px
        rgba(0, 0, 0, 0.08);

    transition: 0.25s;

}


.card:hover {

    transform:
        translateY(-7px);

    border-color: #16803a;

    box-shadow:
        0 12px 30px
        rgba(0, 0, 0, 0.12);

}


.card-icon {

    font-size: 45px;

    margin-bottom: 15px;

}


.card h3 {

    color: #176b35;

    margin-bottom: 10px;

}



/* =====================================================
   FAMILY CARDS
===================================================== */

.family-list {

    max-width: 1100px;

    margin: 40px auto 0;

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 25px;

}


.family-link {

    text-decoration: none;

    color: inherit;

}


.family-card {

    background: #ffffff;

    padding: 30px 20px;

    border-radius: 14px;

    text-align: center;

    border:
        1px solid #dcebd7;

    box-shadow:
        0 6px 20px
        rgba(0, 0, 0, 0.08);

    transition: 0.25s;

}


.family-card:hover {

    transform:
        translateY(-6px);

    border-color: #16803a;

    box-shadow:
        0 12px 28px
        rgba(0, 0, 0, 0.12);

}


.family-icon {

    font-size: 42px;

    margin-bottom: 12px;

}


.family-card h3 {

    color: #176b35;

    font-size: 21px;

    margin-bottom: 8px;

}



/* =====================================================
   HOME SEARCH
===================================================== */

.home-search {

    max-width: 600px;

    margin:
        0 auto 40px;

}


.home-search input {

    width: 100%;

    padding: 15px 18px;

    border:
        1px solid #cbdac6;

    border-radius: 8px;

    font-size: 16px;

    outline: none;

}


.home-search input:focus {

    border-color: #16803a;

}



/* =====================================================
   HOME GRID
===================================================== */

.home-grid {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 25px;

}


.home-card {

    background: #ffffff;

    border-radius: 15px;

    overflow: hidden;

    border:
        1px solid #dcebd7;

    box-shadow:
        0 6px 20px
        rgba(0, 0, 0, 0.08);

    transition: 0.25s;

}


.home-card:hover {

    transform:
        translateY(-6px);

    box-shadow:
        0 12px 28px
        rgba(0, 0, 0, 0.13);

}


.home-card-image {

    width: 100%;

    height: 240px;

    object-fit: cover;

    display: block;

}


.no-photo {

    height: 240px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    background: #e8f4e3;

    font-size: 55px;

    color: #176b35;

}


.no-photo span {

    font-size: 14px;

    margin-top: 8px;

}


.home-card-content {

    padding: 22px;

}


.home-card-content h3 {

    color: #176b35;

    font-size: 21px;

    margin-bottom: 10px;

}


.home-card-content p {

    margin-bottom: 6px;

}


.home-family {

    color: #176b35;

}


.photo-type {

    display: inline-block;

    background: #e4f3df;

    color: #176b35;

    padding: 4px 9px;

    border-radius: 20px;

    font-size: 12px;

    margin-bottom: 10px;

}


.details-button {

    display: inline-block;

    margin-top: 15px;

    background: #16803a;

    color: white;

    text-decoration: none;

    padding: 10px 17px;

    border-radius: 7px;

    font-size: 14px;

    font-weight: bold;

}


.details-button:hover {

    background: #0f642d;

}



/* =====================================================
   INDIVIDUAL HOME DETAILS
===================================================== */

.home-detail-card {

    background: #ffffff;

    border-radius: 18px;

    padding: 35px;

    box-shadow:
        0 8px 30px
        rgba(0, 0, 0, 0.08);

}



/* =====================================================
   DETAIL PHOTOS
===================================================== */

.detail-photos {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 20px;

    margin-bottom: 30px;

    align-items: start;
}


.detail-photo {

    text-align: center;

}


.detail-photo img {
    width: 100%;
    height: 220px;

    object-fit: cover;

    border-radius: 14px;

    display: block;

    margin-bottom: 12px;
}


.detail-photo h3 {

    color: #176b35;

    font-size: 16px;

}



/* =====================================================
   NO DETAIL PHOTO
===================================================== */

.no-detail-photo {

    grid-column:
        1 / -1;

    text-align: center;

    padding: 60px;

    background: #e8f4e3;

    border-radius: 14px;

    color: #176b35;

    font-size: 50px;

}


.no-detail-photo p {

    font-size: 16px;

    margin-top: 10px;

}



/* =====================================================
   BASIC HOME INFORMATION
===================================================== */

.home-basic-info {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 15px;

    margin-bottom: 45px;

}


.info-box {

    background: #f3faef;

    border:
        1px solid #dcebd7;

    border-radius: 10px;

    padding: 18px;

    text-align: center;

}


.info-label {

    display: block;

    color: #777;

    font-size: 13px;

    margin-bottom: 5px;

}


.info-box strong {

    display: block;

    color: #176b35;

    font-size: 17px;

}



/* =====================================================
   ABOUT HOME & FAMILY
===================================================== */

.home-description {

    background: #f3faef;

    border-left:
        5px solid #16803a;

    border-radius: 10px;

    padding: 30px;

    margin-top: 20px;

}


.home-description h2 {

    text-align: left;

    margin-bottom: 20px;

    font-size: 28px;

}


.description-text {

    white-space: pre-line;

    line-height: 1.9;

    color: #333;

    font-size: 16px;

}



/* =====================================================
   FAMILY NAVIGATION
===================================================== */

.family-navigation {

    text-align: center;

    margin-top: 40px;

    padding-top: 30px;

    border-top:
        1px solid #dcebd7;

}


.family-navigation p {

    margin-bottom: 5px;

    color: #555;

}



/* =====================================================
   EMPTY MESSAGE
===================================================== */

.empty-message {

    text-align: center;

    color: #777;

    padding: 40px;

}


.empty-message h2 {

    color: #176b35;

    margin-bottom: 10px;

}



/* =====================================================
   FOOTER
===================================================== */

footer {

    background: #12552c;

    color: white;

    text-align: center;

    padding: 40px 25px;

}


footer p {

    margin: 7px;

}


footer strong {

    color: #72dc8a;

}



/* =====================================================
   TABLET
===================================================== */

@media (max-width: 900px) {

    .cards {

        grid-template-columns:
            repeat(2, 1fr);

    }


    .home-grid {

        grid-template-columns:
            repeat(2, 1fr);

    }


    .detail-photos {

        grid-template-columns:
            1fr 1fr;

    }


    .home-basic-info {

        grid-template-columns:
            repeat(2, 1fr);

    }

}



/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 650px) {

    .navbar {

        flex-direction: column;

        gap: 15px;

    }


    .nav-links {

        justify-content: center;

        gap: 12px;

    }


    .hero h1 {

        font-size: 48px;

    }


    .welcome {

        font-size: 20px;

    }


    .subtitle {

        font-size: 18px;

    }


    .cards {

        grid-template-columns: 1fr;

    }


    .family-list {

        grid-template-columns: 1fr;

    }


    .home-grid {

        grid-template-columns: 1fr;

    }


    .detail-photos {

        grid-template-columns:
            1fr;

    }


    .home-basic-info {

        grid-template-columns:
            1fr;

    }


    .page-header h1 {

        font-size: 38px;

    }


    .home-detail-card {

        padding: 20px;

    }


    .developer-credit {

        right: 50%;

        transform:
            translateX(50%);

        white-space: nowrap;

    }

}

/* =====================================================
   ADMIN LOGIN
===================================================== */

.admin-login-page {

    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 25px;

    background:
        linear-gradient(
            135deg,
            #dff2d7,
            #c8e8bd
        );

}


.admin-login-card {

    width: 100%;

    max-width: 430px;

    background: #ffffff;

    padding: 40px;

    border-radius: 18px;

    box-shadow:
        0 12px 40px
        rgba(0, 0, 0, 0.12);

    text-align: center;

}


.admin-icon {

    font-size: 48px;

    margin-bottom: 15px;

}


.admin-login-card h1 {

    color: #176b35;

    font-size: 32px;

    margin-bottom: 5px;

}


.admin-login-card h2 {

    color: #222;

    font-size: 24px;

    margin-bottom: 5px;

}


.admin-login-subtitle {

    color: #777;

    margin-bottom: 30px;

}


.form-group {

    text-align: left;

    margin-bottom: 20px;

}


.form-group label {

    display: block;

    margin-bottom: 7px;

    font-weight: bold;

    color: #333;

}


.form-group input {

    width: 100%;

    padding: 13px 15px;

    border:
        1px solid #ccdcca;

    border-radius: 8px;

    font-size: 16px;

    outline: none;

}


.form-group input:focus {

    border-color: #16803a;

    box-shadow:
        0 0 0 3px
        rgba(22, 128, 58, 0.10);

}


.admin-login-button {

    width: 100%;

    padding: 14px;

    border: none;

    border-radius: 8px;

    background: #16803a;

    color: #ffffff;

    font-size: 16px;

    font-weight: bold;

    cursor: pointer;

}


.admin-login-button:hover {

    background: #0f642d;

}


.login-message {

    min-height: 24px;

    margin-top: 15px;

    font-size: 14px;

}


.login-message.error {

    color: #c62828;

}


.login-message.success {

    color: #16803a;

}


.back-home {

    display: inline-block;

    margin-top: 25px;

    color: #176b35;

    text-decoration: none;

    font-size: 14px;

}


.back-home:hover {

    text-decoration: underline;

}

/* =====================================================
   ADMIN DASHBOARD
===================================================== */

.admin-header {

    background: #176b35;

    color: white;

    padding: 20px 35px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

}


.admin-header h1 {

    margin: 0;

    font-size: 28px;

}


.admin-header p {

    margin: 3px 0 0;

    opacity: 0.85;

}


.admin-header-actions {

    display: flex;

    align-items: center;

    gap: 18px;

}


#adminEmail {

    font-size: 14px;

}


.logout-button {

    background: white;

    color: #176b35;

    border: none;

    padding: 10px 18px;

    border-radius: 7px;

    font-weight: bold;

    cursor: pointer;

}


.logout-button:hover {

    background: #e8f3e9;

}


/* Dashboard */

.admin-dashboard {

    max-width: 1150px;

    margin: auto;

    padding: 40px 25px 80px;

}


/* Statistics */

.admin-stats {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 20px;

    margin-bottom: 35px;

}


.admin-stat-card {

    background: white;

    border-radius: 14px;

    padding: 25px;

    display: flex;

    align-items: center;

    gap: 20px;

    box-shadow:
        0 5px 20px
        rgba(0, 0, 0, 0.08);

}


.stat-icon {

    font-size: 40px;

}


.admin-stat-card p {

    margin: 0;

    color: #666;

}


.admin-stat-card h2 {

    margin: 3px 0 0;

    color: #176b35;

    font-size: 32px;

}


/* Sections */

.admin-form-section,
.existing-homes-section {

    background: white;

    border-radius: 15px;

    padding: 30px;

    margin-bottom: 30px;

    box-shadow:
        0 5px 20px
        rgba(0, 0, 0, 0.07);

}


.admin-section-heading {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    margin-bottom: 25px;

}


.admin-section-heading h2 {

    color: #176b35;

    margin-bottom: 5px;

}


.admin-section-heading p {

    color: #666;

}


/* Form */

.admin-form-grid {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 20px;

}


.admin-form-group {

    margin-bottom: 20px;

}


.admin-form-group label {

    display: block;

    font-weight: bold;

    margin-bottom: 7px;

    color: #333;

}


.admin-form-group input,
.admin-form-group textarea {

    width: 100%;

    padding: 13px;

    border:
        1px solid #ccdcca;

    border-radius: 8px;

    font-size: 15px;

    font-family: inherit;

    outline: none;

}


.admin-form-group input:focus,
.admin-form-group textarea:focus {

    border-color: #176b35;

    box-shadow:
        0 0 0 3px
        rgba(23, 107, 53, 0.10);

}


.admin-form-group textarea {

    resize: vertical;

}


/* Photos */

.photo-upload-section {

    margin-top: 10px;

    padding: 25px;

    background: #f4faf2;

    border-radius: 12px;

}


.photo-upload-section h3 {

    margin-bottom: 5px;

    color: #176b35;

}


.photo-help {

    color: #666;

    font-size: 14px;

    margin-bottom: 20px;

}


/* Buttons */

.save-home-button {

    background: #176b35;

    color: white;

    border: none;

    padding: 14px 25px;

    border-radius: 8px;

    font-size: 16px;

    font-weight: bold;

    cursor: pointer;

}


.save-home-button:hover {

    background: #0f572a;

}


.save-home-button:disabled {

    opacity: 0.6;

    cursor: not-allowed;

}


.cancel-button {

    background: #eeeeee;

    color: #333;

    border: none;

    padding: 10px 18px;

    border-radius: 7px;

    cursor: pointer;

}


.cancel-button:hover {

    background: #dddddd;

}


/* Messages */

.form-message {

    margin-top: 15px;

    font-weight: bold;

}


.form-message.success {

    color: #176b35;

}


.form-message.error {

    color: #c62828;

}


/* Existing Homes */

.admin-homes-list {

    display: grid;

    gap: 18px;

}


.admin-home-card {

    display: grid;

    grid-template-columns: 160px 1fr;

    gap: 22px;

    border:
        1px solid #e1e8df;

    border-radius: 12px;

    padding: 18px;

}


.admin-home-image {

    width: 160px;

    height: 130px;

    border-radius: 10px;

    overflow: hidden;

    background: #e8f3e5;

}


.admin-home-image img {

    width: 100%;

    height: 100%;

    object-fit: cover;

}


.no-photo {

    width: 100%;

    height: 100%;

    display: flex;

    justify-content: center;

    align-items: center;

    font-size: 40px;

}


.admin-home-info h3 {

    margin-bottom: 3px;

    color: #222;

}


.admin-home-info p {

    margin: 5px 0;

    color: #555;

}


.family-name {

    color: #176b35 !important;

    font-weight: bold;

}


.admin-home-actions {

    display: flex;

    gap: 10px;

    margin-top: 12px;

}


.edit-home-button,
.delete-home-button {

    border: none;

    padding: 9px 16px;

    border-radius: 7px;

    cursor: pointer;

    font-weight: bold;

}


.edit-home-button {

    background: #e2f0e3;

    color: #176b35;

}


.delete-home-button {

    background: #fde8e8;

    color: #b71c1c;

}


.loading-text,
.empty-homes {

    text-align: center;

    padding: 35px;

    color: #777;

}


.empty-homes div {

    font-size: 50px;

    margin-bottom: 10px;

}


.empty-homes h3 {

    color: #176b35;

}


/* Mobile */

@media (max-width: 700px) {

    .admin-header {

        flex-direction: column;

        align-items: flex-start;

    }


    .admin-header-actions {

        width: 100%;

        justify-content: space-between;

    }


    .admin-stats {

        grid-template-columns: 1fr;

    }


    .admin-form-grid {

        grid-template-columns: 1fr;

    }


    .admin-home-card {

        grid-template-columns: 1fr;

    }


    .admin-home-image {

        width: 100%;

        height: 200px;

    }


    .admin-form-section,
    .existing-homes-section {

        padding: 20px;

    }

}
/* =====================================================
   FINAL PHOTO SIZE FIX
   Paste this at the VERY BOTTOM of style.css
===================================================== */


/* Home details main white card */

.home-detail-card {
    background: #ffffff;

    border-radius: 18px;

    padding: 30px;

    box-shadow:
        0 8px 30px
        rgba(0, 0, 0, 0.08);

    overflow: hidden;
}


/* =====================================================
   HOME / OWNER / FAMILY PHOTOS
===================================================== */

.detail-photos {
    width: 100%;

    max-width: 950px;

    margin:
        0 auto 35px;

    display: grid;

    /*
       Automatically arrange the photos.

       1 photo  = centered
       2 photos = centered side by side
       3 photos = centered side by side
    */

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(260px, 320px)
        );

    justify-content: center;

    gap: 25px;

    align-items: start;
}


/* Individual photo box */

.detail-photo {
    width: 100%;

    max-width: 320px;

    text-align: center;
}


/* IMPORTANT PHOTO FIX */

.detail-photo img {
    width: 100%;

    /*
       Reducing the height makes
       the page much shorter.
    */

    height: 230px;

    /*
       contain means:
       SHOW THE COMPLETE PHOTO.

       It will NOT cut the owner's
       head/body or crop the house.
    */

    object-fit: contain;

    object-position: center;

    display: block;

    background: #f3faef;

    border:
        1px solid #dcebd7;

    border-radius: 14px;

    padding: 4px;

    margin-bottom: 10px;
}


/* Photo title */

.detail-photo h3 {
    color: #176b35;

    font-size: 17px;

    font-weight: bold;

    margin-top: 5px;
}


/* =====================================================
   HOME INFORMATION BOXES
===================================================== */

.home-basic-info {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 15px;

    margin-top: 20px;

    margin-bottom: 35px;
}


.info-box {
    background: #f3faef;

    border:
        1px solid #dcebd7;

    border-radius: 12px;

    padding: 18px 12px;

    text-align: center;

    min-height: 110px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;
}


.info-label {
    display: block;

    color: #777777;

    font-size: 13px;

    margin-bottom: 7px;
}


.info-box strong {
    display: block;

    color: #176b35;

    font-size: 17px;

    line-height: 1.4;
}


/* =====================================================
   ABOUT HOME & FAMILY
===================================================== */

.home-description {
    width: 100%;

    background: #f3faef;

    border-left:
        5px solid #16803a;

    border-radius: 10px;

    padding: 25px;

    margin-top: 10px;
}


.home-description h2 {
    color: #176b35;

    text-align: left;

    font-size: 27px;

    margin-bottom: 15px;
}


.description-text {
    white-space: pre-line;

    line-height: 1.8;

    color: #333333;

    font-size: 16px;
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 900px) {

    .detail-photos {
        grid-template-columns:
            repeat(
                auto-fit,
                minmax(240px, 300px)
            );
    }


    .detail-photo {
        max-width: 300px;
    }


    .detail-photo img {
        height: 220px;
    }


    .home-basic-info {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 650px) {

    .home-detail-card {
        padding: 18px;
    }


    .detail-photos {
        grid-template-columns:
            1fr;

        gap: 22px;
    }


    .detail-photo {
        width: 100%;

        max-width: 340px;

        margin:
            0 auto;
    }


    .detail-photo img {
        width: 100%;

        height: 230px;

        object-fit: contain;
    }


    .home-basic-info {
        grid-template-columns:
            1fr;
    }

}
/* =====================================================
   FINAL HOME CARD PHOTO FIX
   Show the COMPLETE house photo without cropping
===================================================== */

.home-card-image {
    width: 100%;

    height: 280px;

    object-fit: contain;

    object-position: center;

    display: block;

    background: #f3faef;

    padding: 6px;
}


/* Slightly bigger card so full house image looks good */

.home-card {
    overflow: hidden;
}


/* Tablet */

@media (max-width: 900px) {

    .home-card-image {
        height: 260px;
    }

}


/* Mobile */

@media (max-width: 650px) {

    .home-card-image {
        height: 240px;
    }

}