/* =============================================
   Garcia & Sons Roofing - Style.css
   Theme: Green (#015700)
   Fix: Dropdowns cerrados por defecto en móvil
=============================================
*/

/* --- 1. General & Reset --- */
body {
    font-family: 'Barlow', sans-serif;
    color: #7d7d7d;
    font-size: 16px;
    line-height: 30px;
    font-weight: 400;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    color: #2b2b2b;
    font-weight: 700;
    margin: 0 0 15px;
}

h3 {
    font-size: 24px;
}

a {
    transition: all 500ms ease;
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
    color: #015700; /* VERDE */
}

img {
    max-width: 100%;
    height: auto;
}

/* --- 2. Helper Classes & Buttons --- */
.container {
    max-width: 1200px;
}

.block-title {
    margin-bottom: 50px;
}

.block-title h3 {
    font-size: 40px;
    font-weight: 800;
    text-transform: uppercase;
    color: #2b2b2b;
}

.thm-btn {
    display: inline-block;
    vertical-align: middle;
    background-color: #015700; /* VERDE */
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 15px 40px;
    transition: all 0.4s ease;
    text-transform: uppercase;
    border-radius: 5px;
}

.thm-btn:hover {
    background-color: #2b2b2b;
    color: #fff;
}

/* --- 3. Header & Topbar --- */
.topbar-one {
    background-color: #2b2b2b;
    padding: 10px 0;
}

.topbar-one__middle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-one a {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    margin-right: 20px;
    display: inline-flex;
    align-items: center;
}

/* ICONOS DEL HEADER EN BLANCO */
.topbar-one a i, 
.topbar-one a span {
    margin-right: 8px;
    color: #ffffff !important; /* Forzado a BLANCO */
}

.main-nav__header-one {
    background-color: #fff;
    box-shadow: 0px 10px 30px 0px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 99;
}

.header-navigation .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav__navigation-box {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
}

.main-nav__navigation-box > li {
    position: relative;
    padding: 30px 0;
    margin-left: 30px;
}

.main-nav__navigation-box > li > a {
    font-size: 16px;
    font-weight: 700;
    color: #2b2b2b;
    text-transform: uppercase;
    display: block;
}

.main-nav__navigation-box > li:hover > a,
.main-nav__navigation-box > li.current > a {
    color: #015700; /* VERDE */
}

/* Dropdown Menu (Escritorio - Absolute Positioning) */
.main-nav__navigation-box li ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background-color: #fff;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    padding: 10px 0;
    list-style: none;
}

.main-nav__navigation-box li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav__navigation-box li ul li a {
    display: block;
    padding: 10px 20px;
    color: #7d7d7d;
    border-bottom: 1px solid #f4f4f4;
}

.main-nav__navigation-box li ul li:hover a {
    background-color: #015700; /* VERDE */
    color: #fff;
}

/* --- 4. Hero Slider --- */
.banner-carousel .slide-item {
    position: relative;
}
.banner-carousel .slide-item img {
    width: 100%;
    height: auto;
}

/* --- 5. About Section --- */
.need_all {
    padding: 100px 0;
    background-color: #2b2b2b;
    position: relative;
}

.need_right_content .need_text h2 {
    color: #fff;
    font-size: 36px;
    margin-bottom: 20px;
}

.need_right_content .need_text p {
    color: #dcdcdc;
    margin-bottom: 30px;
}

