/* ==========================================================================
   DESIGN SYSTEM & CUSTOM STYLES - WATER & CHEMICAL PERÚ
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #243474;
    --primary-rgb: 36, 52, 116;
    --accent-color: #5896D1;
    --accent-rgb: 88, 150, 209;
    --dark-color: #0f172a;
    --light-color: #f8fafc;
    --text-color: #334155;
    --text-light: #64748b;
    --white: #ffffff;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Montserrat', sans-serif;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 0;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.25;
}

p {
    font-size: 0.95rem;
    color: var(--text-light);
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 0;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.4);
}

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Utility Layouts */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header span {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 15px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* Top Bar */
.topbar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.8rem;
}

.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.topbar-info {
    display: flex;
    gap: 20px;
}

.topbar-info li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-info i {
    color: var(--accent-color);
}

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

.topbar-social a:hover {
    color: var(--accent-color);
}

/* Header & Nav */
header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

header.sticky {
    box-shadow: var(--shadow-md);
    padding: 5px 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

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

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Slider */
.hero {
    position: relative;
    height: calc(100vh - 120px);
    min-height: 550px;
    overflow: hidden;
}

.slider-container {
    height: 100%;
    width: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.slide.active {
    opacity: 1;
    z-index: 10;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.85) 0%, rgba(var(--primary-rgb), 0.4) 100%);
    z-index: 11;
}

.slide-content {
    position: relative;
    z-index: 12;
    color: var(--white);
    max-width: 700px;
    padding-left: 20px;
    animation: fadeInUp 1s ease-out;
}

.slide-content h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 20px;
    font-weight: 800;
}

.slide-content p {
    color: #e2e8f0;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Slider Controls */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

.slider-btn:hover {
    background-color: var(--accent-color);
}

.slider-prev {
    left: 30px;
}

.slider-next {
    right: 30px;
}

.slider-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background-color: var(--accent-color);
    width: 30px;
    border-radius: 10px;
}

/* Nosotros Section */
.nosotros-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.nosotros-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 40px 30px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-top: 5px solid var(--accent-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.nosotros-card:nth-child(2) {
    border-top-color: var(--primary-color);
}

.nosotros-card:nth-child(3) {
    border-top-color: var(--accent-color);
}

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

.card-image-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    transition: var(--transition);
}

.card-image-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.nosotros-card:hover .card-image-icon {
    transform: scale(1.1);
}

.nosotros-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

/* Team Info Section (Improved & Brightened with Corporate Blue) */
.team-section {
    background-color: var(--primary-color);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.team-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.team-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    border: 10px solid var(--white);
    background-color: var(--white);
    transition: var(--transition);
}

.team-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.35);
}

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

.team-content {
    padding-left: 10px;
}

.team-content h2 {
    font-size: 2.4rem;
    margin-bottom: 30px;
    color: var(--white);
    position: relative;
    display: inline-block;
}

.team-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 70px;
    height: 4px;
    background-color: var(--accent-color);
}

.team-content p {
    margin-bottom: 25px;
    text-align: justify;
    line-height: 1.7;
    color: #cbd5e1;
    font-size: 0.98rem;
}

.team-content .btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--white);
}

.team-content .btn-primary:hover {
    background-color: var(--white);
    border-color: var(--white);
    color: var(--primary-color);
}

/* Proyectos Section Tabs Styling (Rich & Premium) */
.proyectos-tabs-container {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    display: block;
    margin: 0 auto 50px auto;
    box-shadow: none;
}

.proyectos-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.tab-btn {
    background-color: transparent;
    border: 1px solid #cbd5e1;
    color: var(--text-color);
    padding: 12px 24px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 0;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.tab-btn i {
    font-size: 1.05rem;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--primary-color);
    background-color: var(--white);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 8px 16px rgba(var(--primary-rgb), 0.25);
}

.tab-btn.active i {
    transform: scale(1.1);
}

#proyectos .container {
    text-align: center; /* Center the tab container */
}

.proyectos-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 20px;
}

.proyecto-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: row;
    height: auto;
    min-height: 280px;
    width: 100%;
}

.proyecto-card:nth-child(even) {
    flex-direction: row-reverse;
}

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

.proyecto-img {
    flex: 0 0 38%;
    min-width: 280px;
    position: relative;
    overflow: hidden;
}

.proyecto-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.proyecto-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 30px;
    z-index: 10;
}

