/* =========================================
   SISTEMA DE DISEÑO - TU CASA INMOBILIARIA
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #F2B300;
    --accent: #F5C84A;
    --dark: #111111;
    --light: #FFFFFF;
    --gray-bg: #F8F9FA;
    --gray-text: #666666;
    --border: rgba(17, 17, 17, 0.1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- BOTONES --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--dark);
}

.btn-primary:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(242, 179, 0, 0.3);
}

.btn-dark {
    background-color: var(--dark);
    color: var(--light);
}

.btn-dark:hover {
    background-color: #333333;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-danger {
    background-color: #EF4444;
    color: var(--light);
}

.btn-danger:hover {
    background-color: #DC2626;
}

/* --- HEADER Y NAVEGACIÓN --- */
.main-header {
    background-color: var(--light);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary);
}

.main-nav .nav-list {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    font-size: 15px;
    color: var(--gray-text);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--dark);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Hamburger Menu Mobile */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-menu .bar {
    width: 100%;
    height: 2px;
    background-color: var(--dark);
    transition: var(--transition);
}

/* --- FOOTERS --- */
.main-footer {
    background-color: var(--dark);
    color: var(--light);
    padding: 60px 0 40px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-brand .footer-logo {
    color: var(--light);
    display: block;
    margin-bottom: 15px;
}

.footer-brand p {
    color: #999;
    font-size: 14px;
}

.footer-links h3, .footer-contact h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--primary);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #999;
    font-size: 14px;
}

.footer-links ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-contact p {
    color: #999;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sub-footer {
    background-color: #000000;
    color: #666;
    padding: 20px 0;
    font-size: 13px;
}

.sub-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.sub-footer a {
    color: var(--primary);
    font-weight: 500;
}

/* --- MODAL LOGIN (MIGRADO A GLOBAL) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 17, 17, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--light);
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transform: translateY(-30px);
    transition: transform 0.4s ease;
    position: relative;
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark);
    opacity: 0.5;
    transition: var(--transition);
}

.modal-close:hover {
    opacity: 1;
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-header h2 {
    font-size: 24px;
    color: var(--dark);
}

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; font-size: 12px; font-weight: 700;
    text-transform: uppercase; margin-bottom: 8px;
}
.form-control {
    width: 100%; padding: 14px; border: 2px solid var(--border);
    border-radius: var(--radius-sm); font-size: 15px; outline: none;
    transition: var(--transition);
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(242, 179, 0, 0.1);
}
.alert-box {
    padding: 12px; border-radius: var(--radius-sm); font-size: 14px;
    margin-bottom: 20px; display: none; text-align: center;
}
.alert-error { background-color: #FDE8E8; color: #9B1C1C; }
.alert-success { background-color: #DEF7EC; color: #03543F; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--light);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
    }

    .main-nav.active {
        left: 0;
    }

    .main-nav .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .nav-link {
        font-size: 20px;
    }

    .header-actions {
        display: none; /* Se ocultan botones en móvil para diseño limpio, se acceden vía menú */
    }
    
    .main-nav.active + .header-actions {
        display: flex;
        position: absolute;
        bottom: 40px;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: column;
        width: 80%;
    }
}