/*
   Modern Home Page Stylesheet for Solis Consultoria
   Optimized for Clarity, Trust, and Professionalism
*/

:root {
    --primary-color: #4161ae;
    /* Corporate Trust Blue */
    --primary-dark: #2d4585;
    --accent-green: #22c55e;
    --text-slate: #334155;
    --text-light: #64748b;
    --bg-modern: #f8fafc;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --card-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body.modern-index {
    font-family: 'Inter', sans-serif;
    color: var(--text-slate);
    background-color: var(--bg-modern);
    margin: 0;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary-color);
}

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

/* Hero Section */
.hero-index {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../img/agua.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 100px 20px 80px;
    /* Less padding, room for title */
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 40px;
    color: #e2e8f0;
}

.btn-primary {
    display: inline-block;
    background: var(--accent-green);
    color: #fff;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(34, 197, 94, 0.4);
    filter: brightness(1.1);
}

/* Resource Grid (The Top Icon items) */
.resource-grid {
    padding: 60px 0;
    background: #fff;
    margin-top: -60px;
}

.resource-grid .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.resource-card {
    background: #1e293b;
    /* Dark Slate for better icon contrast */
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    text-decoration: none;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid #334155;
}

/* Exception for SX Card which has a dark logo */
.resource-card[href*="kml"] {
    background: #fff;
    border-color: #f1f5f9;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover);
    filter: brightness(1.1);
}

.card-icon img {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    object-fit: contain;
}

.resource-card h3 {
    margin-bottom: 15px;
    font-size: 1.25rem;
    color: #fff;
}

.resource-card[href*="kml"] h3 {
    color: var(--primary-color);
}

.resource-card p {
    color: #cbd5e1;
    /* Lighter text for dark backgrounds */
    font-size: 0.95rem;
}

.resource-card[href*="kml"] p {
    color: var(--text-light);
}

/* Sticky Navigation */
.sticky-index-nav {
    position: sticky;
    top: 0px;
    /* Adjust based on header height */
    background: #fff;
    z-index: 99;
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 0;
}

.scroll-nav {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    scrollbar-width: none;
    padding: 0 20px;
    /* Added padding to ensure scroll doesn't touch edges */
}

.scroll-nav::-webkit-scrollbar {
    display: none;
}

.scroll-nav a {
    white-space: nowrap;
    text-decoration: none;
    color: var(--text-slate);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 20px;
    background: #f1f5f9;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.scroll-nav a:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Service Sections */
.service-section {
    padding: 100px 0;
}

.service-section:nth-of-type(even) {
    background-color: #fff;
}

.service-flex {
    display: flex;
    align-items: center;
    gap: 60px;
}

.service-section:nth-of-type(even) .service-flex {
    flex-direction: row-reverse;
}

.service-info {
    flex: 1;
}

.service-info h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
    font-weight: 800;
}

.service-intro {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.subitem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.subitem-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.subitem-card:hover {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.subitem-card h4 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.subitem-card p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

.service-image {
    flex: 1;
}

.service-image img {
    width: 100%;
    border-radius: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Service Banners */
.service-banner {
    margin-top: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 40px;
    border-radius: 25px;
    color: #fff;
    box-shadow: 0 20px 40px rgba(65, 97, 174, 0.3);
}

.service-banner h3 {
    color: #fff;
    font-size: 1.75rem;
    margin-bottom: 15px;
}

.service-banner p {
    color: #e2e8f0;
    max-width: 800px;
}

.banner-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-outline {
    border: 2px solid #fff;
    color: #fff;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

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

.btn-whatsapp {
    background: var(--accent-green);
    color: #fff;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    filter: brightness(1.1);
}

/* FAQ Section Home */
.index-faq {
    padding: 100px 0;
    background: #fff;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 50px;
}

.faq-group {
    margin-bottom: 50px;
}

.faq-group h3 {
    border-left: 5px solid var(--primary-color);
    padding-left: 20px;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.faq-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.faq-card {
    background: #f8fafc;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.faq-card h5 {
    font-size: 1.15rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.faq-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* Responsiveness adjustments */
@media (max-width: 1200px) {
    .container {
        max-width: 95%;
    }
}

@media (max-width: 991px) {
    .service-flex {
        flex-direction: column !important;
        gap: 40px;
    }

    .service-section:nth-of-type(even) .service-flex {
        flex-direction: column !important;
    }

    .service-image {
        order: -1;
        width: 100%;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .resource-grid {
        margin-top: -40px;
        padding-bottom: 40px;
    }

    .service-section {
        padding: 60px 0;
    }

    .faq-items {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-index {
        padding: 80px 20px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .service-info h2 {
        font-size: 2rem;
    }

    .subitem-grid {
        grid-template-columns: 1fr;
    }

    .service-banner {
        padding: 30px 20px;
    }

    .service-banner h3 {
        font-size: 1.5rem;
    }

    .banner-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-outline,
    .btn-whatsapp {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

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

    .resource-card {
        padding: 30px 20px;
    }
}