/* General Body Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: #333;
    line-height: 1.6;
}

body.modal-open {
    overflow: hidden;
}

/* Header and Navigation */
header {
    background: #F47920; /* Orange background */
    color: #fff;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: 0 auto;
}

nav .logo img {
    height: 100px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: #fff; /* White text for contrast */
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    position: relative;
    transition: color 0.3s;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #fff; /* White underline */
    transition: width 0.3s, left 0.3s;
}

nav ul li a:hover {
    color: #fff; /* Keep text white on hover */
}

nav ul li a:hover::after {
    width: 100%;
    left: 0;
}

#hamburger-menu {
    display: none; /* Hidden by default on desktop */
    color: #fff; /* White icon */
}

/* Main Content */
main {
    padding-top: 80px; /* Adjust based on header height */
}

section {
    padding: 60px 20px;
    text-align: center;
}

section h1, section h2 {
    margin-bottom: 20px;
    font-size: 2.5rem;
}

/* Home Section */
#home {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f4f4f4;
    overflow: hidden;
}

.slider {
    width: 100%;
    position: relative;
    display: grid;
    place-items: center;
    perspective: 100px;
}

.slide-track {
    display: flex;
    width: calc(84vw * 8); /* (80vw width + 2vw margin * 2) * 8 total images */
    animation: scroll 40s linear infinite;
}

.slide {
    width: 80vw; /* Make the slide narrower than the screen */
    max-width: 800px; /* Add a max-width for larger screens */
    height: auto;
    flex-shrink: 0;
    margin: 0 2vw; /* Add some margin between slides */
    transition: transform 0.5s;
}

.slide img {
    width: 100%;
    height: auto;
    max-height: 80vh; /* Adjust max-height to be a bit smaller than viewport */
    object-fit: cover;
    border-radius: 10px; /* Add rounded corners */
    box-shadow: 0 10px 20px rgba(0,0,0,0.15); /* Add a subtle shadow */
}


@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-84vw * 4)); } /* (80vw width + 2vw margin * 2) * 4 unique images */
}

/* Why Hablo Section */
.why-hablo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.hablo-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    flex: 0 1 300px;
}

.hablo-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.hablo-card .icon {
    font-size: 2.5rem;
    color: #0a2540;
    margin-bottom: 15px;
}

.hablo-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.hablo-card p {
    font-size: 0.9rem;
    color: #666;
}

/* Products Section */
.product-grid {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 20px; /* For scrollbar visibility */
    width: 90%;
    margin: 0 auto;
}

.product-card {
    position: relative;
    flex: 0 0 300px; /* Fixed width for each card */
    margin-right: 20px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    white-space: normal; /* Ensure text wraps */
    text-align: left;
}

.product-card:hover .product-info {
    opacity: 1;
    visibility: visible;
}

.product-info h3 {
    margin-top: 0;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.product-info button {
    background: #fff;
    color: #333;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    float: right;
    font-weight: bold;
}

/* Videos Section */
#videos {
    background: #f4f4f4;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 90%;
    margin: 0 auto;
}

.video-grid iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
}


/* Contact Section */
#contact-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#contact-form input, #contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#contact-form button {
    background: #25D366;
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.3s;
}

#contact-form button:hover {
    background-color: #128C7E;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 10px;
    position: relative;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
}

#modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-height: 70vh; /* Set a max height */
    overflow-y: auto; /* Enable vertical scrolling */
    padding-right: 15px; /* Add space for the scrollbar */
}

/* Custom scrollbar for the subproduct modal body */
#modal-body::-webkit-scrollbar {
    width: 8px;
}

#modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

#modal-body::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

#modal-body img {
    width: 100%;
    border-radius: 5px;
}

/* New Info Modal Styles */
#info-modal .modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    position: relative;
}

#info-modal-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px 20px 10px 5px; /* Top, Right, Bottom, Left */
    font-size: 1.05rem; /* Slightly larger font */
    line-height: 1.9; /* More spacing between lines */
    color: #4a4a4a; /* Softer black for text */
    text-align: justify; /* Justify text for a cleaner look */
}

/* Custom scrollbar for the modal body */
#info-modal-body::-webkit-scrollbar {
    width: 8px;
}

#info-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#info-modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

#info-modal-body::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}


#info-modal-body h2 {
    margin-top: 0;
    color: #0a2540;
    font-size: 1.8rem; /* Larger title */
    text-align: center; /* Center the title */
    margin-bottom: 25px; /* More space below the title */
    font-weight: 600;
}

#info-modal-body p {
    margin-bottom: 20px; /* More space between paragraphs */
}


.subproduct-item {
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.subproduct-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.subproduct-item ul {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

.subproduct-item li {
    margin-bottom: 5px;
    position: relative;
    padding-left: 20px;
}

.subproduct-item li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: #28a745;
}


/* Responsive Design */
@media (max-width: 768px) {
    #nav-links {
        display: none; /* Hide desktop nav by default */
        flex-direction: column;
        position: absolute;
        top: 80px; /* Position below header */
        right: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        padding: 20px 0;
    }

    #nav-links.nav-active {
        display: flex; /* Show mobile nav when active */
    }

    #nav-links li {
        text-align: center;
        padding: 10px 0;
    }

    #nav-links li a {
        color: #333; /* Dark text for mobile menu */
    }

    #hamburger-menu {
        display: block; /* Show hamburger icon */
        font-size: 1.8rem;
        cursor: pointer;
    }

    #modal-body {
        grid-template-columns: 1fr;
    }
}

/* New media query for home screen on mobile */
@media (max-width: 768px) {
    #home {
        min-height: auto; /* Let the content define the height */
        padding: 80px 0 60px; /* Add more vertical padding (top, horizontal, bottom) */
    }

    .slide {
        width: 90vw; /* Make slides a bit wider on mobile */
        margin: 0 1vw; /* Reduce margin */
    }

    .slide-track {
        width: calc(92vw * 8); /* (90vw width + 1vw margin * 2) * 8 total images */
    }

    @keyframes scroll {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-92vw * 4)); } /* (90vw width + 1vw margin * 2) * 4 unique images */
    }
}


/* Footer */
.site-footer {
    background-color: #0a2540;
    color: #fff;
    padding: 20px;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    margin: 10px;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    border-bottom: 1px solid #fff;
    padding-bottom: 10px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

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

.footer-column a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: #ddd;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.certification-icon {
    display: flex;
    align-items: center;
    font-size: 1rem;
}

.certification-icon i {
    font-size: 2.5rem;
    margin-right: 10px;
}


a.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: #fff;
    color: #0a2540;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.5rem;
    transition: background-color 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

a.social-icon:hover {
    background-color: #ddd;
    color: #0a2540;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Floating Icons */
#floating-whatsapp-icon {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000;
}

#floating-catalogue-icon {
    position: fixed;
    bottom: 100px; /* Position above the WhatsApp icon */
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #fff; /* Changed to white */
    border: 1px solid #eee; /* Added a light border */
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000;
}

#floating-catalogue-icon svg {
    width: 80%;
    height: 80%;
    padding: 5px; /* Add some padding so text doesn't touch the edge */
}

