/* Petroplast Landing Page - Custom Styles */

/* CSS Variables for consistent theming */
:root {
    --primary-color: #002748;
    --secondary-color: #64748b;
    --accent-color: #eee741;
    --light-bg: #f8fafc;
    --dark-text: #334155;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Global Styles */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    overflow-x: hidden;
    max-width: 100%;
    position: relative;
}

/* Custom Bootstrap Overrides */
.bg-primary {
    background-color: var(--primary-color) !important;
}

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

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #001a2e;
    border-color: #001a2e;
}

.btn-warning {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-warning:hover {
    background-color: #d4d03a;
    border-color: #d4d03a;
}

/* Navigation Styles */
.navbar {
    transition: all 0.3s ease, transform 0.3s ease;
    box-shadow: var(--shadow);
    max-width: 100%;
    z-index: 1030;
    /* Ensure navbar is above other content */
}

.navbar .container {
    padding-left: 4rem;
    padding-right: 4rem;
}

@media (max-width: 768px) {
    .navbar .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (max-width: 576px) {
    .navbar .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Navbar hidden state (when scrolling in hero) */
.navbar-hidden {
    transform: translateY(-100%);
}

/* Navbar transparent state (initial) */
.navbar-transparent {
    background-color: transparent !important;
    box-shadow: none;
}

.navbar-transparent .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-transparent .nav-link:hover {
    color: var(--accent-color) !important;
}

.navbar-transparent .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
}

.navbar-transparent .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    color: white;
}

/* Navbar solid state (when scrolled to about section) */
.navbar-solid {
    background-color: var(--primary-color) !important;
    box-shadow: var(--shadow);
}

.navbar-solid .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-solid .nav-link:hover {
    color: var(--accent-color) !important;
}

.navbar-solid .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
}

.navbar-solid .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    color: white;
}

/* Navbar with open mobile menu - always solid for readability */
.navbar-transparent.show,
.navbar-transparent .navbar-collapse.show {
    background-color: var(--primary-color) !important;
}

@media (max-width: 991px) {
    .navbar-transparent .navbar-collapse {
        background-color: var(--primary-color);
        margin-top: 1rem;
        padding: 1rem;
        border-radius: 0.5rem;
    }
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0;
    display: flex;
    align-items: center;
}

