/* ══════════════════════════════════════════
   contact.css  –  Housing Málaga
   ══════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --gold:        #B17F03;
    --gold-light:  #D4A017;
    --gold-pale:   #f5ead0;
    --dark:        #1a1a1a;
    --dark-mid:    #2c2c2c;
    --off-white:   #faf8f4;
    --text-body:   #444;
    --border:      #e2d9c8;
    --radius:      10px;
    --font-head:   'Poiret One', sans-serif;
    --font-body:   'Outfit', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--off-white);
    color: var(--text-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ══ HEADER ══ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #f8f7f7;
    border-bottom: 1px solid #faf6f6;
}
.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.logo { height: 42px; width: auto; }
.nav-menu {
    list-style: none;
    display: flex;
    gap: 0.5rem;
}
.nav-link {
    display: block;
    padding: 0.45rem 1rem;
    color: #413f3f;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--gold-light); }
.nav-menu-link_active { color: var(--gold) !important; }

.dropdown { position: relative; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--off-white);
    border: 1px solid #faf8f8;
    border-radius: var(--radius);
    padding: 0.8rem 0 0.4rem;
    min-width: 200px;
    list-style: none;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu-item .nav-link { padding: 0.5rem 1.2rem; border-radius: 0; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #ccc;
    border-radius: 2px;
    transition: background 0.2s;
}
.nav-toggle:hover span { background: var(--gold); }

/* ══ HERO ══ */
.hero {
    background: var(--dark);
    padding: 6rem 2rem 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 80%, rgba(241,240,236,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.hero-eyebrow {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.2rem;
    opacity: 0.85;
}
.hero-title {
    font-family: var(--font-head);
    font-size: clamp(2.8rem, 6vw, 5rem);
    color: #fff;
    line-height: 1.1;
    margin-bottom: 1.2rem;
}
.hero-subtitle {
    font-size: 1.05rem;
    color: #faf6f6;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ══ LAYOUT ══ */
.contact-section {
    flex: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 2rem;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 4rem;
    align-items: start;
}

/* ══ INFO LATERAL ══ */
.section-label {
    display: inline-block;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}
.contact-info h2 {
    font-family: var(--font-head);
    font-size: 2.1rem;
    color: var(--dark);
    line-height: 1.2;
    margin-bottom: 1.2rem;
}
.contact-info p {
    color: #666;
    line-height: 1.75;
    font-size: 0.97rem;
    margin-bottom: 2.5rem;
}

.info-items { display: flex; flex-direction: column; gap: 1.4rem; }
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.info-icon {
    width: 42px;
    height: 42px;
    background: var(--gold-pale);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.info-icon svg { width: 18px; height: 18px; }
.info-text strong {
    display: block;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dark);
    margin-bottom: 0.25rem;
}
.info-text a,
.info-text span {
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.5;
}
.info-text a:hover { color: var(--gold); }

.divider {
    width: 40px;
    height: 2px;
    background: var(--gold);
    margin: 2.5rem 0;
    border-radius: 2px;
}

.horario {
    background: var(--dark);
    border-radius: var(--radius);
    padding: 1.5rem;
    color: #ccc;
}
.horario strong {
    display: block;
    color: var(--gold);
    font-size: 0.78rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}
.horario p { margin: 0; color: #aaa; font-size: 0.92rem; line-height: 1.8; }

/* ══ FORMULARIO ══ */
.contact-form-wrap {
    background: #fff;
    border-radius: 16px;
    padding: 2.8rem 2.5rem;
    box-shadow: 0 4px 40px rgba(0,0,0,0.07);
    border: 1px solid var(--border);
}
.form-title {
    font-family: var(--font-head);
    font-size: 1.6rem;
    color: var(--dark);
    margin-bottom: 0.4rem;
}
.form-subtitle {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 2rem;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-group { display: flex; flex-direction: column; margin-bottom: 1.4rem; }
.form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dark-mid);
    margin-bottom: 0.5rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--off-white);
    color: var(--dark);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(177,127,3,0.12);
    background: #fff;
}
.form-group textarea {
    resize: vertical;
    min-height: 130px;
    line-height: 1.6;
}
.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23B17F03' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.btn-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--gold);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.4rem;
}
.btn-submit:hover:not(:disabled) {
    background: var(--gold-light);
    box-shadow: 0 4px 20px rgba(177,127,3,0.35);
    transform: translateY(-1px);
}
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Spinner */
.spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Mensajes de estado */
.form-status {
    display: none;
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
}
/* Estilo para éxito */
.form-status.success {
    background-color: #e7f4e9;
    color: #2e7d32;
    border: 1px solid #c3e6cb;
}
/* Estilo para error */
.form-status.error {
    background-color: #fdeaea;
    color: #c62828;
    border: 1px solid #f5c6cb;
}
/* ══ MAPA ══ */
.map-section {
    padding: 0 2rem 5rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}
.map-section h3 {
    font-family: var(--font-head);
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 1.2rem;
}
.map-frame {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.map-frame iframe { display: block; width: 100%; height: 320px; border: none; }

/* ══ FOOTER ══ */
.footer {
    background-color: #203030;
    color: white;
    padding: 40px 0 20px;
    position: relative;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px 30px;
}
.footer-logo img { width: 120px; height: auto; }
.footer-links ul { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}
.footer-links a:hover { color: #ccc; }
.footer-copy {
    text-align: center;
    font-size: 14px;
    margin-top: 20px;
    padding: 0 20px;
}
.footer-address {
    text-align: center;
    font-size: 13px;
    margin-top: 10px;
    color: rgba(255,255,255,0.7);
    padding: 0 20px;
}

/* ══ FADE-IN ══ */
.fade-in {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible { opacity: 1; transform: none; }

/* ══ RESPONSIVE ══ */
@media (max-width: 820px) {
    .contact-section { grid-template-columns: 1fr; gap: 2.5rem; }
    .form-row { grid-template-columns: 1fr; }
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--dark-mid);
        padding: 1rem;
        gap: 0.2rem;
    }
    .nav-menu.open { display: flex; }
    .nav-toggle { display: flex; }
    .nav { position: relative; }
    .footer-container { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
    .contact-form-wrap { padding: 2rem 1.4rem; }
    .hero { padding: 4rem 1.5rem 3.5rem; }
}
