/* ============================================
   Inmogestión Hidalgo y Velázquez
   Classic & Elegant Real Estate Website
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #1B5E20;
    color: #F5F0E8;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F5F0E8;
}
::-webkit-scrollbar-thumb {
    background: #1B5E20;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0D3B12;
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #1B5E20;
    color: #F5F0E8;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #1B5E20;
}

.btn-primary:hover {
    background: #0D3B12;
    border-color: #0D3B12;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(27, 94, 32, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: #F5F0E8;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid rgba(245, 240, 232, 0.3);
}

.btn-secondary:hover {
    background: rgba(245, 240, 232, 0.1);
    border-color: rgba(245, 240, 232, 0.6);
    transform: translateY(-2px);
}

/* --- Navigation --- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #1B5E20;
    transition: width 0.3s ease;
}

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

/* --- Navbar scroll state --- */
nav.scrolled {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(27, 94, 32, 0.08);
}

nav.scrolled .nav-link {
    color: rgba(15, 15, 15, 0.7);
}

nav.scrolled .nav-link:hover {
    color: #1B5E20;
}

nav.scrolled .btn-primary {
    background: #1B5E20;
    border-color: #1B5E20;
}

nav.scrolled .menu-line {
    background: #1B5E20;
}

/* --- Mobile Menu --- */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
}

.mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }
.mobile-menu.open .mobile-link:nth-child(6) { transition-delay: 0.3s; }

/* --- Mobile menu button --- */
.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-open .menu-line:nth-child(3) {
    width: 20px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* --- Service Cards --- */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1B5E20, #43A047);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-4px);
}

/* --- Property Cards --- */
.property-card {
    position: relative;
}

.property-card:hover {
    transform: translateY(-6px);
}

/* --- Testimonial Cards --- */
.testimonial-card {
    position: relative;
    transition: all 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(27, 94, 32, 0.12);
}

/* --- Floating Animations --- */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 4s ease-in-out infinite;
    animation-delay: 2s;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* --- Decorative Elements --- */
.ornament {
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #1B5E20, transparent);
    margin: 0 auto;
}

/* --- Form Styles --- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .property-card .h-64 {
        height: 200px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .property-card .h-64 {
        height: 220px;
    }
}

/* --- Print --- */
@media print {
    nav, .btn-primary, .btn-secondary {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}
