html {
    scroll-padding-top: 100px;
}

body {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    color: #333;
    line-height: 1.6;
}

/* ================= MENU DE SITIO ================= */

#nav-logo {
    margin: 5px 25px;
    height: 85%;
}

nav {
    color: #fbfbfb !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 80px !important;
    line-height: 80px !important;
    position: fixed;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav a {
    color: white !important;
    font-weight: bold;
    font-size: large !important;
}

/* ================= SLIDER PRINCIPAL ================= */

#hero-slider {
    height: calc(100vh - var(--nav-height, 80px)) !important; /* fill remaining viewport minus dynamic nav height */
    z-index: 100;
    position: relative !important;
}

#hero-slides {
    height: 100% !important; /* fill parent slider */
    background-color: transparent !important;
}

/* Ensure all slider images fill the container properly without cropping */
#hero-slides li {
    overflow: hidden;
}

#hero-slides li img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

/* Team photo: NEVER crop — show entire group.
   Dark background fills letterbox space elegantly. */
#hero-slides li:nth-child(2) {
    background-color: #111 !important;
}

#hero-slides li:nth-child(2) img {
    object-fit: contain !important;
    object-position: center center !important;
}

.slider-caption {
    color: #fbfbfb !important;
    background-color: #00000070;
    bottom: 10%;
    width: 100% !important;
    left: auto !important;
    top: auto !important;
    padding: 25px;
    padding-top: 0px;
    /* Ensure caption is always above the image */
    z-index: 2;
    position: absolute;
}

#hero-slider .indicators {
    z-index: 101 !important;
    bottom: 25px !important;
}

/* ================= SLIDER CLIENTES ================= */

.slider .indicators .indicator-item.active {
    background-color: var(--bernal-blue);
}

#customer-slides {
    background-color: transparent !important;
}

/* ================= SERVICIOS ================= */

#service-card-container {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-evenly;
}

.service-card {
    height: 350px;
    width: 290px;
    margin: 25px;
    position: relative;
    border-radius: 12px !important;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.green-card {
    border-top: 8px solid var(--audit-green);
    border-bottom: 8px solid var(--audit-green);
}

.cyan-card {
    border-top: 8px solid var(--bernal-blue);
    border-bottom: 8px solid var(--bernal-blue);
}

.gray-card {
    border-top: 8px solid var(--audit-gray);
    border-bottom: 8px solid var(--audit-gray);
}

.service-caret {
    width: 30px;
    height: 30px;
    position: absolute;
    top: 0px;
    left: 0px;
    background-image: url('/res/images/beaudit-caret.png');
    background-size: contain;
    background-repeat: no-repeat;
}

.service-card-content {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    vertical-align: middle;
    margin-top: 35px;
    align-items: center;
    text-align: center;
}

.equal-height-cards {
    display: flex;
    flex-wrap: wrap;
}

.equal-height-cards>.col {
    display: flex;
}

.equal-height-cards>.col>.card {
    width: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 12px !important;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.equal-height-cards>.col>.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.equal-height-cards>.col>.card .card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
}

/* ================= NUESTRO CLIENTES ================= */

.customer-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: baseline;
}

.customer-container img {
    width: 380px;
}

/* ================ NUESTRA FIRMA - SOCIOS =================== */

#members {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 30px;
    margin-top: 40px !important;
}

@media only screen and (min-width: 601px) {
    #members {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media only screen and (min-width: 993px) {
    #members {
        grid-template-columns: repeat(4, 1fr);
    }
}

.team-grid-modern {
    display: grid !important;
}

.member-card-new {
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: all 0.4s ease;
}

.member-card-new:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
}

.member-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 31, 54, 0.95) 0%, rgba(0, 31, 54, 0.7) 60%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 25px;
    transition: height 0.4s ease;
}

.member-card-new:hover .member-overlay {
    height: 60%;
    background: linear-gradient(to top, rgba(0, 31, 54, 1) 0%, rgba(0, 31, 54, 0.6) 80%, transparent 100%);
}

