/* Inversiones Baja Sur — portal público
   Paleta inspirada en el paisaje de BCS: mar profundo, tierra y sal. */

:root{
    --bg: #FAF7F1;
    --ink: #20221E;
    --ink-soft: #55584F;
    --teal: #0E3B39;
    --teal-dark: #0A2B29;
    --clay: #BE5F2A;
    --sand-line: #E3D8C4;
    --white: #FFFFFF;
    --radius: 4px;
    --max-width: 1120px;
}

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600&family=Work+Sans:wght@400;500;600&display=swap');

*{ box-sizing: border-box; }

body{
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Work Sans', -apple-system, sans-serif;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display{
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 0.5em 0;
    color: var(--teal-dark);
}

h1{ font-size: clamp(2rem, 4vw, 3.1rem); }
h2{ font-size: clamp(1.5rem, 2.5vw, 2.1rem); }

p{ margin: 0 0 1em 0; max-width: 68ch; }

a{ color: var(--teal); }

.wrap{
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header{
    border-bottom: 1px solid var(--sand-line);
    background: var(--bg);
}
.site-header .wrap{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    padding-bottom: 20px;
}
.site-header .logo{
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--teal-dark);
    text-decoration: none;
}
.site-header nav{
    display: flex;
    align-items: center;
    gap: 28px;
}
.site-header nav a{
    color: var(--ink);
    text-decoration: none;
    font-size: 0.95rem;
}
.site-header nav a:hover{ color: var(--teal); }
.site-header nav .lang-switch{
    border: 1px solid var(--sand-line);
    border-radius: var(--radius);
    padding: 4px 10px;
    color: var(--ink-soft);
}
.site-header nav .portal-link{
    color: var(--ink-soft);
    font-size: 0.85rem;
}

/* Hero con fondo animado (marcador de posición genérico -- reemplazar
   por foto/video/GIF real cuando esté disponible, ver comentario en el
   HTML de es/index.php y en/index.php) */
.hero{
    position: relative;
    overflow: hidden;
    padding: 0;
    border-bottom: none;
    min-height: 460px;
    display: flex;
    align-items: center;
}
.hero-bg{
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(120deg, var(--teal-dark), var(--teal) 45%, var(--clay) 100%);
    background-size: 260% 260%;
    animation: heroGradient 16s ease infinite;
}
@keyframes heroGradient{
    0%{ background-position: 0% 50%; }
    50%{ background-position: 100% 50%; }
    100%{ background-position: 0% 50%; }
}
@media (prefers-reduced-motion: reduce){
    .hero-bg{ animation: none; }
}
.hero-content{
    position: relative;
    z-index: 1;
    padding: 84px 0;
}
.hero-content h1{ color: var(--white); }
.hero-content p{ color: rgba(255,255,255,0.88); font-size: 1.15rem; }

/* Services grid on the homepage */
.service-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-top: 32px;
}
.service-card{
    background: var(--white);
    border: 1px solid var(--sand-line);
    border-radius: var(--radius);
    padding: 24px;
}
.service-card h3{ font-size: 1.1rem; margin-bottom: 8px; }
.service-card p{ font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 16px; }
.service-card a{
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--clay);
    text-decoration: none;
}
.service-card a:hover{ text-decoration: underline; }

/* Buttons */
.btn{
    display: inline-block;
    background: var(--clay);
    color: var(--white);
    text-decoration: none;
    padding: 12px 22px;
    border-radius: var(--radius);
    font-weight: 500;
    border: none;
    font-size: 0.98rem;
    cursor: pointer;
}
.btn:hover{ background: #A34F21; }
.btn-outline{
    background: transparent;
    color: var(--teal-dark);
    border: 1px solid var(--teal-dark);
}
.btn-outline:hover{ background: var(--teal-dark); color: var(--white); }

/* Sections */
.section{ padding: 56px 0; }
.section-alt{ background: var(--white); border-top: 1px solid var(--sand-line); border-bottom: 1px solid var(--sand-line); }

/* Property grid */
.property-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 32px;
}
.property-card{
    border: 1px solid var(--sand-line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
}
.property-card img{
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
    background: var(--sand-line);
}
.property-card .body{ padding: 16px; }
.property-card h3{ font-size: 1.05rem; margin-bottom: 4px; }
.property-card .price{
    color: var(--clay);
    font-weight: 600;
    font-family: 'Fraunces', serif;
}
.property-card .location{ color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 12px; }

/* Contact form */
.contact-form{ max-width: 540px; margin-top: 24px; }
.contact-form label,
.tour-form label:not(.toggle-row):not(.consent-row){
    display: block;
    font-size: 0.9rem;
    color: var(--ink-soft);
    margin-bottom: 6px;
}
.contact-form .field,
.tour-form .field{ margin-bottom: 18px; }
.contact-form input,
.contact-form textarea,
.tour-form input[type="text"],
.tour-form input[type="email"],
.tour-form input[type="tel"],
.tour-form input[type="date"]{
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--sand-line);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    background: var(--white);
}
.contact-form textarea{ min-height: 120px; resize: vertical; }
.contact-form .notice{
    padding: 12px 14px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    font-size: 0.95rem;
}
.contact-form .notice.success{ background: #E7F0E4; color: #2F5D2A; }
.contact-form .notice.error{ background: #F6E6E1; color: #8A3A22; }

/* Property summary shown on the contact page when arriving from
   "Ask about this property" */
.property-summary{
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--sand-line);
    border-radius: var(--radius);
    padding: 16px;
    margin: 24px 0;
    max-width: 540px;
}
.property-summary img{
    width: 96px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
}
.property-summary .eyebrow{
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--clay);
    margin-bottom: 2px;
}
.property-summary h3{ font-size: 1rem; margin: 0 0 2px 0; }
.property-summary .location{ font-size: 0.85rem; color: var(--ink-soft); }
.property-summary .price{
    font-family: 'Fraunces', serif;
    font-weight: 600;
    color: var(--clay);
    margin-top: 4px;
}

