/* Base Styles */
:root {
    --primary-color: #0082A1; /* Main brand blue */
    --secondary-color: #004F60; /* Dark blue for cards */
    --text-dark: #333;
    --text-light: #fff;
    --bg-light: #f8f8f8;
    --bg-dark: #333;
    --spacing-large: 80px;
    --spacing-medium: 40px;
    --spacing-small: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #E6F4F7; /* Page background color changed to #E6F4F7 */
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-small);
}

.section-padding {
    padding: var(--spacing-large) 0;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: var(--spacing-medium);
    font-weight: 700;
}

.section-subheading {
    color: var(--primary-color);
    font-size: 1.8em;
    margin-top: 20px;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
}

.section-description {
    font-size: 1.1em;
    color: #555;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.bg-light {
    background-color: var(--bg-light);
}

/* Utility classes for fade-in effect */
.hidden-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.visible-fade {
    opacity: 1;
    transform: translateY(0);
}

/* Top Bar for Language Selector */
.top-bar {
    background-color: #fff; /* Changed to white */
    padding: 5px 0; /* Reduced padding to make it thinner */
    border-bottom: 1px solid #f0f0f0; /* Lighter border for contrast */
}

.top-bar .container {
    display: flex;
    justify-content: flex-end; /* Aligns content to the right */
    align-items: center;
}

/* Language Selector */
.language-selector {
    font-size: 0.9em;
    color: var(--text-dark); /* Text color for the selector */
}

.language-selector a {
    color: var(--primary-color);
    margin-left: 10px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.language-selector a:hover {
    color: var(--secondary-color);
}

.language-selector .separator {
    color: var(--text-dark);
    margin-left: 10px;
}


/* Header */
.header {
    background-color: #fff;
    color: var(--text-dark);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between; /* Logo on the left, nav on the right */
    align-items: center;
}

.logo-img img {
    height: 60px; /* Adjust logo size */
    width: auto;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--primary-color);
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease-out;
}

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.8em;
    color: var(--primary-color);
    cursor: pointer;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .top-bar {
        padding: 4px 0; /* Adjusted padding for thinner bar on mobile */
    }
    .top-bar .container {
        justify-content: center; /* Centers the language selector on mobile */
    }
    .language-selector {
        text-align: center;
        margin-left: 0;
        margin-right: 0;
    }
    .language-selector a {
        margin: 0 5px; /* Adjusts margin between language links */
    }

    .nav {
        display: none; /* Hide navigation on small screens by default */
        flex-direction: column;
        position: absolute;
        top: 90px; /* Adjust based on header height + top-bar */
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 999;
        padding: 20px 0;
    }

    .nav.active {
        display: flex; /* Show navigation when active */
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .nav-item {
        width: 100%;
        text-align: center;
    }

    .nav-link {
        display: block;
        padding: 10px 0;
    }

    .menu-toggle {
        display: block; /* Show menu toggle button */
    }

    .logo-img {
        height: 50px; /* Adjust logo height on mobile */
    }
}


/* Hero Section */
.hero {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 60px 0; /* Reduced padding to make it thinner */
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: auto; /* Removed min-height to allow padding to control height */
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5em;
    margin-bottom: 10px;
    color: var(--text-light);
}

.hero-subtitle {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #E0E0E0;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: #fff;
    color: var(--primary-color);
    border: 2px solid #fff;
}

.btn-primary:hover {
    background-color: transparent;
    color: #fff;
}

.btn-secondary {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-secondary:hover {
    background-color: #fff;
    color: var(--primary-color);
}

/* About Section */
.about-content {
    display: block;
}

.about-text {
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.about-image {
    display: none;
}

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

.service-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: var(--spacing-medium);
}

.service-card {
    background-color: var(--secondary-color); /* Changed background color */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    flex: 1;
    min-width: 300px;
    max-width: calc(50% - 15px); /* Adjusted for two columns, similar to product cards */
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card .icon-large {
    font-size: 3em;
    color: var(--text-light); /* Changed icon color for contrast */
    margin-bottom: 20px;
}

.service-card h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6em;
    color: var(--text-light); /* Changed heading color for contrast */
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-light); /* Changed paragraph color for contrast */
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 20px;
}