.member-info-overlay {
    display: flex;
    flex-direction: column;
    color: white;
    width: 100%;
}

.member-name-new {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.member-role-new {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
    margin-bottom: 15px;
}

.read-more-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--audit-green);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.member-card-new:hover .read-more-btn {
    opacity: 1;
    transform: translateY(0);
}

#member-details p {
    text-align: justify !important;
}

/* Specific Member Backgrounds */
#member1 {
    background-image: url('/res/images/socios/jaimebernal.png');
}

#member2 {
    background-image: url('/res/images/socios/oscarbernal.png');
}

#member3 {
    background-image: url('/res/images/socios/williamolmedo.png');
}

#member4 {
    background-image: url('/res/images/socios/robertoperez.png');
}


.back-to-members {
    font-weight: 700;
}

.back-to-members:hover {
    cursor: pointer;
}

/* ================= FOOTER ================= */

footer {
    background-color: white !important;
}

/* ================= UTILS ================= */

.text-center {
    padding-top: 15px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.beaudit-caret {
    width: 50px;
}

.section-title {
    color: var(--bernal-blue);
    font-weight: bold;
}

.blockquote {
    color: black !important;
    margin: 20px 0;
    padding-left: 1.5rem;
    border-left: 5px solid var(--audit-green);
}

/* =================================================== BOLETINES ============================= */

#hero-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    vertical-align: middle;
    align-items: center;
    position: relative;
    top: 0;
    width: 100vw;
    height: 60vh;
    background-image: url('/res/images/bulletinhero.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

#hero-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.card-image img {
    max-height: 350px;
}

.btnReadBulletin {
    cursor: pointer;
    transition: 0.5s ease all !important;
}

.btnReadBulletin:hover {
    color: var(--audit-green) !important;
    font-weight: bolder;
}

/* =================================================== BOLETIN VISTA ============================= */

#bulletin-row {
    margin: 0 !important;
}

#bulletin-image {
    background-image: url('/res/images/bulletin-read.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    position: relative;
}

#image-degrade {
    background-color: #00000073;
    width: 100%;
    height: 100%;
    position: absolute;
}

#bulletin-text {
    color: white !important;
    padding: 25px 50px;
    position: absolute;
}

#bulletin-content {
    height: 100vh;
    overflow-y: auto;
}

#bulletin-content p {
    text-align: justify !important;
}

#services p {
    text-align: justify !important;
}

@media (max-width: 575.98px) {}

/* Small devices (landscape phones, less than 768px) */

@media (max-width: 767.98px) {
    #nav-logo {
        margin: 0px !important;
    }
}

/* Medium devices (tablets, less than 992px)*/

@media (max-width: 991.98px) {
    .deklog {
        display: none !important;
    }

    .member {
        width: 100%;
        background-position-y: 10% !important;
    }

    /* Tablet: body padding-top already offsets nav, just set height */
    #hero-slider {
        height: calc(85vh - var(--nav-height, 80px)) !important;
    }

    #hero-slides {
        height: calc(85vh - var(--nav-height, 80px)) !important;
    }

    #hero-slider h3 {
        font-size: x-large !important;
        font-weight: 800;
    }

    #hero-slider h4 {
        font-size: small !important;
        font-weight: 400;
    }

    .slider-caption {
        padding: 15px !important;
        bottom: 5% !important;
    }

    .slider .indicators {
        position: relative;
    }

    #bulletin-image {
        height: 25vh;
    }

    #bulletin-row {
        height: 20vh;
    }

    #bulletin-content {
        height: 75vh;
        width: 98vw;
        overflow-y: auto;
    }
}

/* Large devices (desktops, less than 1200px)*/

@media (max-width: 1199.98px) {}

@media (max-width: 1199.98px) {}

/* ================= CONTACT SECTION STANDARD ================= */

.contact-section-container {
    padding: 60px 0;
}

