/* =====================================================
   RUIZ ASOCIADOS - ESTILOS COMPARTIDOS (styles.css)
   ===================================================== */

/* --- VARIABLES DE DISEÑO --- */
:root {
    --primary: rgb(42, 134, 70);
    --accent: rgb(75, 167, 85);
    --bg-light: rgb(238, 238, 238);
    --text-dark: #2c2c2c;
    --text-grey: #666666;
    --white: #ffffff;
    --whatsapp-green: #25d366;
    --shadow: 0 15px 40px rgba(42, 134, 70, 0.15);
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    cursor: pointer;
}

ul { list-style: none; }

/* --- HEADER / NAVEGACIÓN --- */
header {
    background: var(--white);
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 110px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

/* Botón Hamburguesa */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

nav ul {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

nav a {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s;
}

nav a:hover,
nav a.active-link {
    color: var(--primary);
}

nav a:hover::after,
nav a.active-link::after {
    width: 100%;
}

.btn-contact {
    background: var(--primary);
    color: var(--white) !important;
    padding: 0.7rem 1.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid var(--primary);
}

.btn-contact:hover {
    background: var(--white);
    color: var(--primary) !important;
    border-color: var(--primary);
}

.btn-contact::after { display: none; }

.btn-login-nav {
    background: transparent;
    padding: 0.7rem 1.4rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid var(--primary);
    color: var(--primary) !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-login-nav:hover {
    background: var(--primary);
    color: var(--white) !important;
}

.btn-login-nav::after { display: none; }

/* Menú Responsive */
@media (max-width: 992px) {
    .menu-toggle { display: block; }

    header {
        flex-direction: row;
        padding: 0 5%;
    }

    nav {
        position: fixed;
        top: 110px;
        right: -100%;
        width: 100%;
        height: auto;
        background: var(--white);
        transition: var(--transition);
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    nav.active { right: 0; }

    nav ul {
        flex-direction: column;
        gap: 0;
    }

    nav ul li {
        width: 100%;
        text-align: center;
    }

    nav a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid #f5f5f5;
    }

    .btn-contact {
        display: block;
        margin: 1.5rem auto 0;
        width: fit-content;
    }
}

/* --- SECCIONES GENÉRICAS --- */
.page-wrapper {
    padding-top: 110px;
    min-height: 80vh;
}

.section-padding { padding: 5rem 5%; }

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.section-title p {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* --- TARJETAS DE PROPIEDAD --- */
.property-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    border-bottom: 3px solid transparent;
}

.property-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-10px);
    border-bottom: 3px solid var(--accent);
}

.card-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.property-card:hover .card-image img { transform: scale(1.1); }

.tag {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--white);
    color: var(--primary);
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.card-details { padding: 2rem; }

.price {
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

.card-details h3 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
}

.address {
    color: var(--text-grey);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.address i { color: var(--accent); }

.features {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #f0f0f0;
    padding-top: 1.2rem;
    color: var(--text-grey);
    font-size: 0.9rem;
}

.features i {
    color: var(--primary);
    margin-right: 5px;
}

/* --- FORMULARIOS --- */
.form-group { margin-bottom: 1.5rem; }

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Lato', sans-serif;
    background: #fbfbfb;
    transition: 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--white);
}

/* --- BOTÓN BÚSQUEDA --- */
.btn-search {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Lato', sans-serif;
}

.btn-search:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42, 134, 70, 0.3);
}

/* --- FOOTER --- */
footer {
    background: var(--primary);
    color: var(--white);
    padding: 5rem 5% 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 4rem auto;
}

.footer-brand {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--white);
}

.footer-brand span { opacity: 0.5; }

.footer-col h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    letter-spacing: 1px;
    border-left: 3px solid var(--accent);
    padding-left: 15px;
}

.footer-col ul li { margin-bottom: 0.8rem; }

.footer-col ul li a { color: rgba(255, 255, 255, 0.8); }

.footer-col ul li a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    line-height: 35px;
    text-align: center;
    border-radius: 50%;
    margin-right: 10px;
    transition: 0.3s;
}

.social-links a:hover { background: var(--accent); }

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* --- BOTÓN FLOTANTE WHATSAPP --- */
.btn-whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--whatsapp-green);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    transition: all 0.3s ease;
}

.btn-whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}