.btn-text {
    color: var(--text-light); /* Changed link color for contrast */
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-text:hover {
    text-decoration: underline;
}


/* Developments Section */
.development-grid {
    display: flex;
    flex-direction: column; /* Stacks cards vertically */
    align-items: center;
    gap: 40px;
}

.development-card {
    background-color: var(--secondary-color); /* Background color for all development cards */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 30px;
    width: 95%;
    max-width: 1100px;
    margin: 0 auto;
}

.development-card:hover {
    transform: translateY(-5px);
}

.development-card .image-container {
    flex-shrink: 0;
    width: 40%;
    height: auto;
    overflow: hidden;
    position: relative;
}

.development-card img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

.development-card .text-content {
    flex-grow: 1;
}

.development-card h3 {
    color: var(--text-light); /* White text for titles */
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 15px;
}

.development-card p,
.development-card ul {
    color: var(--text-light); /* White text for paragraphs and lists */
    line-height: 1.7;
    font-size: 1.1em;
}
.development-card ul {
    list-style: disc; /* Reverts to bullet points */
    padding-left: 20px; /* Spacing for bullet points */
}


/* Carousel Specific Styles */
.carousel-container {
    position: relative;
    width: 100%; /* Occupies the width of the image-container */
    height: 100%;
    overflow: hidden;
    border-radius: 4px; /* Inherits the border-radius from the image */
}

.carousel-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the space without distortion */
    border-radius: 0; /* We don't want the individual image to have border-radius */
}

/* Hides carousel navigation buttons */
.carousel-nav-btn {
    display: none;
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: var(--primary-color); /* Active color */
}

/* Hero Carousel Specific Styles */
.hero-carousel-container {
    width: 100%;
    height: 400px; /* Fixed height for the top carousel */
    overflow: hidden;
    position: relative;
}

.hero-carousel-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.hero-carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

/* Product and Applications Grid */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    width: 100%; /* Occupy full width of its parent (.container) */
    /* Removed max-width: 1200px; as it's redundant with .container */
}

.product-card {
    background-color: var(--secondary-color); /* Changed background color to secondary color */
    padding: 60px; /* Increased padding for larger cards */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
    flex: 1; /* Allow cards to grow and shrink */
    min-width: 300px; /* Minimum width for cards */
    max-width: calc(50% - 15px); /* Ensures two columns with 30px gap */
}
.product-card:hover {
    transform: translateY(-5px);
}
.product-card img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px;
}
.product-card h3 {
    color: var(--text-light);
    font-size: 1.6em;
    margin-bottom: 12px;
}
.product-card p, .product-card ul {
    color: var(--text-light);
    font-size: 1.1em;
    line-height: 1.6;
    text-align: left;
}
.product-card ul {
    list-style: disc;
    padding-left: 20px;
    margin-top: 10px;
}

.btn-product {
    background-color: #fff;
    color: var(--primary-color);
    border: 2px solid #fff;
    margin: 20px auto 0 auto;
    display: block;
}

.btn-product:hover {
    background-color: transparent;
    color: #fff;
}


/* Specific styles for "Application Fields" section cards */
#aplicaciones .product-card {
    background-color: #fff; /* White background for these cards */
}

#aplicaciones .product-card h3,
#aplicaciones .product-card p {
    color: var(--text-dark); /* Dark text color for contrast on white background */
}

#aplicaciones .product-card ul {
    color: var(--text-dark); /* Dark text color for list items on white background */
    list-style: disc; /* Ensure disc style for lists */
    padding-left: 20px; /* Ensure indentation for lists */
}

#aplicaciones .product-card img {
    width: 175px; /* 30% smaller than 250px (250 * 0.7 = 175) */
    height: auto;
    display: block;
    margin: 0 auto 20px;
}


