/* =========================================================
   SG DEMOLICIONES - Estilos Principales
   Paleta: amarillos, naranjas, grises, cafés, fondo blanco
   ========================================================= */

:root {
    --sg-yellow:        #F7C200;
    --sg-yellow-dark:   #C99000;
    --sg-yellow-deep:   #A07000;
    --sg-orange:        #D96000;
    --sg-orange-light:  #F28020;
    --sg-brown:         #8B6040;
    --sg-brown-light:   #C4A882;
    --sg-gray-dark:     #2C2C2C;
    --sg-gray:          #5A5A5A;
    --sg-gray-mid:      #8A8A8A;
    --sg-gray-light:    #D4D0C8;
    --sg-concrete:      #F2EDE4;
    --sg-white:         #FFFFFF;
    --sg-overlay:       rgba(18, 12, 4, 0.68);
    --sg-radius:        8px;
    --sg-shadow:        0 4px 20px rgba(0,0,0,0.18);
    --sg-transition:    all 0.3s ease;
}

/* ---- Reset / Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--sg-gray-dark);
    background: var(--sg-white);
    margin: 0;
    padding: 0;
}

/* =========================================================
   NAVBAR
   ========================================================= */
.sg-navbar {
    background: rgba(28, 24, 18, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 3px solid var(--sg-yellow);
    padding: 0.6rem 0;
    transition: var(--sg-transition);
}

.sg-navbar.scrolled {
    background: rgba(28, 24, 18, 0.99);
    box-shadow: 0 2px 16px rgba(0,0,0,0.5);
}

.sg-nav-link {
    color: #E8E0D0 !important;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    padding: 0.5rem 1rem !important;
    border-radius: 4px;
    transition: var(--sg-transition);
    text-decoration: none;
}

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

.sg-btn-contact {
    display: inline-block;
    background: var(--sg-yellow);
    color: var(--sg-gray-dark) !important;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.45rem 1.3rem;
    border-radius: 4px;
    text-decoration: none;
    transition: var(--sg-transition);
    letter-spacing: 0.03em;
}

.sg-btn-contact:hover {
    background: var(--sg-orange);
    color: var(--sg-white) !important;
    transform: translateY(-1px);
}

.sg-toggler {
    border-color: var(--sg-yellow);
}

/* =========================================================
   HERO - SECCIÓN INICIO
   ========================================================= */
.sg-hero {
    min-height: 100vh;
    background-image: url('/img/fondo/04PostBLOGHeader2-06Mar.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sg-hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--sg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sg-hero-content {
    z-index: 2;
    padding: 2rem;
}

.sg-hero-logo {
    width: 400px;
    max-width: 90vw;
    /* Sombra que sigue el contorno real del PNG */
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.85)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.5)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.7));
    border-radius: 0; /* ya no necesitas esto */
    padding: 0; /* ni esto */
}

.sg-hero-tagline {
    color: var(--sg-white);
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.7;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
    max-width: 600px;
    margin: 0 auto;
}

.sg-btn-hero {
    display: inline-flex;
    align-items: center;
    background: var(--sg-yellow);
    color: var(--sg-gray-dark);
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0.75rem 2.2rem;
    border-radius: var(--sg-radius);
    text-decoration: none;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 18px rgba(247,194,0,0.4);
    transition: var(--sg-transition);
}

.sg-btn-hero:hover {
    background: var(--sg-orange);
    color: var(--sg-white);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(217,96,0,0.45);
}

/* =========================================================
   SECCIÓN GENÉRICA
   ========================================================= */
.sg-section {
    padding: 5rem 0;
}

.sg-section-heading {
    font-size: 2rem;
    font-weight: 700;
    color: var(--sg-gray-dark);
    letter-spacing: -0.01em;
}

.sg-title-bar {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--sg-yellow), var(--sg-orange));
    border-radius: 2px;
    margin-bottom: 1.5rem;
}

/* =========================================================
   SERVICIOS - SIDEBAR
   ========================================================= */
.sg-sidebar {
    background: var(--sg-gray-dark);
    min-height: 600px;
    padding: 0;
}

.sg-sidebar-header {
    background: linear-gradient(135deg, var(--sg-yellow-dark), var(--sg-orange));
    color: var(--sg-gray-dark);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1.2rem 1.5rem;
}

.sg-service-nav {
    padding: 1rem 0;
}

