/* 
   ==============================================
   Modern, Professional Styles for ICSA
   ==============================================
*/

:root {
    --primary-color: rgba(255, 255, 255, 0.1) /* Original dark blue */
    --secondary-color: #2b8cff; /* Original accent blue */
    --accent-color: #ffffff; /* Orange accent for contrast */
    --text-color: #e6eef8; /* Light text for dark background */
    --light-text-color: #ffffff;
    --background-color: #275192; /* Original dark background */
    --surface-color: #1c2a41; /* A slightly lighter surface for cards */
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Open Sans', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/*
   ==============================================
   Accessibility
   ==============================================
*/
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/*
   ==============================================
   Header
   ==============================================
*/
.site-header {
    background-color: #275192; /* White background to match logo */
    padding: 1rem 0;
    border-bottom: 1px solid #275192; /* Light border for white background */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 50px;
    width: auto;
}

.brand-text .brand-title {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--light-text-color); /* Changed to white */
    margin: 0;
}

.brand-text .brand-tagline {
    font-size: 0.9rem;
    color: #98a0b3; /* Darker muted color for light background */
    margin: 0;
}

/*
   ==============================================
   Navigation
   ==============================================
*/
.site-nav {
    background-color: var(--surface-color);
}

.site-nav .container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.site-nav a {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--light-text-color);
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s;
}

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

.site-nav a:hover {
    color: var(--accent-color);
}

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

.nav-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--light-text-color); /* White color for hamburger icon */
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/*
   ==============================================
   Main Content & Sections
   ==============================================
*/
.section {
    padding: 4rem 0;
}

.section:nth-child(even) {
    background-color: var(--surface-color);
}

.section-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #98a0b3; /* Muted text color */
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.section-empresa .text-content p {
    margin-bottom: 1rem;
}

.section-empresa .highlight {
    background-color: rgba(13, 59, 114, 0.1);
    border-left: 4px solid var(--secondary-color);
    padding: 1rem;
    font-style: italic;
    border-radius: 4px;
}

.section-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/*
   ==============================================
   Clients Section (Swiper Carousel)
   ==============================================
*/
.section-clientes {
    background-color: var(--background-color); /* Darker background for this section */
}

.client-swiper {
    position: relative;
    padding: 2rem 0;
}

.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px; /* Fixed height for all slides */
}

.swiper-slide img {
    max-height: 80px;
    width: auto;
    max-width: 160px;
    filter: grayscale(100%) brightness(0.8);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.swiper-slide:hover img {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
    transform: scale(1.1);
}

/* Swiper Navigation Arrows */
.swiper-button-next,
.swiper-button-prev {
    color: var(--secondary-color);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transition: background-color 0.3s, color 0.3s;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: rgba(43, 140, 255, 0.2);
    color: var(--accent-color);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Swiper Pagination */
.swiper-pagination-bullet {
    background-color: rgba(255, 255, 255, 0.5);
    width: 10px;
    height: 10px;
    opacity: 0.7;
    transition: background-color 0.3s, opacity 0.3s;
}

.swiper-pagination-bullet-active {
    background-color: var(--secondary-color);
    opacity: 1;
}

/*
   ==============================================
   Products Section
   ==============================================
*/
.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.producto-card {
    background-color: var(--surface-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.producto-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.card-content h3 {
    font-family: var(--font-primary);
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
}

.card-content ul {
    list-style: none;
    padding-left: 0;
    color: #98a0b3; /* Muted text color */
}

.card-content ul li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.card-content ul li::before {
    content: '✓';
    color: var(--secondary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/*
   ==============================================
   Contact Section
   ==============================================
*/
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background-color: var(--surface-color);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.contact-card h3 {
    font-family: var(--font-primary);
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--accent-color);
    margin-top: 4px;
}

.contact-item a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--accent-color);
}

.contact-item p {
    margin: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-secondary);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: transparent;
    color: var(--text-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(43, 140, 255, 0.25);
}

.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--light-text-color);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-family: var(--font-primary);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.form-status {
    margin-top: 1rem;
    font-weight: 600;
}

/*
   ==============================================
   Footer
   ==============================================
*/
footer.site-footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 2rem 0;
    text-align: center;
}

footer.site-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

footer.site-footer a {
    color: var(--light-text-color);
    text-decoration: none;
    transition: opacity 0.3s;
}

footer.site-footer a:hover {
    opacity: 0.8;
}

/*
   ==============================================
   Scroll to Top Button
   ==============================================
*/
.scroll-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: var(--light-text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background-color 0.3s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/*
   ==============================================
   Responsive Design
   ==============================================
*/
@media (max-width: 992px) {
    .section-content,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .section-empresa .img-card {
        order: -1; /* Image on top on smaller screens */
    }
}

@media (max-width: 768px) {
    .site-header .container {
        position: relative;
    }

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

    .site-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 300px;
        height: 100%;
        background-color: var(--surface-color);
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .site-nav .container {
        flex-direction: column;
        align-items: flex-start;
        padding: 6rem 2rem 2rem;
        gap: 0;
        border-bottom: none;
    }

    .site-nav a {
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .site-nav a:hover::after {
        width: 0; /* Disable underline on mobile nav */
    }

    /* State for open navigation */
    body.nav-open .site-nav {
        transform: translateX(0);
    }

    body.nav-open .overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }

    body.nav-open .nav-toggle {
        position: fixed;
        top: 1.25rem;
        right: 1.5rem;
    }

    /* Hamburger to X animation */
    body.nav-open .nav-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    body.nav-open .nav-toggle span:nth-child(2) {
        opacity: 0;
    }
    body.nav-open .nav-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .section-title {
        font-size: 2rem;
    }

    .contact-grid {
        padding: 1.5rem;
    }
}

