/* ============================================
   NEXO Constructora - Premium Styles
   Black & Gold Theme
   ============================================ */

/* CSS Custom Properties */
:root {
    --gold: #D4AF37;
    --gold-dark: #C9A227;
    --gold-darker: #B8860B;
    --gold-light: #E6C65C;
    --black: #000000;
    --dark: #111111;
    --dark-alt: #1A1A1A;
    --white: #FFFFFF;
    --gray: #888888;
    --gray-light: #CCCCCC;
    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.3);
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Cormorant Garamond', serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--black);
    color: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
}

::selection {
    background: var(--gold);
    color: var(--black);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--black);
}
::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}

/* ============================================
   Navbar
   ============================================ */
#mainNav {
    padding: 8px 0;
    transition: var(--transition);
    background: transparent;
    min-height: 70px;
}

#mainNav .navbar-nav .nav-link {
    padding: 4px 16px !important;
}

#mainNav .btn-gold {
    padding: 8px 20px;
}

#mainNav.navbar-scrolled {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    padding: 4px 0;
    min-height: 60px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
    line-height: 1;
    text-decoration: none;
}

.navbar .container {
    display: flex;
    align-items: center;
}

#navbarNav {
    display: flex;
    align-items: center;
}

.navbar-nav {
    align-items: center;
}

.navbar-collapse {
    align-items: center;
}

.nav-link {
    color: var(--white) !important;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 8px 16px !important;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold) !important;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--black);
    border: none;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 12px 28px;
    border-radius: 6px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: var(--black);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.btn-outline-gold {
    background: transparent;
    color: var(--gold);
    border: 2px solid var(--gold);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 12px 28px;
    border-radius: 6px;
    transition: var(--transition);
}

.btn-outline-gold:hover {
    background: var(--gold);
    color: var(--black);
    transform: translateY(-2px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.85) 100%),
        url('../img/hero.jpg') center/cover no-repeat fixed;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}

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

.hero-text {
    padding-top: 80px;
}

.hero-badge {
    display: inline-block;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold);
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-title {
    font-family: var(--font-secondary);
    font-size: 64px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--gray-light);
    max-width: 600px;
    margin-bottom: 35px;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--gray);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: bounce 2s infinite;
}

.hero-scroll i {
    font-size: 20px;
    color: var(--gold);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ============================================
   Sections General
   ============================================ */
.section {
    padding: 100px 0;
    position: relative;
}

.section.bg-dark {
    background: var(--dark);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-badge {
    display: inline-block;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--gold);
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-secondary);
    font-size: 42px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
}

.section-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    margin: 0 auto 20px;
    border-radius: 2px;
}

.section-desc {
    color: var(--gray);
    font-size: 16px;
    line-height: 1.8;
}

/* ============================================
   Value Cards
   ============================================ */
.value-card {
    background: var(--dark-alt);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.value-card:hover {
    transform: translateY(-8px);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.value-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.value-card:hover .value-icon {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-color: var(--gold);
}

.value-icon i {
    font-size: 28px;
    color: var(--gold);
    transition: var(--transition);
}

.value-card:hover .value-icon i {
    color: var(--black);
}

.value-card h4 {
    font-family: var(--font-secondary);
    font-size: 22px;
    color: var(--white);
    margin-bottom: 12px;
}

.value-card p {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    background: linear-gradient(145deg, var(--black), var(--dark-alt));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition);
    height: 100%;
    position: relative;
    overflow: hidden;
}

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

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

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(212, 175, 55, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-color: var(--gold);
    transform: scale(1.1);
}

.service-icon i {
    font-size: 32px;
    color: var(--gold);
    transition: var(--transition);
}

.service-card:hover .service-icon i {
    color: var(--black);
}

.service-card h4 {
    font-family: var(--font-secondary);
    font-size: 22px;
    color: var(--white);
    margin-bottom: 12px;
}

.service-card p {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

/* ============================================
   Stats Section
   ============================================ */
.stats-section {
    background: linear-gradient(135deg, var(--dark), var(--black));
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.stat-item {
    text-align: center;
    padding: 30px;
}

.stat-item i {
    font-size: 40px;
    color: var(--gold);
    margin-bottom: 16px;
}

.stat-number {
    font-family: var(--font-secondary);
    font-size: 56px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.stat-plus {
    font-family: var(--font-secondary);
    font-size: 36px;
    font-weight: 700;
    color: var(--gold);
    vertical-align: top;
    margin-left: 4px;
}

.stat-label {
    display: block;
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 8px;
}

/* ============================================
   Gallery
   ============================================ */
.gallery-img {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-img img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.6s ease;
    background: var(--dark-alt);
}

.gallery-item:hover .gallery-img img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 32px;
    color: var(--gold);
}

.gallery-overlay span {
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
}

.modal-content.bg-dark {
    background: var(--black) !important;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* ============================================
   Testimonials
   ============================================ */
.testimonials-section {
    background: var(--black);
}

.testimonial-card {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 20px;
}

.testimonial-stars {
    margin-bottom: 20px;
}

.testimonial-stars i {
    color: var(--gold);
    font-size: 20px;
    margin: 0 2px;
}

.testimonial-text {
    font-size: 20px;
    color: var(--gray-light);
    line-height: 1.8;
    font-style: italic;
    margin-bottom: 30px;
    font-weight: 300;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--black);
}

.testimonial-author div strong {
    display: block;
    color: var(--white);
    font-size: 16px;
}

.testimonial-author div span {
    color: var(--gray);
    font-size: 13px;
}

.carousel-indicators {
    position: static;
    margin-top: 30px;
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.3);
    border: none;
    margin: 0 6px;
}

.carousel-indicators button.active {
    background: var(--gold);
}

/* ============================================
   Contact Form
   ============================================ */
.contact-form {
    background: var(--dark-alt);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 50px;
}

.form-floating > label {
    color: var(--gray);
    font-size: 13px;
    padding: 16px;
}

.form-control,
.form-select {
    background: var(--black);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 8px;
    padding: 16px;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    background: var(--black);
    border-color: var(--gold);
    color: var(--white);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.form-control::placeholder {
    color: transparent;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    color: var(--gold);
    opacity: 0.8;
    transform: scale(0.85) translateY(-0.8rem) translateX(0.15rem);
}

.form-floating > .form-control:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--black) inset;
    -webkit-text-fill-color: var(--white);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    background-image: none;
}

.invalid-feedback {
    font-size: 12px;
    color: #dc3545;
}

.btn-loader {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--dark), var(--black));
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.cta-content {
    text-align: center;
    max-width: 650px;
    margin: 0 auto;
}

