/* ===========================
   Variables y reset
   =========================== */
:root {
    --primary: #f59e0b;        /* ámbar / construcción */
    --primary-dark: #d97706;
    --secondary: #1e293b;      /* azul pizarra oscuro */
    --secondary-light: #334155;
    --accent: #fbbf24;
    --light: #f8fafc;
    --light-bg: #f1f5f9;
    --dark: #0f172a;
    --text: #475569;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --transition: all 0.35s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--secondary);
    font-weight: 700;
}

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

.text-accent { color: var(--primary) !important; }
.brand-accent { color: var(--primary); }

/* ===========================
   Top Bar
   =========================== */
.top-bar {
    background-color: var(--secondary);
    color: var(--light);
    padding: 10px 0;
    font-size: 0.875rem;
}

.top-bar a {
    color: var(--light);
}

.top-bar a:hover {
    color: var(--primary);
}

.top-bar i {
    color: var(--primary);
    margin-right: 6px;
}

/* ===========================
   Navbar
   =========================== */
.navbar-custom {
    background-color: var(--white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: 15px 0;
    transition: var(--transition);
}

.navbar-custom.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary) !important;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    color: var(--secondary) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    margin: 0 2px;
    border-radius: 8px;
    position: relative;
}

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

.btn-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white !important;
    padding: 10px 24px !important;
    border-radius: 30px;
    font-weight: 600;
    border: none;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(245, 158, 11, 0.5);
    color: white !important;
}

/* ===========================
   Hero
   =========================== */
.hero {
    position: relative;
    min-height: 100vh;
    background: url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.75) 50%, rgba(245, 158, 11, 0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 100px 0 80px;
}

.hero-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-badge i { margin-right: 6px; }

.hero-title {
    color: white;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 36px;
    max-width: 600px;
}

.hero-buttons {
    margin-bottom: 60px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.35);
    transition: var(--transition);
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(245, 158, 11, 0.5);
    color: white;
}

.btn-outline-custom {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline-custom:hover {
    background: white;
    color: var(--secondary);
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item h3 {
    color: var(--primary);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin: 0;
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.hero-scroll a {
    color: white;
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

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

/* ===========================
   Secciones generales
   =========================== */
.section-padding {
    padding: 100px 0;
}

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

.section-tag {
    display: inline-block;
    background: rgba(245, 158, 11, 0.12);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-tag.light {
    background: rgba(245, 158, 11, 0.2);
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.section-text {
    font-size: 1.05rem;
    color: var(--text);
}

.bg-light-custom { background-color: var(--light-bg); }
.bg-dark-custom { background-color: var(--dark); }

/* ===========================
   Nosotros
   =========================== */
.about-images {
    position: relative;
    padding-bottom: 50px;
}

.about-img-main {
    width: 85%;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.about-img-small {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50%;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 8px solid white;
}

.about-experience {
    position: absolute;
    top: 30px;
    right: 0;
    background: var(--primary);
    color: white;
    padding: 22px 28px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.about-experience h2 {
    color: white;
    font-size: 2.5rem;
    margin: 0;
    line-height: 1;
}

.about-experience p {
    margin: 6px 0 0;
    font-size: 0.85rem;
    line-height: 1.2;
}

.about-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
}

.about-list li {
    padding: 8px 0;
    color: var(--text);
    font-size: 1rem;
}

.about-list i {
    color: var(--primary);
    margin-right: 10px;
    font-size: 1.1rem;
}

/* ===========================
   Servicios
   =========================== */
.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    border-bottom: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    transition: var(--transition);
    z-index: 0;
    opacity: 0.05;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--primary);
}

.service-card:hover::before {
    height: 100%;
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.8rem;
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}

.service-card h4 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.service-card p {
    color: var(--text);
    margin: 0;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

/* ===========================
   CTA Banner
   =========================== */
.cta-banner {
    position: relative;
    background: url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?auto=format&fit=crop&w=1920&q=80') center/cover fixed no-repeat;
    padding: 80px 0;
    color: white;
    overflow: hidden;
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(217, 119, 6, 0.85) 100%);
}

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

.cta-content h2 {
    color: white;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 32px;
    color: rgba(255, 255, 255, 0.9);
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.btn-light-custom {
    background: white;
    color: var(--secondary);
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    border: none;
}

.btn-light-custom:hover {
    background: var(--light-bg);
    transform: translateY(-3px);
}

.btn-whatsapp {
    background: #25d366;
    color: white;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    border: none;
}

.btn-whatsapp:hover {
    background: #1ebe57;
    color: white;
    transform: translateY(-3px);
}

/* ===========================
   Proyectos
   =========================== */
.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.project-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
    color: white;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay h5 {
    color: white;
    margin-bottom: 6px;
    transform: translateY(15px);
    transition: var(--transition);
}

.project-overlay p {
    color: var(--primary);
    margin: 0;
    font-size: 0.9rem;
    transform: translateY(15px);
    transition: var(--transition);
    transition-delay: 0.05s;
}

.project-card:hover .project-overlay h5,
.project-card:hover .project-overlay p {
    transform: translateY(0);
}

/* ===========================
   ¿Por qué nosotros?
   =========================== */
.feature-box {
    text-align: center;
    padding: 36px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    transition: var(--transition);
    height: 100%;
}

.feature-box:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--primary);
    transform: translateY(-8px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 2rem;
    margin-bottom: 20px;
}

.feature-box h5 {
    color: white;
    margin-bottom: 12px;
}

.feature-box p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 0.95rem;
}

/* ===========================
   Contacto
   =========================== */
.contact-info-box {
    background: var(--light-bg);
    padding: 40px;
    border-radius: 20px;
    height: 100%;
}

.contact-info-box h4 {
    margin-bottom: 8px;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-top: 24px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.2rem;
}

.contact-item h6 {
    margin-bottom: 4px;
    font-size: 1rem;
}

.contact-item p {
    margin: 0;
    color: var(--text);
}

.contact-item a {
    color: var(--text);
}

.contact-item a:hover {
    color: var(--primary);
}

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

.social-links a {
    width: 42px;
    height: 42px;
    background: white;
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.1rem;
    box-shadow: var(--shadow);
}

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

.contact-form {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.contact-form .form-label {
    font-weight: 500;
    color: var(--secondary);
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.contact-form .form-control,
.contact-form .form-select {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 70px 0 30px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 18px;
}

.footer-brand i {
    color: var(--primary);
}

.footer-text {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer h6 {
    color: white;
    margin-bottom: 22px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.footer-links li,
.footer-contact li {
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.footer-links a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--primary);
    padding-left: 5px;
}

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

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 40px 0 24px;
}

.footer p { margin: 0; }

/* ===========================
   WhatsApp y back-to-top
   =========================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 999;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    background: #1ebe57;
    color: white;
    transform: scale(1.1);
}

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

.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    cursor: pointer;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 991px) {
    .navbar-nav {
        padding-top: 15px;
    }

    .btn-cta {
        margin-top: 10px;
        display: inline-block;
    }

    .hero { min-height: 90vh; }

    .hero-stats { gap: 24px; }

    .stat-item h3 { font-size: 2rem; }

    .about-images {
        max-width: 500px;
        margin: 0 auto 40px;
    }

    .section-padding { padding: 70px 0; }

    .contact-info-box,
    .contact-form { padding: 30px; }
}

@media (max-width: 576px) {
    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .whatsapp-float {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
        bottom: 20px;
        right: 20px;
    }

    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 44px;
        height: 44px;
    }
}
