/* ============================================
   Construcciones Miguel San Edmundo
   Custom Styles
   ============================================ */

/* Base */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f9f0f7;
}
::-webkit-scrollbar-thumb {
    background: #4A1942;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3d1537;
}

/* Navbar */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(74, 25, 66, 0.08);
}

#navbar.scrolled .nav-link {
    color: #4A1942;
}

#navbar.scrolled .font-serif {
    color: #4A1942;
}

#navbar.scrolled .text-xs {
    color: #d89ebf;
}

/* Mobile Menu */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Floating Cards Animation */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -1.5s;
    animation-duration: 7s;
}

.floating-card:nth-child(3) {
    animation-delay: -3s;
    animation-duration: 5.5s;
}

.floating-card:nth-child(4) {
    animation-delay: -4.5s;
    animation-duration: 6.5s;
}

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

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: inherit;
}

.service-card:hover::before {
    opacity: 1;
}

/* Property Cards */
.property-card {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
}

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

/* Testimonial Cards */
.testimonial-card {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), background 0.5s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.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; }

/* Section divider */
.section-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #F5A623, #e08f0e);
    border-radius: 2px;
}

/* Mobile link hover */
.mobile-link {
    position: relative;
}

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

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

/* Input focus styles */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.2);
}

/* Selection */
::selection {
    background: #F5A623;
    color: #4A1942;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }

    #inicio {
        min-height: auto;
        padding-top: 120px;
        padding-bottom: 80px;
    }
}

/* Print styles */
@media print {
    #navbar, .floating-card, #menu-toggle {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
