/* =========================================
   CSS Reset & Variables
   ========================================= */
:root {
    /* Brand Colors */
    --primary: #FF4400;
    --primary-hover: #e03c00;
    --primary-light: rgba(255, 68, 0, 0.1);

    /* Neutral Palette */
    --white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-gray: #f1f3f5;

    /* Text Colors */
    --text-dark: #212529;
    --text-muted: #6c757d;
    --text-light: #f8f9fa;
    --text-lighter: #e9ecef;

    /* UI Elements */
    --border-color: #dee2e6;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.12);
    --shadow-orange: 0 4px 16px rgba(255, 68, 0, 0.25);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================
   Typography & Buttons
   ========================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-dark);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-orange);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-block {
    width: 100%;
}

/* =========================================
   Header & Navbar
   ========================================= */
.navbar {
    position: relative;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 16px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.logoimg {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.logo span {
    color: var(--primary-hover);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a:not(.btn) {
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
}

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

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width var(--transition-fast);
}

.nav-links a:not(.btn):hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
}


.hero {
    position: relative;
    padding: 120px 0 160px;
    min-height: 80vh;       
    display: flex;          
    align-items: center;    
    overflow: hidden;      
}

.video-fondo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;       
    object-position: center; 
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); 
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%; 
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--white);
    margin-bottom: 24px;
    letter-spacing: -1px;
    text-align: center; 
}

.hero .subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto 48px; 
    text-align: center;  
}

/* =========================================
   Advanced Filters
   ========================================= */
.advanced-filters {
    background: var(--white);
    padding: 24px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 1100px;
    margin: 0 auto;
    transform: translateY(30%);
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.custom-select,
.price-inputs input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-dark);
    background-color: var(--white);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Custom Select Arrow */
.custom-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    cursor: pointer;
}

.custom-select:focus,
.price-inputs input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.price-group {
    grid-column: span 2;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency-select {
    width: 90px;
    padding: 12px 28px 12px 12px;
    background-position: right 8px center;
}

.price-inputs .separator {
    color: var(--text-muted);
}

.filter-submit {
    height: 100%;
    display: flex;
    align-items: flex-end;
}

.btn-search {
    width: 100%;
    height: 46px;
    font-size: 1.1rem;
}

/* =========================================
   Property Listings
   ========================================= */
.property-section {
    padding: 80px 0;
    margin-top: 60px;
    /* Offset for the overlapping form */
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 500;
}

.view-all:hover {
    gap: 12px;
}

.property-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* Property Card */
.property-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

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

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

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

.badges {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--white);
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
}

.badge.operation {
    background: var(--text-dark);
    color: var(--white);
}

.badge.operation.rent {
    background: var(--primary);
}

.badge.featured-badge {
    background-color: #ffd700;
    color: #000;
}

.price {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: var(--white);
    padding: 8px 16px;
    border-radius: var(--border-radius-md);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.price span {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.property-type {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.property-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-location {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.property-features {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.property-features span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.property-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background-color: #111827;
    color: var(--text-light);
    padding-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-brand .logo {
    color: var(--white);
    display: inline-block;
    margin-bottom: 16px;
}

.footer-brand p {
    color: #9ca3af;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.footer h3 {
    color: var(--white);
    font-size: 1.125rem;
    margin-bottom: 24px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #9ca3af;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary);
    scale: 8px !important;
}

.footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-contact li {
    display: flex;
    gap: 12px;
    color: #9ca3af;
    font-size: 0.95rem;
    align-items: flex-start;
}

.footer-contact i {
    color: var(--primary);
    margin-top: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: #9ca3af;
    font-size: 0.875rem;
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    color: #9ca3af;
    font-size: 0.875rem;
}

.footer-bottom-links a:hover {
    color: var(--white);
}

/* =========================================
   Responsive Design
   ========================================= */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    .property-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .advanced-filters {
        transform: translateY(20%);
    }

    .filter-form {
        grid-template-columns: repeat(2, 1fr);
    }

    .price-group {
        grid-column: span 1;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 24px;
        box-shadow: var(--shadow-md);
        gap: 20px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links .btn {
        width: 100%;
    }

    .mobile-toggle {
        display: block;
    }

    .hero {
        min-height: auto;
        padding: 100px 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .advanced-filters {
        position: relative;
        transform: none;
        margin-top: 40px;
    }

    .filter-form {
        grid-template-columns: 1fr;
    }

    .price-group {
        grid-column: 1;
    }

    .property-section {
        margin-top: 40px;
        padding: 40px 0;
    }

    .section-header .view-all {
        display: none;
    }

    .property-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom .container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* =========================================
   Legal Pages (Privacidad / Términos)
   ========================================= */
.legal-hero {
    background-color: #111827;
    padding: 70px 0 40px;
}

.legal-hero h1 {
    font-size: 2.4rem;
    margin-bottom: 8px;
    color: #fff;
}

.legal-hero .legal-updated {
    color: var(--text-lighter);
    opacity: 0.75;
    font-size: 0.95rem;
}

.legal-content {
    padding: 60px 0 100px;
    max-width: 860px;
    margin: 0 auto;
}

.legal-content section {
    margin-bottom: 40px;
}

.legal-content h2 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
}

.legal-content p,
.legal-content li {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.legal-content ul {
    padding-left: 4px;
}

.legal-content li {
    position: relative;
    padding-left: 22px;
}

.legal-content li::before {
    content: "\f105";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--primary);
    position: absolute;
    left: 0;
}

.legal-content strong {
    color: var(--text-dark);
}

.legal-toc {
    background-color: var(--bg-gray);
    border-radius: var(--border-radius-md);
    padding: 24px 28px;
    margin-bottom: 40px;
}

.legal-toc h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.legal-toc ol {
    padding-left: 20px;
    counter-reset: none;
}

.legal-toc li {
    padding-left: 0;
    margin-bottom: 6px;
}

.legal-toc li::before {
    content: none;
}

.legal-toc a {
    color: var(--text-muted);
    font-weight: 500;
}

.legal-toc a:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .legal-hero {
        padding: 50px 0 30px;
    }

    .legal-hero h1 {
        font-size: 1.8rem;
    }

    .legal-content {
        padding: 40px 0 60px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 12px 0;
    }

    .logo {
        font-size: 1.1rem;
        gap: 8px;
    }

    .logoimg {
        width: 38px;
        height: 38px;
    }

    .hero {
        padding: 80px 0;
    }

    .hero h1 {
        font-size: 2.1rem;
    }

    .hero .subtitle {
        font-size: 1rem;
        padding: 0 8px;
    }

    .advanced-filters {
        padding: 18px;
    }

    .filter-group label {
        font-size: 0.8rem;
    }

    .price-inputs .currency-select {
        width: 70px;
        padding: 12px 20px 12px 8px;
    }

    .price {
        font-size: 1.1rem;
        padding: 6px 12px;
    }
}

/* Paginacion sitio publico */
#paginacion-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0 1rem;
    width: 100%;
}

#paginacion-container button {
    padding: 0.55rem 1.4rem;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    background: var(--white, #fff);
    color: var(--text-dark, #333);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

#paginacion-container button:hover:not(:disabled) {
    background: var(--primary, #2c3e50);
    color: var(--white, #fff);
    border-color: var(--primary, #2c3e50);
}

#paginacion-container button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

#paginacion-container .paginacion-info {
    font-size: 0.9rem;
    color: var(--text-muted, #666);
    white-space: nowrap;
}