.cta-title {
    font-family: var(--font-secondary);
    font-size: 42px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
}

.cta-text {
    color: var(--gray);
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.8;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--black);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    padding: 60px 0 0;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    margin-bottom: 16px;
}

.footer-desc {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
}

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

.social-link {
    width: 40px;
    height: 40px;
    background: var(--dark-alt);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 18px;
    transition: var(--transition);
    text-decoration: none;
}

.social-link:hover {
    background: var(--gold);
    color: var(--black);
    border-color: var(--gold);
    transform: translateY(-3px);
}

.footer-title {
    font-family: var(--font-secondary);
    color: var(--gold);
    font-size: 20px;
    margin-bottom: 20px;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--gray);
    font-size: 14px;
}

.footer-contact li i {
    color: var(--gold);
    font-size: 16px;
    margin-top: 2px;
}

.footer-contact li a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}

.footer-contact li a:hover {
    color: var(--gold);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links li a {
    color: var(--gray);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-links li a::before {
    content: '›';
    color: var(--gold);
    font-size: 18px;
    font-weight: 700;
}

.footer-links li a:hover {
    color: var(--gold);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 24px 0;
    margin-top: 40px;
    text-align: center;
}

.footer-bottom p {
    color: var(--gray);
    font-size: 13px;
    margin: 0;
}

/* ============================================
   WhatsApp Floating Button
   ============================================ */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 56px;
    height: 56px;
    background: #25D366;
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-btn:hover {
    background: #20bd5a;
    color: var(--white);
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (max-width: 767.98px) {
    .whatsapp-btn {
        width: 48px;
        height: 48px;
        font-size: 22px;
        bottom: 20px;
        left: 20px;
    }
}

/* ============================================
   Back to Top
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--black);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    transform: translateY(-3px);
}

/* ============================================
   Toast
   ============================================ */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: var(--dark-alt);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    min-width: 300px;
}

.toast-header {
    background: transparent;
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.toast-body {
    color: var(--gray-light);
    font-size: 14px;
    padding: 16px;
}

/* ============================================
   Animations
   ============================================ */
.fade-in {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.hero-badge.fade-in { animation-delay: 0.2s; }
.hero-title.fade-in { animation-delay: 0.4s; }
.hero-subtitle.fade-in { animation-delay: 0.6s; }
.hero-buttons.fade-in { animation-delay: 0.8s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-animate] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* Tablet */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 44px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .section-title {
        font-size: 34px;
    }

    .cta-title {
        font-size: 34px;
    }

    .stat-number {
        font-size: 42px;
    }

    .section {
        padding: 70px 0;
    }

    #mainNav:not(.navbar-scrolled) {
        background: rgba(0, 0, 0, 0.9);
    }

    .contact-form {
        padding: 30px;
    }
}

/* Mobile Large */
@media (max-width: 767.98px) {
    .hero-title {
        font-size: 34px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .section-title {
        font-size: 28px;
    }

    .section {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .cta-title {
        font-size: 28px;
    }

    .stat-number {
        font-size: 36px;
    }

    .contact-form {
        padding: 20px;
    }

    .testimonial-text {
        font-size: 16px;
    }

    .gallery-img img {
        height: 220px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .toast-container {
        left: 20px;
        right: 20px;
    }

    .toast {
        min-width: auto;
    }
}

/* Mobile Small */
@media (max-width: 575.98px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-badge {
        font-size: 10px;
    }

    .brand-text {
        font-size: 24px;
    }

    .navbar-brand {
        max-width: 140px;
    }

    .section-title {
        font-size: 24px;
    }

    .section-desc {
        font-size: 14px;
    }

    .value-card,
    .service-card {
        padding: 25px 20px;
    }
}
