/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Poppins', Arial, Helvetica, sans-serif;
    line-height: 1.5;
    background-color: #f8f8f8;
    color: #333;

    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
    text-align: center;
}

/* Navigation */
nav {
    background-color: #34495e;
    padding: 0.5rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

nav li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

nav li a:hover {
    text-decoration: underline;
}

/* Section titles */
section h2 {
    margin: 1rem;
    text-align: center;
    font-weight: 600;
}

/* Articles list */
#articles.list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

#nores {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Each article card */
#articles.list > article {
    display: flex;
    align-items: stretch;   /* content matches image height */
    gap: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem;
}

/* Article photo */
.article-photo {
    width: 200px;
    height: 150px;
    border-radius: 8px;
    object-fit: cover;
}

/* Content */
.article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* footer at bottom */
}

/* Article header */
article h3 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

article p {
    margin-bottom: 1rem;
}

/* Article footer */
.article-content footer {
    display: flex;
    justify-content: space-between; /* price left, actions right */
    align-items: center;
    margin-top: 1rem;
}

/* Price styling */
.article-content footer .price p {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

/* Contact actions */
.article-content footer .actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Phone link */
.article-content footer .actions .phone {
    color: #2c3e50;
    font-weight: 600;
    text-decoration: none;
}
.article-content footer .actions .phone:hover {
    text-decoration: underline;
}

/* Contact button */
.article-content footer .actions .contact-btn {
    background: #e67e22;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}
.article-content footer .actions .contact-btn:hover {
    background: #d35400;
}

/* Pagination footer */
section > footer {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    max-width: 1000px;
    margin: 1rem auto;
}

/* Page footer */
body > footer {
    margin-top: 2rem;
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

/* ---- buscar.html search bar ---- */
.search-bar {
    max-width: 1000px;
    margin: 1rem auto;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);

    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
    align-items: flex-end;
}

.search-bar .search-field {
    display: flex;
    flex-direction: column;
    flex: 1 1 150px;
    min-width: 120px;
}

.search-bar .search-field label {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #2c3e50;
    font-size: 0.9rem;
}

.search-bar .search-field input,
.search-bar .search-field select {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
}

.search-bar button {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    align-self: flex-end;
}
.search-bar button:hover {
    background: #34495e;
}

/* Highlighted price fields */
.search-bar .price-fields {
    display: flex;
    gap: 1rem;
    width: 100%;
    padding: 0.75rem;
    background-color: #f5e6d3;
    border-radius: 8px;
    margin-bottom: 1rem;
    justify-content: flex-start;
}

.search-bar .price-fields .search-field input {
    font-weight: bold;
    border: 2px solid #e67e22;
    background-color: #fff3e0;
}

.search-bar .search-field:not(.price-fields .search-field) input,
.search-bar .search-field:not(.price-fields .search-field) select {
    border: 1px solid #ccc;
    background-color: white;
}

/* Property links */
a.property-link {
    color: rgb(75, 105, 255);
    text-decoration: none;
    font-weight: 600;
}

a.property-link.visited {
    color: rgb(100, 7, 100);
}

a.property-link:hover {
    text-decoration: underline;
}

/* Icons */
.heart {
    color: crimson;
    margin-left: 0.5rem;
    font-size: 1.1rem;
}

.price-drop {
    color: green;
    font-weight: bold;
    margin-left: 0.5rem;
}

a {
    color: #ccc;
}

/* Hero section (index.html) */
.hero {
    background-color: rgb(188, 186, 220);
    
    text-align: center;
    padding: 4rem 2rem;
}
.hero h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}
.hero p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}
.btn-primary {
    background: #e67e22;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}
.btn-primary:hover {
    background: #d35400;
}

/* Services section */
.services {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 1rem;
    text-align: center;
}
.service-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.service-list article {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}


article h3 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

article p {
    margin-bottom: 1rem;
}

/* Property Page */
.property-page {
    max-width: 1000px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.property-page h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 600;
}

/* Image gallery */.gallery {
    display: grid;
    grid-template-columns: 2fr 1fr; /* grande a la izquierda, columna a la derecha */
    gap: 1rem;
    margin-bottom: 2rem;
}

.gallery .big-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    min-height: 380px; /* para que se vea bien más grande */
}

.gallery .small-photos {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gallery .small-photos img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

/* Info sections */
.property-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.property-info h3 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.property-info .summary ul {
    list-style: none;
    padding: 0;
}

.property-info .summary li {
    margin-bottom: 0.5rem;
}

/* Description */
.property-info .description p {
    line-height: 1.6;
    color: #444;
}

/* Contact Area */
.contact-area {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.contact-area .phone {
    color: #2c3e50;
    font-weight: 600;
    text-decoration: none;
}

.contact-area .phone:hover {
    text-decoration: underline;
}

.contact-area .contact-btn {
    background: #e67e22;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.contact-area .contact-btn:hover {
    background: #d35400;
}