.sg-service-btn {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    background: transparent;
    border: none;
    border-left: 4px solid transparent;
    color: var(--sg-gray-light);
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0.95rem 1.4rem;
    text-align: left;
    cursor: pointer;
    transition: var(--sg-transition);
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.sg-service-btn:hover {
    background: rgba(247, 194, 0, 0.12);
    color: var(--sg-yellow);
    border-left-color: var(--sg-yellow-dark);
}

.sg-service-btn.active {
    background: rgba(247, 194, 0, 0.18);
    color: var(--sg-yellow);
    border-left-color: var(--sg-yellow);
    font-weight: 700;
}

.sg-service-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Contenido de servicios */
.sg-service-content {
    background: var(--sg-white);
    padding: 3rem 3.5rem;
}

.sg-service-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--sg-gray-dark);
    margin-bottom: 0.4rem;
}

.sg-service-desc {
    color: var(--sg-gray);
    font-size: 0.96rem;
    line-height: 1.75;
    margin-bottom: 1rem;
}

.sg-service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sg-service-list li {
    padding: 0.35rem 0 0.35rem 1.5rem;
    position: relative;
    color: var(--sg-gray);
    font-size: 0.93rem;
}

.sg-service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--sg-yellow);
    border-radius: 50%;
}

/* =========================================================
   CARRUSEL CENTRAL
   ========================================================= */
.sg-section-carrusel-central {
    padding: 2rem 0;
    background: var(--sg-gray-dark);
    border-top: 4px solid var(--sg-yellow-dark);
    border-bottom: 4px solid var(--sg-yellow-dark);
}

.sg-central-carousel-img {
    height: 460px;
    object-fit: contain;
    object-position: center;
    background: #000;
}

.sg-central-carousel-video {
    height: 460px;
    width: 100%;
    background: #000;
}

@media (max-width: 767px) {
    .sg-central-carousel-img,
    .sg-central-carousel-video {
        height: 260px;
    }
}

/* =========================================================
   CAROUSEL
   ========================================================= */
.sg-carousel {
    border-radius: var(--sg-radius);
    overflow: hidden;
    box-shadow: var(--sg-shadow);
    background: var(--sg-gray-dark);
}

.sg-carousel-img {
    height: 380px;
    object-fit: cover;
    object-position: center;
}

.carousel-indicators [data-bs-target] {
    background-color: var(--sg-yellow);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    opacity: 0.5;
}

.carousel-indicators .active {
    opacity: 1;
    background-color: var(--sg-yellow);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(0);
    background-color: rgba(247,194,0,0.75);
    border-radius: 50%;
    padding: 1rem;
    background-size: 60%;
}

/* =========================================================
   NOSOTROS
   ========================================================= */
.sg-section-nosotros {
    background: var(--sg-concrete);
}

.sg-nosotros-card {
    background: var(--sg-white);
    border-radius: var(--sg-radius);
    padding: 1.8rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border-top: 4px solid var(--sg-yellow);
    height: 100%;
}

.sg-nosotros-card-title {
    font-weight: 700;
    color: var(--sg-gray-dark);
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

.sg-nosotros-card p {
    color: var(--sg-gray);
    font-size: 0.93rem;
    line-height: 1.75;
    margin: 0;
}

.sg-nosotros-logo {
    max-width: 280px;
    width: 100%;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.15));
    transition: var(--sg-transition);
}

.sg-nosotros-logo:hover {
    transform: scale(1.04);
}

/* =========================================================
   CONTACTO
   ========================================================= */
.sg-section-contacto {
    background: var(--sg-gray-dark);
}

.sg-section-contacto .sg-section-heading {
    color: var(--sg-white);
}

.sg-section-contacto .sg-title-bar {
    display: block;
}

.sg-contacto-subtitle {
    color: var(--sg-gray-light);
    font-size: 1rem;
}

.sg-label {
    color: var(--sg-gray-light);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.sg-input {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: var(--sg-radius);
    color: var(--sg-white) !important;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: var(--sg-transition);
}

.sg-input::placeholder {
    color: var(--sg-gray-mid) !important;
}

.sg-input:focus {
    background: rgba(255,255,255,0.12);
    border-color: var(--sg-yellow);
    box-shadow: 0 0 0 3px rgba(247,194,0,0.2);
    outline: none;
    color: var(--sg-white) !important;
}

.sg-btn-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sg-yellow), var(--sg-orange-light));
    color: var(--sg-gray-dark);
    font-weight: 700;
    font-size: 1rem;
    padding: 0.85rem 3rem;
    border: none;
    border-radius: var(--sg-radius);
    cursor: pointer;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 18px rgba(247,194,0,0.35);
    transition: var(--sg-transition);
    min-width: 220px;
}