.navbar-logo {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Logo visible when navbar is transparent (at the very top) */
.navbar-transparent .navbar-logo {
    opacity: 1;
    visibility: visible;
}

/* Logo visible when navbar is solid */
.navbar-solid .navbar-logo {
    opacity: 1;
    visibility: visible;
}

.navbar-solid .navbar-logo:hover {
    opacity: 0.9;
}

.nav-link {
    font-weight: 400;
    transition: color 0.3s ease, opacity 0.6s ease, transform 0.6s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateY(-10px);
}

.nav-link.nav-link-loaded {
    opacity: 1;
    transform: translateY(0);
}

.nav-link:hover {
    color: var(--accent-color) !important;
}

/* Language switcher button animation */
.dropdown {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.dropdown.dropdown-loaded {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.25rem;
    }

    .navbar-logo {
        height: 40px;
        max-width: 150px;
    }
}

/* Hero Section */
.hero-section {
    height: 100vh;
    min-height: 600px;
    background-image: url('../images/hero/plant-1.jpeg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 1;
}

.hero-title-section {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-top: 2rem;
    padding-left: 3rem;
    padding-right: 3rem;
    text-align: left;
}

.hero-title-section h1 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.hero-title-section p {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0;
}

.hero-scroll-button {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    padding-bottom: 1rem;
}

.btn-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-chevron:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(5px);
    color: white;
}

.btn-chevron i {
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@media (min-width: 769px) {
    .hero-scroll-button {
        padding-bottom: 1.5rem;
    }

    .hero-title-section {
        padding-top: 3rem;
        padding-left: 4rem;
        padding-right: 4rem;
    }

    .btn-chevron {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }
}

/* Section Spacing */
section {
    padding: 5rem 0;
    overflow-x: hidden;
}

/* Scroll margin for smooth scrolling with fixed navbar */
section[id] {
    scroll-margin-top: 80px;
}

.container {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

.container-fluid {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

/* Prevent horizontal overflow */
* {
    box-sizing: border-box;
}

/* Ensure Bootstrap containers don't overflow */
@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* About Section */
.about-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 0;
    position: relative;
}

.about-section .container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.about-section .row {
    width: 100%;
    margin: 0;
}

.about-content {
    max-width: 100%;
    padding: 0 2rem;
    width: 100%;
}

.about-content .lead {
    text-align: center;
    line-height: 1.8;
    font-size: 1.25rem;
    color: var(--dark-text);
}

.about-content h2 {
    margin-bottom: 3rem !important;
}

@media (max-width: 992px) {
    .about-section {
        padding: 5rem 0;
    }

    .about-content {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .about-section {
        min-height: 100vh;
        padding: 4rem 0;
    }

    .about-content {
        padding: 0 1rem;
    }

    .about-content .lead {
        font-size: 1.1rem;
        line-height: 1.7;
    }

    .about-content h2 {
        margin-bottom: 2rem !important;
    }
}

/* Services Section */
.bg-light {
    background-color: var(--light-bg) !important;
}

.card {
    transition: all 0.3s ease;
    border-radius: 1rem;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-body {
    padding: 2rem;
}

/* Ensure all images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Projects Section */
.card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Contact Form */
.form-control {
    border-radius: 0.5rem;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 39, 72, 0.25);
}

.form-select {
    border-radius: 0.5rem;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 39, 72, 0.25);
}

/* Footer */
footer {
    background-color: #1e293b !important;
}

footer a:hover {
    color: var(--accent-color) !important;
    transition: color 0.3s ease;
}

.social-links a {
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
/* Tablets and smaller screens */
@media (max-width: 992px) {
    .hero-section {
        background-attachment: scroll;
    }

    section {
        padding: 4rem 0;
    }
}

/* All sections responsive padding */
@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }

    .display-5 {
        font-size: 2.2rem;
    }

    .lead {
        font-size: 1.1rem;
    }
}

/* Mobile devices - Landscape orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        height: 100vh;
        min-height: 500px;
        background-size: cover;
        background-position: center 30%;
    }

    .hero-overlay {
        background: linear-gradient(to right, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.35) 100%);
    }

    .hero-title-section {
        padding-top: 2rem;
        padding-left: 2rem;
        padding-right: 2rem;
        text-align: center;
    }

    .hero-title-section h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .hero-title-section p {
        font-size: 1.75rem;
        margin-bottom: 0;
        font-weight: 600;
    }

    .hero-scroll-button {
        padding-bottom: 1rem;
    }

    .btn-chevron {
        width: 55px;
        height: 55px;
        font-size: 1.25rem;
    }
}

/* Mobile devices - Portrait orientation */
@media (max-width: 768px) and (orientation: portrait) {
    .hero-section {
        height: 100vh;
        min-height: 700px;
        background-size: cover;
        background-position: center 40%;
        background-attachment: scroll;
        position: relative;
    }

    .hero-overlay {
        background: linear-gradient(to bottom,
                rgba(0, 0, 0, 0.7) 0%,
                rgba(0, 0, 0, 0.6) 50%,
                rgba(0, 0, 0, 0.5) 100%);
    }

    .hero-section .container {
        justify-content: center !important;
        position: relative;
    }

    .hero-scroll-button {
        position: absolute;
        bottom: 1rem;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 3;
        padding: 0;
    }

    .btn-chevron {
        width: 55px;
        height: 55px;
        font-size: 1.25rem;
    }

    .hero-title-section {
        padding-top: 0;
        padding-left: 2rem;
        padding-right: 2rem;
        text-align: center;
    }

    .hero-title-section h1 {
        font-size: 2.2rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    }

    .hero-title-section p {
        font-size: 1.9rem;
        line-height: 1.3;
        margin-bottom: 0;
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
        font-weight: 600;
    }

    /* About Section Mobile */
    .about-image {
        margin-bottom: 2rem;
    }

    /* Cards Mobile */
    .card-body {
        padding: 1.5rem;
    }

    /* Services cards */
    .list-unstyled.text-start {
        padding-left: 0;
    }
}

/* Small mobile devices */
@media (max-width: 576px) {
    .hero-section {
        min-height: 600px;
        height: 100vh;
        height: 100dvh;
    }

    .hero-section .container {
        justify-content: center !important;
        position: relative;
    }

    .hero-scroll-button {
        position: absolute;
        bottom: 1rem;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 3;
        padding: 0;
    }

    .hero-title-section {
        text-align: center;
        padding-top: 0;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .hero-title-section h1 {
        font-size: 1.75rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }

    .hero-title-section p {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 0;
        font-weight: 600;
    }

    .btn-chevron {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    section {
        padding: 2.5rem 0;
    }

    .display-5 {
        font-size: 2rem;
    }

    .lead {
        font-size: 1rem;
    }

    /* Form mobile */
    .card-body.p-3.p-md-5 {
        padding: 1.5rem !important;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .hero-section {
        min-height: 550px;
    }

    .hero-section .container {
        justify-content: center !important;
        position: relative;
    }

    .hero-scroll-button {
        position: absolute;
        bottom: 0.75rem;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 3;
        padding: 0;
    }

    .hero-title-section {
        text-align: center;
        padding-top: 0;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .hero-title-section h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .hero-title-section p {
        font-size: 1.3rem;
        margin-bottom: 0;
        font-weight: 600;
    }

    .btn-chevron {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .card-body {
        padding: 1rem;
    }

    section {
        padding: 2rem 0;
    }
}

/* iPhone 14 Pro Max and similar large phones */
@media (max-width: 430px) and (min-height: 900px) {
    .hero-section {
        height: 100vh;
        min-height: 850px;
        background-size: cover;
        background-position: center 35%;
    }

    .hero-overlay {
        background: linear-gradient(to bottom,
                rgba(0, 0, 0, 0.75) 0%,
                rgba(0, 0, 0, 0.65) 30%,
                rgba(0, 0, 0, 0.55) 70%,
                rgba(0, 0, 0, 0.45) 100%);
    }

    .hero-section .container {
        justify-content: center !important;
        position: relative;
    }

    .hero-scroll-button {
        position: absolute;
        bottom: 1rem;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 3;
        padding: 0;
    }

    .hero-title-section {
        text-align: center;
        padding-top: 0;
        padding-left: 1.75rem;
        padding-right: 1.75rem;
    }

    .hero-title-section h1 {
        font-size: 1.9rem;
        margin-bottom: 0.5rem;
    }

    .hero-title-section p {
        font-size: 1.65rem;
        margin-bottom: 0;
        font-weight: 600;
    }

    .btn-chevron {
        width: 55px;
        height: 55px;
        font-size: 1.2rem;
    }
}

/* 
 * ALTERNATIVAS ADICIONALES PARA MOBILE (Si la solución actual no es suficiente)
 * 
 * Opción 1: Imagen diferente para mobile
 * Agregar en HTML: <div class="hero-bg-mobile"></div> dentro de .hero-section
 * En CSS mobile:
 * .hero-section {
 *     background-image: none;
 * }
 * .hero-bg-mobile {
 *     position: absolute;
 *     top: 0;
 *     left: 0;
 *     width: 100%;
 *     height: 100%;
 *     background-image: url('../images/hero/plant-1-mobile.jpg');
 *     background-size: cover;
 *     background-position: center;
 *     z-index: 0;
 * }
 * 
 * Opción 2: Usar object-fit con img element
 * Cambiar a: <img src="..." class="hero-bg-image" />
 * .hero-bg-image {
 *     position: absolute;
 *     width: 100%;
 *     height: 100%;
 *     object-fit: cover;
 *     object-position: center 40%;
 * }
 * 
 * Opción 3: Background-size contain para ver imagen completa
 * .hero-section {
 *     background-size: contain;
 *     background-color: #001a2e; // Color de respaldo
 * }
 * 
 * Opción 4: Imagen más oscura por defecto + overlay más sutil
 * Ajustar overlay a: rgba(0, 0, 0, 0.3) - rgba(0, 0, 0, 0.1)
 */

/* Utility Classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.border-radius-lg {
    border-radius: 1rem;
}

.shadow-custom {
    box-shadow: var(--shadow-lg);
}

/* Loading Animation */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Form Validation Styles */
.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-valid {
    border-color: #198754;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.valid-feedback {
    display: block;
    color: #198754;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success Message */
.alert-success {
    background-color: #d1edff;
    border-color: #b6effb;
    color: #0c5460;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #001a2e;
}

/* Print Styles */
@media print {

    .navbar,
    .hero-buttons,
    footer {
        display: none !important;
    }

    .hero-section {
        height: auto;
        background: none !important;
        color: black !important;
    }

    .hero-content {
        color: black !important;
    }
}

/* Product Cards Styles */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Modal Gallery Styles */
.modal {
    transition: none !important;
}

.modal-dialog {
    transition: none !important;
}

.modal-content {
    border: none !important;
    border-radius: 0 !important;
    overflow: hidden;
    position: relative;
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: none !important;
}

.modal-close-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1055;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    border: none;
    background-image: none;
}

.modal-close-overlay:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 1);
}

.modal-close-overlay::before {
    content: '×';
    font-size: 28px;
    line-height: 1;
    color: #000;
    font-weight: bold;
}

.modal-close-overlay::after {
    display: none;
}

.modal-dialog {
    max-width: 90vw;
    margin: 0 auto;
    padding: 0;
}

.modal-dialog.modal-dialog-scrollable {
    height: auto;
}

.modal-dialog.modal-dialog-scrollable .modal-content {
    max-height: none;
}

.modal-body {
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

.carousel-inner {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.carousel-item {
    width: 100%;
    margin: 0;
    padding: 0;
    transition: transform 0.6s ease-in-out;
    position: relative;
    display: block;
    float: left;
    width: 100%;
    margin-right: -100%;
    backface-visibility: hidden;
}

.carousel-item.active,
.carousel-item-next,
.carousel-item-prev {
    display: block;
}

.carousel-item:not(.active):not(.carousel-item-next):not(.carousel-item-prev) {
    display: none;
}

/* Transiciones para el efecto swipe - Bootstrap 5 */
/* Imagen entrante desde la derecha (siguiente) */
.carousel-item-next:not(.carousel-item-start) {
    transform: translateX(100%);
}

/* Imagen entrante desde la izquierda (anterior) */
.carousel-item-prev:not(.carousel-item-end) {
    transform: translateX(-100%);
}

/* Imagen saliente hacia la derecha (cuando va a la siguiente) */
.active.carousel-item-end {
    transform: translateX(100%);
}

/* Imagen saliente hacia la izquierda (cuando va a la anterior) */
.active.carousel-item-start {
    transform: translateX(-100%);
}

/* Imagen entrante cuando termina la transición (posición final) */
.carousel-item-next.carousel-item-start,
.carousel-item-prev.carousel-item-end {
    transform: translateX(0);
}

/* Imagen activa en posición normal */
.carousel-item.active:not(.carousel-item-start):not(.carousel-item-end) {
    transform: translateX(0);
}

.carousel-fade .carousel-item {
    opacity: 0;
    transition-property: opacity;
    transform: none;
}

.carousel-fade .carousel-item.active,
.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
    z-index: 1;
    opacity: 1;
}

.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
    z-index: 0;
    opacity: 0;
    transition: opacity 0s 0.6s;
}

.carousel-item img {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    background-color: transparent;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

/* Eliminar bordes y espacios adicionales del modal */
.modal.show .modal-dialog {
    margin: 0 auto;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Asegurar que el carousel mantenga altura consistente durante transiciones */
.carousel-inner::after {
    content: "";
    display: block;
    clear: both;
}

/* Asegurar que el modal dialog se ajuste al contenido */
.modal-dialog.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

.modal-dialog.modal-dialog-centered::before {
    display: none;
}

/* Mobile-specific modal carousel styles */
@media (max-width: 768px) {

    /* Ajustar el modal para que ocupe más espacio en mobile */
    .modal-dialog {
        max-width: 95vw;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
    }

    /* Botón de cierre en la esquina superior derecha */
    .modal-close-overlay {
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 1060;
        background-color: rgba(255, 255, 255, 0.95);
        border-radius: 50%;
        width: 45px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        opacity: 1;
        transition: background-color 0.3s ease;
        border: 2px solid rgba(0, 0, 0, 0.1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .modal-close-overlay:hover {
        background-color: rgba(255, 255, 255, 1);
    }

    .modal-close-overlay::before {
        content: '×';
        font-size: 32px;
        line-height: 1;
        color: #000;
        font-weight: bold;
    }

    /* Imagen ocupa 100% del contenedor */
    .carousel-item img {
        width: 100%;
        height: auto;
        max-height: 75vh;
        object-fit: contain;
        background-color: transparent;
        display: block;
        margin: 0 auto !important;
        padding: 0 !important;
        border: none !important;
        outline: none !important;
    }

    /* Contenedor del carrusel ajustado */
    .modal-body {
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
    }

    .carousel {
        width: 100%;
        height: auto;
        position: relative;
        margin-bottom: 80px;
        /* Espacio para los botones inferiores */
    }

    .carousel-inner {
        width: 100%;
        height: auto;
        overflow: visible;
    }

    /* Flechas de navegación en el borde inferior como botones - mismo estilo que el botón X */
    .carousel-control-prev,
    .carousel-control-next {
        position: fixed;
        bottom: 20px;
        top: auto;
        width: 45px;
        height: 45px;
        opacity: 1;
        background-color: rgba(255, 255, 255, 0.95);
        border-radius: 50%;
        border: 2px solid rgba(0, 0, 0, 0.1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        z-index: 1060;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.3s ease;
    }

    .carousel-control-prev {
        left: 20px;
        right: auto;
    }

    .carousel-control-next {
        right: 20px;
        left: auto;
    }

    .carousel-control-prev:hover,
    .carousel-control-next:hover {
        background-color: rgba(255, 255, 255, 1);
        opacity: 1;
    }

    /* Iconos de las flechas más visibles */
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 24px;
        height: 24px;
        background-size: 100% 100%;
        filter: invert(1);
    }

    /* Backdrop con blur fuerte */
    .modal-backdrop.show {
        opacity: 0.8;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    /* Asegurar que el contenido del modal esté centrado */
    .modal-content {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
    }
}