/* Custom overrides to enhance index design */

/* hero layout simplified; completely transparent to avoid boxy appearance */
.hero {
    background: transparent;
    color: var(--text);
    padding: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: none;
    margin-bottom: 0.8rem;
    border: none;
}

/* logo plain styling */
.hero img.plain-logo {
    height: 180px !important;
    /* Increased by 10% from 165px */
    width: auto;
    max-width: 360px;
    /* Increased by 20% */
    max-height: 140px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 1;
    transition: transform 0.4s ease;
}

/* Dashboard button outside form */
#admin-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 7px 14px;
    border-radius: 12px;
    border: 1.5px solid rgba(12, 45, 100, 0.15);
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.5;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
}

#admin-btn:hover {
    opacity: 1;
    background: #ffffff;
    color: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 10px 20px rgba(130, 21, 41, 0.15);
    transform: translateY(-2px);
}

.hero-text h1 {
    font-size: 2.8rem;
    margin: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text .tagline {
    font-size: 1rem;
    margin-top: 5px;
    opacity: 0.9;
    color: var(--text-muted);
}

/* enlarge icons in section titles */
.section-title span:first-child {
    font-size: 1.6rem;
}

/* Hover suave: no pisar el estado selected */
.sentiment-btn:hover:not(.selected) {
    background: rgba(130, 21, 41, 0.08);
    border-color: var(--secondary);
    box-shadow: 0 6px 16px rgba(130, 21, 41, 0.15);
}

.sentiment-btn.selected:hover {
    background: linear-gradient(135deg, var(--secondary), #a01d35);
    border-color: var(--secondary);
    color: white;
}

.hero-text .tagline {
    font-size: 1rem;
    margin-top: 5px;
    opacity: 0.9;
}

.progress-wrapper {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    transition: width 0.4s ease;
}

/* Make each section look like a card */
.section {
    background: var(--card-bg);
    padding: 1.5rem 1.8rem;
    border-radius: 25px;
    border: 1px solid var(--card-border);
}

/* keep last-child spacing consistent */
.section:last-child {
    margin-bottom: 0;
}

/* influence button icons with circle and bigger labels */
.influence-btn {
    flex: 1 1 calc(33% - 15px) !important;
    min-width: 160px;
    height: auto;
    padding: 20px 10px;
}

.influence-btn .icon-circle {
    width: 70px;
    height: 70px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: white;
    margin-bottom: 10px;
    transition: background 0.3s;
}

.influence-btn .label {
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    white-space: normal;
    line-height: 1.2;
}

.influence-btn:hover:not(.selected) .icon-circle {
    background: var(--secondary);
}

.influence-btn.selected .icon-circle {
    background: rgba(255, 255, 255, 0.25);
}

/* smaller hero on mobile */
@media (max-width: 600px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero img.plain-logo {
        height: auto;
        max-height: 120px;
        /* Increased by 20% from 100px */
        max-width: 340px;
        /* Increased by ~10% from 300px */
    }
}

/* Base Modal Styles (Ported for index.html) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 45, 100, 0.4);
    backdrop-filter: blur(12px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 15000;
    overflow-y: auto;
    padding: 20px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 40px;
    width: 100%;
    max-width: 850px;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.3);
    position: relative;
    margin: auto;
    animation: modalSlide 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.btn-close-modal {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 15px;
    background: #f1f5f9;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.3rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.btn-close-modal:hover {
    background: var(--accent);
    color: white;
    transform: rotate(90deg);
}

/* Company Selection Portal Styles */
.search-input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
}

.search-input-wrapper input {
    width: 100%;
    padding: 18px 24px 18px 65px;
    border-radius: 25px;
    border: 3px solid #f1f5f9;
    font-size: 1.2rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: all 0.3s ease;
    background: #f8fafc;
    color: var(--primary);
}

.search-input-wrapper input:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 15px 30px rgba(244, 112, 32, 0.15);
}

.search-icon {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.6rem;
    color: var(--accent);
}

.company-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 1.5rem;
    justify-items: center;
}

.company-card {
    background: #fff;
    border: 2px solid #f8fafc;
    border-radius: 32px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
    width: 100%;
}

.company-card:hover {
    transform: translateY(-12px);
    border-color: var(--accent);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

.company-card .logo-thumb {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 24px;
    background: #fff;
    padding: 15px;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.06));
    transition: transform 0.3s ease;
}

.company-card:hover .logo-thumb {
    transform: scale(1.1);
}

.company-card span {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.1rem;
    line-height: 1.2;
    font-family: 'Outfit', sans-serif;
}

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1.2rem;
}

@media (max-width: 600px) {
    .modal-content {
        padding: 2.5rem 1.5rem;
    }

    .company-selection-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .company-card {
        padding: 20px 10px;
        border-radius: 22px;
    }

    .company-card .logo-thumb {
        width: 85px;
        height: 85px;
    }

    .company-card span {
        font-size: 0.9rem;
    }
}