.sg-btn-send:hover {
    background: linear-gradient(135deg, var(--sg-orange-light), var(--sg-orange));
    color: var(--sg-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(217,96,0,0.4);
}

.sg-btn-send:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* =========================================================
   FOOTER
   ========================================================= */
.sg-footer {
    background: #111010;
    padding: 1.8rem 0;
    border-top: 3px solid var(--sg-yellow-dark);
}

.sg-footer-text {
    color: var(--sg-gray-mid);
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

/* =========================================================
   BOTÓN FLOTANTE WHATSAPP
   ========================================================= */
.sg-whatsapp-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #25D366;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75rem 1.4rem 0.75rem 1.1rem;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(37,211,102,0.5);
    width: 200px;
    justify-content: center;
    transition: var(--sg-transition);
    letter-spacing: 0.03em;
}

.sg-whatsapp-fab:hover {
    background: #1DA851;
    color: #fff;
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 28px rgba(37,211,102,0.6);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 991px) {
    .sg-sidebar {
        min-height: auto;
    }
    .sg-service-content {
        padding: 2rem 1.5rem;
    }
    .sg-hero-logo {
        width: 280px;
    }
    .sg-hero-tagline {
        font-size: 1.1rem;
    }
    .sg-carousel-img {
        height: 280px;
    }
}

/* =========================================================
   ANIMACIÓN FADE-IN
   ========================================================= */
.sg-fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.sg-fade-in.sg-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 767px) {
    .sg-section {
        padding: 3rem 0;
    }
    .sg-service-content {
        padding: 1.5rem 1rem;
    }
    .sg-whatsapp-fab {
        bottom: 16px;
        right: 16px;
        width: 170px;
        font-size: 0.85rem;
    }
    .sg-hero-logo {
        width: 220px;
    }
}

/* =========================================================
   SERVICIOS - CARDS
   ========================================================= */
.sg-section-servicios {
    background: var(--sg-concrete);
}

.sg-svc-card {
    background: var(--sg-white);
    border-radius: var(--sg-radius);
    padding: 2rem 1.5rem;
    box-shadow: var(--sg-shadow);
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 4px solid var(--sg-yellow);
    transition: var(--sg-transition);
}

.sg-svc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 32px rgba(0,0,0,0.18);
}

.sg-svc-card-icon {
    font-size: 3rem;
    color: var(--sg-yellow-dark);
    margin-bottom: 1rem;
    line-height: 1;
}

.sg-svc-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sg-gray-dark);
    margin-bottom: 0.75rem;
}

.sg-svc-card-desc {
    color: var(--sg-gray);
    font-size: 0.9rem;
    line-height: 1.65;
    flex: 1;
    margin-bottom: 1.5rem;
}

.sg-btn-ver-mas {
    display: inline-block;
    background: transparent;
    border: 2px solid var(--sg-yellow);
    color: var(--sg-yellow-dark);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.5rem 1.6rem;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 0.06em;
    transition: var(--sg-transition);
    text-transform: uppercase;
    margin-top: auto;
}

.sg-btn-ver-mas:hover {
    background: var(--sg-yellow);
    color: var(--sg-gray-dark);
}

/* =========================================================
   SERVICIOS - MODAL DETALLE
   ========================================================= */
.sg-svc-modal-content {
    border: none;
    border-radius: var(--sg-radius);
    overflow: hidden;
    position: relative;
}

.sg-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
    background: var(--sg-yellow);
    color: var(--sg-gray-dark);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--sg-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sg-modal-close:hover {
    background: var(--sg-orange);
    color: var(--sg-white);
}

.sg-svc-modal-text {
    padding: 2.5rem 2rem;
    background: var(--sg-white);
    overflow-y: auto;
    max-height: 82vh;
}

.sg-svc-modal-carousel {
    background: var(--sg-gray-dark);
    display: flex;
    align-items: center;
    min-height: 400px;
}

.sg-svc-modal-carousel .carousel,
.sg-svc-modal-carousel .sg-carousel {
    width: 100%;
}

.sg-svc-modal-img {
    height: 480px !important;
}

.sg-svc-modal-no-img {
    color: var(--sg-gray-light);
    padding: 3rem;
    text-align: center;
    width: 100%;
}

@media (max-width: 991px) {
    .sg-svc-modal-text {
        max-height: none;
        padding: 1.5rem 1.25rem;
    }
    .sg-svc-modal-carousel {
        min-height: 280px;
    }
    .sg-svc-modal-img {
        height: 260px !important;
    }
}

/* =========================================================
   LIGHTBOX MODAL
   ========================================================= */
.sg-carousel-img {
    cursor: zoom-in;
}

.sg-lightbox-dialog {
    max-width: 90vw;
    width: auto;
}

.sg-lightbox-content {
    background: transparent;
    border: none;
    box-shadow: none;
    position: relative;
}

.sg-lightbox-full-img {
    width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: var(--sg-radius);
    display: block;
}

.sg-lightbox-close {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 10;
    background: var(--sg-yellow);
    color: var(--sg-gray-dark);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--sg-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sg-lightbox-close:hover {
    background: var(--sg-orange);
    color: var(--sg-white);
}

