/* Variables */
:root {
    --color-primary: #001F3F;
    /* Deep Navy Blue */
    --color-secondary: #36454F;
    /* Oxford Gray */
    --color-accent: #C5A059;
    /* Gold accent */
    --color-accent-hover: #b08d48;
    --color-background: #FDFBF7;
    /* Cream background */
    --color-white: #FFFFFF;
    --color-text: #222222;
    --color-text-light: #4A4A4A;
    --color-border: #E0E0E0;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --text-base: 18px;
    --text-lg: 22px;
    --text-xl: 30px;
    --text-h1: 6rem;
    --text-h2: 2.5rem;
    --text-h3: 1.8rem;

    --transition: all 0.3s ease;
    --border-radius: 12px;
    --box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* NO SCROLL ON BODY */
.no-scroll-body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-white);
    line-height: 1.6;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    /* Hide scrollbars entirely on body */
    position: relative;
    background-color: var(--color-primary);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    line-height: 1.1;
    margin-bottom: 24px;
}

p {
    margin-bottom: 24px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Background Image and Overlay */
.bg-wrapper {
    position: fixed;
    /* Fixed so it NEVER moves */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(0, 31, 63, 0.5) 0%,
            rgba(0, 31, 63, 0.85) 100%);
    z-index: 2;
}

/* App Layout - Wrapper for UI above background */
.app-layout {
    position: relative;
    z-index: 10;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar-transparent {
    flex-shrink: 0;
    width: 100%;
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: 100px;
    position: relative;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-links a.nav-btn {
    text-decoration: none;
    color: var(--color-white);
    font-weight: 500;
    font-size: var(--text-base);
    transition: var(--transition);
    opacity: 0.8;
}

.nav-links a.nav-btn:hover,
.nav-links a.nav-btn.active {
    opacity: 1;
    color: var(--color-accent);
}

.btn-primary-small {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-primary);
    padding: 12px 28px;
    font-size: var(--text-base);
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary-small:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-primary);
    padding: 20px 48px;
    font-size: var(--text-lg);
    font-family: var(--font-body);
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    border: none;
    transition: var(--transition);
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.btn-large {
    font-size: var(--text-xl);
    padding: 24px 64px;
}

.btn-card {
    width: 100%;
    margin-top: 24px;
    padding: 16px 24px;
    font-size: var(--text-base);
}

.btn-submit {
    width: 100%;
    margin-top: 16px;
    border-radius: var(--border-radius);
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 2000;
}

.hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--color-accent);
    border-radius: 3px;
    transition: var(--transition);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 31, 63, 0.98);
    z-index: 1500;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-nav-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.mobile-nav-btn {
    text-decoration: none;
    color: var(--color-white);
    font-size: var(--text-h2);
    font-family: var(--font-heading);
    transition: var(--transition);
}

.mobile-nav-btn:hover {
    color: var(--color-accent);
}

.close-mobile-menu {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 50px;
    color: var(--color-white);
    cursor: pointer;
    transition: var(--transition);
}

.close-mobile-menu:hover {
    color: var(--color-accent);
}

/* Views Container */
.views-container {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    /* Hide anything outside */
}

/* Individual Sections / Views */
.view-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    display: flex;
    align-items: center;
    /* Center Home View Vertically */
}

.view-section.active {
    opacity: 1;
    visibility: visible;
}

/* If a view needs scrolling internally (like real estate cards list) */
.scrollable-view {
    align-items: flex-start;
    padding-top: 40px;
    padding-bottom: 40px;
    height: calc(100vh - 100px);
    /* Fill remaining height exactly */
    overflow-y: auto;
    /* Internal scroll only for this view */
}

/* Custom Scrollbar for internal scrolling */
.scrollable-view::-webkit-scrollbar {
    width: 8px;
}

.scrollable-view::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.scrollable-view::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 4px;
}

/* Center Text for Hero / Home */
.hero-overlay-content {
    width: 100%;
}

.hero-text-center {
    text-align: left;
    max-width: 800px;
}

.hero-text-center h1 {
    font-size: var(--text-h1);
    color: var(--color-white);
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
}

.hero-subtitle {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 48px;
    max-width: 600px;
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.5);
}

/* Content Boxes (for About and Real Estate overlays) */
.content-box {
    background-color: var(--color-white);
    color: var(--color-text);
    padding: 60px;
    border-radius: 16px;
    box-shadow: var(--box-shadow);
}

/* Content Sections Titles (Adjusted for dark background) */
.section-title {
    font-size: var(--text-h2);
    text-align: center;
    color: var(--color-white);
    margin-bottom: 16px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.section-subtitle {
    text-align: center;
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin: 0 auto 48px auto;
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.5);
}