.map-container {
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.contact-info-list {
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding: 10px;
}

.contact-icon {
    color: var(--bernal-blue);
    margin-right: 20px;
}

.contact-details h5 {
    margin: 0 !important;
    font-size: 1.25rem;
    font-weight: 500;
}

.contact-details p {
    margin: 0 !important;
    color: #555;
}

.social-section {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.social-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 15px;
}

.social-links a {
    color: var(--bernal-blue);
    transition: color 0.3s ease;
}


.cta-section {
    background-color: var(--bernal-blue);
    padding: 80px 20px 120px 20px !important;
    /* Robust padding */
    position: relative;
    overflow: hidden;
    text-align: center;
}

#contact-cta-btn {
    margin-top: 30px;
    background-color: white !important;
    color: var(--bernal-blue) !important;
    border: none !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    padding: 0 50px !important;
    height: 64px !important;
    line-height: 64px !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: inline-flex;
    align-items: center;
    gap: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    width: fit-content !important;
}

#contact-cta-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25) !important;
}

#contact-cta-btn i {
    font-size: 28px !important;
    margin: 0 !important;
}

/* ================= EXPERIENCE VALUES ================= */

.experience-values-grid {
    margin-top: 40px;
    align-items: center;
}

.values-list-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    padding: 20px;
}

.value-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid var(--audit-green);
    transition: transform 0.3s ease;
}

.value-item:hover {
    transform: translateX(5px);
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.value-item i {
    color: var(--bernal-blue);
    font-size: 24px;
}

.value-item span {
    font-weight: 600;
    color: #444;
}

.value-item span {
    font-weight: 600;
    color: #444;
}

/* ================= MOBILE SIDENAV REFINEMENTS ================= */

.sidenav {
    width: 280px !important;
    background-color: #fcfcfc !important;
    z-index: 10000 !important;
}

.sidenav-header {
    padding: 40px 20px;
    background-color: var(--bernal-blue);
    text-align: center;
    margin-bottom: 20px;
}

.sidenav-header img {
    width: 150px;
}

.sidenav li>a {
    font-weight: 600 !important;
    color: #333 !important;
    font-size: 1.1rem !important;
    padding: 0 32px !important;
    height: 56px !important;
    line-height: 56px !important;
    transition: all 0.3s ease;
}

.sidenav li>a:hover {
    background-color: rgba(0, 31, 54, 0.05) !important;
    color: var(--bernal-blue) !important;
    padding-left: 40px !important;
}

.sidenav li>a>i {
    color: var(--bernal-blue) !important;
    margin-right: 20px !important;
}

.sidenav .divider {
    margin: 15px 0 !important;
}

/* ================= MOBILE RESPONSIVENESS REFINEMENTS ================= */

@media only screen and (max-width: 600px) {

    /* Mobile: body padding-top already offsets nav, just set height */
    #hero-slider {
        height: calc(45vh - var(--nav-height, 80px)) !important;
    }

    #hero-slides {
        height: calc(45vh - var(--nav-height, 80px)) !important;
    }

    #hero-slider h3 {
        font-size: 1.3rem !important;
        font-weight: 800;
        margin-bottom: 8px !important;
    }

    #hero-slider h4 {
        font-size: 0.9rem !important;
        font-weight: 400;
        line-height: 1.4 !important;
    }

    .slider-caption {
        padding: 20px 15px 45px 15px !important; /* Extra padding bottom for indicators */
        bottom: 0 !important;
        background-color: transparent !important;
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 75%, transparent 100%) !important;
    }

    .cta-section {
        padding: 60px 20px 80px 20px !important;
    }

    .cta-section h1 {
        font-size: 2.2rem !important;
        margin-top: 0 !important;
    }

    .cta-section h6 {
        font-size: 1.1rem !important;
        line-height: 1.4 !important;
        margin-bottom: 40px !important;
    }

    #contact-cta-btn {
        padding: 0 30px !important;
        height: 56px !important;
        line-height: 56px !important;
        font-size: 18px !important;
        width: 90%;
    }

    .sidenav-header {
        padding: 30px 15px !important;
    }

    .sidenav-header img {
        width: 180px !important;
        max-width: 90%;
    }
}

/* Ensure no overflow issues in CTA */
.cta-section {
    overflow: visible !important;
}