/* =========================================
   Sectores Hub & Landing Pages
   ========================================= */

/* --- Sector Grid --- */
.sector-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 640px) {
    .sector-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .sector-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }
}

/* --- Sector Card (overlay style) --- */
.sector-card {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sector-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.sector-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.sector-card:hover .sector-card__img {
    transform: scale(1.06);
}

.sector-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.1) 55%, transparent 100%);
    z-index: 1;
}

.sector-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    z-index: 2;
}

.sector-card__tag {
    display: inline-block;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.sector-card__desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    margin: 0;
}

/* =========================================
   Sector Hero (individual pages)
   - Forces ALL text to white regardless
     of Tailwind classes being missing
   ========================================= */
.sector-hero {
    position: relative;
    overflow: hidden;
    padding-top: 5rem;
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    .sector-hero {
        padding-top: 7rem;
    }
}

.sector-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sector-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 58, 138, 0.85) 100%);
}

/* Feature pages: gradient-only hero (no background image) */
.sector-hero__overlay[data-feature="true"] {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #3b82f6 100%);
}

.sector-hero__content {
    position: relative;
    z-index: 10;
    padding-bottom: 1rem;
}

/* Force ALL text inside hero to white */
.sector-hero__content h1,
.sector-hero__content h2,
.sector-hero__content h3,
.sector-hero__content span,
.sector-hero__content div {
    color: #ffffff !important;
}

.sector-hero__content p {
    color: rgba(255, 255, 255, 0.9) !important;
}

.sector-hero__content strong {
    color: #ffffff !important;
    font-weight: 700;
}

/* Gradient text still visible on dark */
.sector-hero__content .text-gradient {
    background: linear-gradient(135deg, #60a5fa, #a78bfa) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* Chip styling on dark bg */
.sector-hero__content .chip {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(8px);
}

/* CTA button on hero */
.sector-hero__content a[class*="bg-gradient"] {
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
}

/* Secondary white button on dark hero (override global white text) */
.sector-hero__content a.bg-white {
    color: #1f2937 !important; /* text-gray-800 */
    border-color: #e5e7eb !important; /* border-gray-200 */
}

.sector-hero__content a.bg-white:hover {
    background-color: #f9fafb !important;
    border-color: #d1d5db !important; /* border-gray-300 */
    color: #111827 !important; /* text-gray-900 */
}

.sector-hero__content a.bg-white svg,
.sector-hero__content a.bg-white i {
    color: inherit !important;
    stroke: currentColor !important;
}


/* =========================================
   Section spacing
   ========================================= */
.sector-hero + section,
.sector-hero ~ #funciones,
#funciones {
    margin-top: 3rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Space between all main sections */
.sector-hero ~ section {
    margin-top: 1.5rem;
}

/* =========================================
   FAQ improvements
   ========================================= */
.sector-faq {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
}

.sector-faq details {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px 28px;
    background: #f9fafb;
    transition: background 0.2s, box-shadow 0.2s;
}

.sector-faq details + details {
    margin-top: 14px;
}

.sector-faq details[open] {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sector-faq details summary {
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.6;
}

.sector-faq details p {
    margin-top: 14px;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.8;
}

/* Export Badge colors (accounting pages) */
.badge-xls { background-color: #217346 !important; color: #ffffff !important; }
.badge-csv { background-color: #4caf50 !important; color: #ffffff !important; }
.badge-a3 { background-color: #f57c00 !important; color: #ffffff !important; }
.badge-fec { background-color: #1565c0 !important; color: #ffffff !important; }
.badge-cp { background-color: #4caf50 !important; color: #ffffff !important; }
.badge-q { background-color: #7b1fa2 !important; color: #ffffff !important; }