.proyecto-card:nth-child(even) .proyecto-badge {
    left: auto;
    right: 20px;
}

.proyecto-info {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    flex-grow: 1;
    text-align: left;
    gap: 15px;
}

.proyecto-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0;
    color: var(--primary-color);
}

.proyecto-info p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 5px;
    text-align: justify;
}

.proyecto-specs {
    margin-top: 5px;
    margin-bottom: 10px;
}

.proyecto-specs h4 {
    font-size: 0.95rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 700;
}

.proyecto-specs ul {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.proyecto-specs li {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}

.proyecto-specs li::before {
    content: '✓';
    color: var(--accent-color);
    font-weight: 700;
}

.btn-consultar-whatsapp {
    align-self: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    padding: 10px 20px;
    margin-top: 10px;
}

/* Stats Section */
.stats {
    background-image: linear-gradient(135deg, rgba(36, 52, 116, 0.92) 0%, rgba(88, 150, 209, 0.85) 100%), url('../img/portada_conteo.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--white);
    padding: 100px 0;
    text-align: center;
    position: relative;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.stat-item {
    padding: 20px;
}

.stat-icon {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.stat-icon img {
    height: 50px;
    width: auto;
}

.stat-number-container {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 10px;
    gap: 5px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
}

.stat-text {
    font-size: 1rem;
    color: #cbd5e1;
    font-weight: 500;
}

/* Brands Slider */
.brands {
    background-color: var(--white);
    border-bottom: 1px solid #f1f5f9;
}

.brands-container {
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

.brands-track {
    display: flex;
    gap: 60px;
    width: max-content;
    animation: scrollBrands 35s linear infinite;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
    opacity: 1;
    transition: var(--transition);
}

.brand-logo:hover {
    transform: scale(1.05);
}

.brand-logo img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

@keyframes scrollBrands {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Contact & FAQ Grid */
.contact-faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

/* FAQ Accordion */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.faq-item.active {
    background-color: var(--white);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}

.faq-question {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
    user-select: none;
}

.faq-toggle-icon {
    font-size: 1.1rem;
    transition: var(--transition);
    color: var(--accent-color);
}

.faq-item.active .faq-toggle-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer-inner {
    padding: 0 25px 20px 25px;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-light);
}

/* Contact Form */
.contact-wrapper {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid #f1f5f9;
}

.contact-wrapper h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--primary-color);
}

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

.form-control {
    width: 100%;
    padding: 12px 18px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    border: 1px solid #cbd5e1;
    border-radius: 0;
    background-color: var(--light-color);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-color);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

textarea.form-control {
    resize: none;
    height: 130px;
}

.form-feedback {
    display: none;
    margin-top: 15px;
    padding: 12px;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.form-feedback.success {
    display: block;
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-feedback.error {
    display: block;
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: #94a3b8;
    padding: 80px 0 30px 0;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-about img {
    height: 60px;
    margin-bottom: 20px;
}

.footer-about p {
    color: #94a3b8;
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #94a3b8;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--white);
    transform: translateX(5px);
}

.footer-contact li {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    align-items: flex-start;
    line-height: 1.5;
}

.footer-contact i {
    color: var(--accent-color);
    font-size: 1rem;
    margin-top: 3px;
}

.footer-contact span {
    font-weight: 500;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.8rem;
}



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

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(10deg);
    background-color: #128c7e;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .nosotros-grid,
    .proyectos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-col:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }
    .section-header h2 {
        font-size: 2rem;
    }
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        box-shadow: var(--shadow-md);
        z-index: 999;
    }
    .nav-menu.active {
        left: 0;
    }
    .nav-toggle {
        display: block;
    }
    .hero {
        height: 60vh;
        min-height: 450px;
    }
    .slide-content h1 {
        font-size: 2.2rem;
    }
    .nosotros-grid,
    .team-grid,
    .contact-faq-grid {
        grid-template-columns: 1fr;
    }
    .proyecto-card,
    .proyecto-card:nth-child(even) {
        flex-direction: column;
    }
    .proyecto-img {
        flex: 0 0 auto;
        width: 100%;
        height: 220px;
        min-width: unset;
    }
    .proyecto-info {
        padding: 25px;
    }
    .proyecto-badge {
        left: 20px !important;
        right: auto !important;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-col:last-child,
    .footer-col {
        grid-column: span 1;
    }
    .topbar-info {
        justify-content: center;
        width: 100%;
    }
    .topbar-social {
        display: none;
    }
}