/* Property Slider Wrapper */
.slider-wrapper {
    position: relative;
    width: 100%;
    /* margin for buttons */
    padding: 0 40px;
}

/* Slider Navigation Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-accent);
    color: var(--color-primary);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: -10px;
}

.next-btn {
    right: -10px;
}

/* Cards Grid (Horizontal Scroll - 3 Items) */
.cards-grid {
    display: flex;
    gap: 40px;
    overflow-x: auto;
    padding-bottom: 20px;
    padding-top: 20px;
    margin: 0 auto;
    width: 100%;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    /* Hide scrollbars */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.cards-grid::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

.property-card {
    background: #F9F9F9;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: var(--transition);
    /* Calculate exact width for 3 items (2 gaps of 40px = 80px) */
    flex: 0 0 calc((100% - 80px) / 3);
    scroll-snap-align: start;
}

.card-img {
    width: 100%;
    height: 250px;
    /* Slightly shorter to fit well on screen */
    object-fit: cover;
}

.card-content {
    padding: 32px;
}

.card-content h3 {
    font-size: var(--text-h3);
    color: var(--color-primary);
}

.property-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    background-color: var(--color-white);
    padding: 24px;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
}

.detail-item {
    font-size: var(--text-base);
    color: var(--color-text);
}

.detail-item strong {
    color: var(--color-primary);
}

/* About Section */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-stats {
    display: grid;
    gap: 24px;
}

.stat-box {
    background: #F9F9F9;
    padding: 32px;
    border-radius: var(--border-radius);
    border-left: 6px solid var(--color-accent);
}

.stat-number {
    display: block;
    font-size: var(--text-h2);
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: var(--text-lg);
}



/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--color-white);
    color: var(--color-text);
    margin: 5% auto;
    padding: 50px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--box-shadow);
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--color-primary);
}

.modal-header h2 {
    color: var(--color-primary);
    font-size: var(--text-h2);
    margin-bottom: 8px;
}

.modal-header p {
    color: var(--color-text-light);
    margin-bottom: 32px;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: var(--text-base);
    margin-bottom: 8px;
    color: var(--color-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 18px;
    font-size: var(--text-base);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    background-color: #F9F9F9;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background-color: var(--color-white);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.1);
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    gap: 16px;
    text-decoration: none;
    font-weight: bold;
    font-size: var(--text-lg);
    transition: var(--transition);
}

.whatsapp-float::after {
    content: "¡Contáctame!";
}

.whatsapp-float:hover {
    background-color: #1EBE5D;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.wa-icon {
    width: 36px;
    height: 36px;
}

/* Admin Dashboard Styles */
.admin-grid-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.admin-item {
    background: var(--color-white);
    padding: 16px 20px;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text);
}

.admin-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.admin-item-title {
    font-weight: 600;
    font-size: var(--text-base);
    color: var(--color-primary);
}

.admin-item-details {
    font-size: 14px;
    color: var(--color-text-light);
}

.admin-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-edit {
    background: rgba(197, 160, 89, 0.2);
    color: var(--color-accent-hover);
}

.btn-edit:hover {
    background: var(--color-accent);
    color: var(--color-primary);
}

.btn-delete {
    background: rgba(217, 83, 79, 0.2);
    color: #d9534f;
}

.btn-delete:hover {
    background: #d9534f;
    color: var(--color-white);
}

/* Responsive */
@media (max-width: 992px) {
    :root {
        --text-h1: 3.5rem;
    }

    .about-container {
        grid-template-columns: 1fr;
    }

    .property-card {
        /* On medium screens, show 2 cards */
        flex: 0 0 calc((100% - 40px) / 2);
    }
}

@media (max-width: 768px) {
    :root {
        --text-h1: 2.8rem;
        --text-lg: 1.1rem;
    }

    .nav-links {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    .admin-grid-layout {
        grid-template-columns: 1fr;
    }

    .hero-container {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 30px !important;
    }

    .hero-text-center {
        text-align: center;
        margin: 0 auto;
    }

    .content-box {
        padding: 30px;
    }

    .modal-content {
        padding: 30px;
        margin: 10% auto;
    }

    .whatsapp-float {
        bottom: 24px;
        right: 24px;
        padding: 20px;
        border-radius: 50%;
    }

    .whatsapp-float::after {
        display: none;
    }

    .wa-icon {
        width: 32px;
        height: 32px;
        margin: 0;
    }

    .property-card {
        /* On small screens, show 1 card */
        flex: 0 0 100%;
    }

    .slider-wrapper {
        padding: 0 20px;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
    }

    .prev-btn {
        left: 0;
    }

    .next-btn {
        right: 0;
    }
}