/* Contact Section */
.contact {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.contact .section-title,
.contact .section-description {
    color: var(--text-light);
}

.contact-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-form {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff; /* White background for the form */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark); /* Dark text color for labels */
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    color: var(--text-dark);
}

.form-group textarea {
    resize: vertical;
}

.contact .btn-light {
    background-color: var(--text-light);
    color: var(--primary-color);
    border: 1px solid var(--text-light);
    width: 100%;
    padding: 12px 0;
}

.contact .btn-light:hover {
    background-color: #E0E0E0;
    color: var(--primary-color);
}

/* Styles for confirmation message */
.confirmation-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    display: none; /* Hidden by default */
    font-weight: bold;
}

.contact .map-container,
.contact-info-block {
    display: none; /* Hidden as per previous requests */
}

/* Footer */
.footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: var(--spacing-medium) 0 var(--spacing-small);
    font-size: 0.9em;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4em;
    color: var(--text-light);
    margin-bottom: 15px;
}

.footer-section p {
    line-height: 1.8;
    color: #ccc;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-section .social-links a {
    color: var(--text-light);
    font-size: 1.2em;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.footer-section .social-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    color: #ccc;
}

.footer-bottom a {
    color: #ccc;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--primary-color);
}


/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8em;
    }
    .service-card {
        max-width: 48%;
    }
    .development-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .development-card .image-container {
        width: 60%; /* Adjustment for larger image on tablets */
        margin-bottom: 20px;
    }
    .development-card .text-content {
        width: 100%;
    }
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .hero-carousel-container {
        height: 300px; /* Adjustment for tablets */
    }
    .hero {
        padding: 40px 0; /* Adjusted padding for smaller screens */
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 4px 0; /* Adjusted padding for thinner bar on mobile */
    }
    .top-bar .container {
        justify-content: center; /* Centers the language selector on mobile */
    }
    .language-selector {
        text-align: center;
        margin-left: 0;
        margin-right: 0;
    }
    .language-selector a {
        margin: 0 5px; /* Adjusts margin between language links */
    }

    .nav {
        display: none; /* Hide navigation on small screens by default */
        flex-direction: column;
        position: absolute;
        top: 90px; /* Adjust based on header height + top-bar */
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 999;
        padding: 20px 0;
    }

    .nav.active {
        display: flex; /* Show navigation when active */
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .nav-item {
        width: 100%;
        text-align: center;
    }

    .nav-link {
        display: block;
        padding: 10px 0;
    }

    .menu-toggle {
        display: block; /* Show menu toggle button */
    }

    .logo-img {
        height: 50px; /* Adjust logo height on mobile */
    }
    .hero {
        padding: 30px 0; /* Adjusted padding for smaller screens */
        min-height: auto;
    }
    .hero-title {
        font-size: 2.2em;
    }
    .hero-subtitle {
        font-size: 1em;
    }
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .btn {
        width: 80%;
        margin: 0 auto;
    }
    .section-title {
        font-size: 2.2em;
    }
    .service-card {
        max-width: 90%; /* Single column on mobile */
    }
    .development-card .image-container {
        width: 80%; /* Adjustment for larger image on mobile */
    }
    .hero-carousel-container {
        height: 250px; /* Adjustment for mobile */
    }
    /* Removed grid-template-columns: 1fr; for .product-grid here */
}

@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }
}

@media (max-width: 480px) {
    .header .logo-img img {
        height: 50px;
    }
    .hero {
        padding: 20px 0; /* Adjusted padding for smaller screens */
    }
    .hero-title {
        font-size: 1.8em;
    }
    .hero-subtitle {
        font-size: 0.9em;
    }
    .section-title {
        font-size: 1.8em;
    }
    .development-card .image-container {
        width: 80%; /* Adjustment for larger image on mobile */
    }
    .hero-carousel-container {
        height: 200px; /* Adjustment for small mobile screens */
    }
}
