/* General Body Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
    padding: 20px 0;
}

/* Header Styles */
header {
    background: #2c3e50;
    color: #ffffff;
    padding: 1rem 0;
    text-align: center;
    border-bottom: #3498db 3px solid;
}

header h1 {
    margin: 0;
    padding-bottom: 10px;
}

header nav ul {
    padding: 0;
    list-style: none;
}

header nav ul li {
    display: inline;
    padding: 0 15px;
}

header nav ul li a {
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
}

header nav ul li a:hover {
    color: #3498db;
}

/* Hero Section - Carousel Specific Styles */
.hero {
    min-height: 500px; /* Adjust height for carousel */
    position: relative;
    overflow: hidden;
    background-color: #34495e; /* Fallback background */
    display: flex; /* Use flex to align button */
    flex-direction: column;
    justify-content: flex-end; /* Align button to bottom */
    align-items: center;
    padding-bottom: 50px; /* Space for the button */
}

.carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-slide {
    display: none; /* Hidden by default */
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the entire slide area */
    filter: brightness(0.7); /* Darken image for text readability */
}

.carousel-caption {
    position: absolute;
    bottom: 20%; /* Adjust position of caption */
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    text-align: center;
    width: 80%;
    max-width: 800px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    border-radius: 8px;
    box-sizing: border-box;
}

.carousel-caption h2 {
    font-size: 2.8em;
    margin-bottom: 10px;
}

.carousel-caption p {
    font-size: 1.2em;
}

/* Next & previous buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.4);
    z-index: 900; /* Below button */
}

/* Position the "next button" to the right */
.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

/* On hover, add a black background with a little more opacity */
.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}

/* The dots/bullets/indicators */
.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
    z-index: 900; /* Below button */
    position: relative; /* For proper positioning */
    bottom: 30px; /* Adjust vertical position */
}

.active, .dot:hover {
    background-color: #717171;
}

/* Fading animation */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}


.hero button {
    background: #e74c3c;
    color: #ffffff;
    border: none;
    padding: 12px 25px; /* Slightly larger padding */
    font-size: 1.2em; /* Slightly larger font */
    cursor: pointer;
    border-radius: 5px;
    margin-bottom: 20px; /* Space from bottom */
    z-index: 1000; /* Ensure button is above carousel */
    position: relative; /* Needed for z-index to work against absolute carousel */
    transition: background 0.3s ease, transform 0.3s ease;
}

.hero button:hover {
    background: #c0392b;
    transform: translateY(-3px); /* Slight lift on hover */
}


/* Services Section */
#servicios {
    background: #ffffff;
    text-align: center;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.service-item {
    background: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-item h3 {
    color: #2c3e50;
    margin-top: 15px; /* Space after image */
}

.service-item .service-icon {
    width: 100%;
    height: 180px; /* Fixed height for consistency */
    object-fit: cover; /* Ensure images cover the area without distortion */
    border-radius: 5px;
    margin-bottom: 10px;
}

/* Diagnostic Section */
#diagnostico {
    background: #ecf0f1;
    padding: 40px 0;
    text-align: center;
}

#diagnosticForm {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 30px auto;
    text-align: left;
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-group label {
    flex: 1;
    margin-right: 15px;
    font-size: 1.1em;
}

.form-group input[type="checkbox"] {
    transform: scale(1.5); /* Make checkbox larger */
}

#diagnosticForm button {
    display: block;
    width: 100%;
    padding: 10px;
    background: #3498db;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s ease;
}

#diagnosticForm button:hover {
    background: #2980b9;
}

.result-box {
    margin-top: 30px;
    padding: 20px;
    background: #d4edda;
    border: 1px solid #28a745;
    border-radius: 5px;
    color: #155724;
    text-align: left;
    display: none; /* Hidden by default */
}

.result-box.show {
    display: block; /* Shown when there's a result */
}

.result-box ul {
    list-style: none;
    padding: 0;
}

.result-box ul li {
    margin-bottom: 8px;
}


/* Contact Section */
#contacto {
    background: #ffffff;
    padding: 40px 0;
    text-align: center;
}

#contacto address {
    margin-top: 20px;
    font-style: normal; /* Override default italic address style */
}

#contacto address p {
    margin: 8px 0;
}

/* Footer Styles */
footer {
    background: #2c3e50;
    color: #ffffff;
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
}

/* WhatsApp Floating Button Styles */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366; /* WhatsApp green */
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000; /* Ensure it stays on top of other content */
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none; /* Remove underline from link */
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1); /* Slightly enlarge on hover */
    background-color: #1DA851; /* Darker green on hover */
}

.whatsapp-float i {
    margin-top: 0px; /* Adjust icon vertical alignment if needed */
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 90%;
    }

    .hero {
        min-height: 400px;
    }

    .carousel-caption h2 {
        font-size: 2em;
    }

    .carousel-caption p {
        font-size: 1em;
    }

    header nav ul li {
        display: block;
        padding: 5px 0;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .form-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-group label {
        margin-bottom: 5px;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 25px;
    }
}