/* FAQ */
.faq-item{
    border-bottom: 1px solid var(--sand-line);
    padding: 20px 0;
}
.faq-item h3{ font-size: 1.05rem; margin-bottom: 6px; }
.faq-item p{ color: var(--ink-soft); }

/* Footer */
.site-footer{
    padding: 32px 0;
    color: var(--ink-soft);
    font-size: 0.88rem;
}

/* Tour request section */
.tour-section{
    background: var(--white);
    border-top: 1px solid var(--sand-line);
    border-bottom: 1px solid var(--sand-line);
    padding: 56px 0;
    margin-top: 40px;
}
.tour-steps{
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin: 24px 0 36px;
}
.tour-step{
    display: flex;
    align-items: center;
    gap: 12px;
}
.tour-step .num{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--clay);
    color: var(--clay);
    font-family: 'Fraunces', serif;
    font-size: 0.95rem;
    font-weight: 600;
    flex-shrink: 0;
}
.tour-step .label{
    font-size: .92rem;
    color: var(--ink-soft);
}
.tour-form{
    background: var(--white);
    border: 1px solid var(--sand-line);
    border-radius: 4px;
    padding: 28px;
}
.tour-form fieldset{
    border: none;
    padding: 20px 0 0 0;
    margin: 0 0 8px 0;
    border-top: 1px solid var(--sand-line);
}
.tour-form fieldset:first-of-type{ border-top: none; padding-top: 0; }
.tour-form legend{
    font-family: 'Work Sans', sans-serif;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--clay);
    margin-bottom: 16px;
    padding: 0;
    width: 100%;
}
.tour-form .toggle-row{
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--bg);
    border: 1px solid var(--sand-line);
    border-radius: 4px;
    padding: 14px 16px;
    margin-bottom: 24px;
    cursor: pointer;
}
.tour-form .toggle-row input{ margin-top: 4px; }
.tour-form .toggle-row .toggle-title{ font-weight: 600; }
.tour-form .toggle-row .toggle-hint{ font-size: .85rem; color: var(--ink-soft); }
.tour-form .field-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 4px;
}
.tour-form select{
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--sand-line);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--white);
}
.tour-form .consent-row{
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .88rem;
    color: var(--ink-soft);
    margin: 16px 0;
    cursor: pointer;
}
.tour-form .consent-row input{ margin-top: 3px; }
.tour-form button[type="submit"]{
    width: 100%;
    margin-top: 8px;
}

/* Property detail gallery: one large image + clickable thumbnails */
.property-gallery{ margin: 20px 0; }
.property-gallery-main{
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--sand-line);
    display: block;
    background: var(--sand-line);
}
.property-gallery-thumbs{
    display: flex;
    gap: 10px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.property-gallery-thumbs img{
    width: 92px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: .75;
    flex-shrink: 0;
}
.property-gallery-thumbs img:hover{ opacity: 1; }
.property-gallery-thumbs img.active{
    border-color: var(--clay);
    opacity: 1;
}
@media (max-width: 640px){
    .property-gallery-main{ height: 260px; }
}

@media (max-width: 640px){
    .site-header .wrap{ flex-direction: column; gap: 14px; align-items: flex-start; }
    .site-header nav{ flex-wrap: wrap; gap: 16px; }
}