/* --- 6. Services --- */
.service_four {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.service_four_single {
    background-color: #2b2b2b;
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 30px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service_four_single:hover {
    transform: translateY(-10px);
}

.service_four_icon {
    margin-bottom: 25px;
}
.service_four_icon img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border: 3px solid #015700; /* VERDE */
}

.service_four_title {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.service_four_title:hover {
    color: #015700; /* VERDE */
}

.service_four_deatils p {
    color: #ababab;
}

.service_four_read_more a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: #015700; /* VERDE */
    border-radius: 50%;
    color: #fff;
    margin-top: 20px;
}

/* --- 7. Portfolio --- */
.gallery_one {
    padding: 100px 0;
    background-color: #222;
}

.gallery_one_single {
    position: relative;
    margin: 10px;
    overflow: hidden;
}

.gallery_one_image img {
    width: 100%;
    transition: transform 0.5s ease;
}

.gallery_one_single:hover .gallery_one_image img {
    transform: scale(1.1);
}

.gallery_one_hover_box {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: rgba(1, 87, 0, 0.8); /* VERDE con transparencia */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.4s ease;
}

.gallery_one_single:hover .gallery_one_hover_box {
    opacity: 1;
}

.gallery_one_icon a {
    font-size: 24px;
    color: #fff;
}

/* --- 8. Call to Action --- */
.cta_three {
    background-color: #015700; /* VERDE */
    padding: 60px 0;
}

.cta_three_content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.cta_three_text h2 {
    color: #fff;
    font-size: 36px;
    margin: 0;
}

.cta_three_text p {
    color: #fff;
    margin: 0;
    font-weight: 500;
}

.cta_three_btn .thm-btn {
    background-color: #fff;
    color: #015700; /* VERDE */
}

.cta_three_btn .thm-btn:hover {
    background-color: #2b2b2b;
    color: #fff;
}

/* --- 9. Footer --- */
.site-footer {
    background-color: #1a1a1a;
    padding-top: 80px;
    padding-bottom: 40px;
    color: #ababab;
}

.footer-widget__title h3 {
    color: #fff;
    font-size: 20px;
    text-transform: uppercase;
    border-bottom: 2px solid #015700; /* VERDE */
    padding-bottom: 10px;
    display: inline-block;
    margin-bottom: 30px;
}

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

.footer-widget__links-list li a {
    color: #ababab;
    display: flex;
    align-items: center;
}

.footer-widget__links-list li a i {
    margin-right: 10px;
    color: #015700; /* VERDE */
}

.footer-widget__links-list li a:hover {
    color: #015700; /* VERDE */
    padding-left: 5px;
}

.site-footer_bottom {
    background-color: #111;
    padding: 20px 0;
    text-align: center;
}

/* Créditos Footer en blanco */
.site-footer_bottom p, .site-footer_bottom a {
    margin: 0;
    color: #ffffff !important; 
}

/* Preloader (oculto) */
.preloader {
    display: none !important;
}

/* Portfolio grid fix */
.gallery_two_single {
    margin-bottom: 30px;
    display: block;
    position: relative;
}

/* =============================================
   MENÚ MÓVIL Y RESPONSIVE (ARREGLO DEFINITIVO)
============================================= */

/* 1. Botón Hamburguesa (Oculto en Desktop, Visible en Mobile) */
.side-menu__toggler {
    display: none; /* Desktop default */
    color: #2b2b2b;
    font-size: 26px;
    cursor: pointer;
    padding: 10px;
}

/* 2. Estructura del Menú Lateral */
.side-menu__block {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.side-menu__block.active {
    display: block !important;
}

.side-menu__block-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.side-menu__block-inner {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    background-color: #1a1a1a;
    z-index: 10000;
    padding: 30px 20px;
    padding-top: 80px;
    overflow-y: auto;
    
    /* Animación de entrada: desde la izquierda */
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.side-menu__block.active .side-menu__block-inner {
    transform: translateX(0);
}

/* 3. Botón Cerrar (X) */
.side-menu__close-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: #015700; /* VERDE */
    color: #fff;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10001;
    display: block;
}
.side-menu__close-btn:hover {
    background-color: #fff;
    color: #015700;
}
.side-menu__close-btn::after {
    content: "\f00d"; /* FontAwesome X */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}
.side-menu__close-btn img { display: none; }

/* 4. Lista de Links en el Móvil - DROPDOWNS CERRADOS */
.mobile-nav__container {
    display: block;
    margin-top: 20px;
}

/* Resetear estilos heredados del desktop */
.mobile-nav__container ul, 
.mobile-nav__container .main-nav__navigation-box {
    display: block !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    width: 100% !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.mobile-nav__container li {
    display: block !important;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
}

.mobile-nav__container li a {
    display: block;
    padding: 15px 0;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
}

.mobile-nav__container li a:hover {
    color: #015700;
    padding-left: 10px;
}

/* IMPORTANTE: Submenús ocultos por defecto */
.mobile-nav__container li ul {
    display: none !important; /* Forzar oculto por defecto */
    position: static !important;
    padding-left: 20px !important;
    background-color: rgba(0,0,0,0.2);
    box-shadow: none !important;
    width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    margin: 0 !important;
}

/* Cuando jQuery hace slideToggle, agrega display:block inline */
.mobile-nav__container li.expanded > ul {
    display: block !important;
}

.mobile-nav__container li ul li {
    border: none;
}

.mobile-nav__container li ul li a {
    font-size: 14px;
    text-transform: capitalize;
    font-weight: 400;
    color: #ababab;
    padding: 10px 0;
}

/* Flecha indicadora de dropdown */
.mobile-nav__container .dropdown > a {
    position: relative;
    padding-right: 30px;
}

.mobile-nav__container .dropdown > a::after {
    content: '\f107'; /* FontAwesome chevron-down */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.mobile-nav__container .dropdown.expanded > a::after {
    transform: translateY(-50%) rotate(180deg);
}

/* --- Media Queries --- */
@media (max-width: 991px) {
    .side-menu__toggler {
        display: block !important;
    }

    .main-nav__main-navigation {
        display: none !important;
    }

    /* Ocultar barra superior en móvil */
    .topbar-one {
        display: none !important;
    }

    .header-navigation .container {
        justify-content: flex-start;
        padding: 15px;
    }
}