/* =====================================================
   Web Solutions SV - Tools Section Shared Styles
   ===================================================== */

/* ===== TOOL HERO ===== */
.tool-hero {
    padding: 140px 0 60px;
    background: radial-gradient(ellipse at top, rgba(0, 0, 128, 0.12) 0%, transparent 60%);
    text-align: center;
    position: relative;
}

.tool-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 0, 128, 0.12);
    border: 1px solid rgba(0, 0, 128, 0.25);
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--primary-300);
    margin-bottom: 20px;
}

.tool-hero h1 {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.tool-hero h1 .gradient-text {
    background: linear-gradient(135deg, #E63946 0%, #FF9500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto;
}

/* ===== TOOL MAIN AREA ===== */
.tool-section {
    padding: 40px 0 100px;
}

.tool-wrapper {
    max-width: 760px;
    margin: 0 auto;
}

.tool-wrapper.wide {
    max-width: 1000px;
}

/* ===== GLASS CARDS FOR TOOLS ===== */
.tool-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(20px);
    margin-bottom: 24px;
}

.tool-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 16px;
}

/* ===== FORM INPUTS ===== */
.tool-form-group {
    margin-bottom: 20px;
}

.tool-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.tool-input,
.tool-select,
.tool-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 16px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.tool-input:focus,
.tool-select:focus,
.tool-textarea:focus {
    border-color: rgba(0, 0, 128, 0.6);
    box-shadow: 0 0 0 3px rgba(0, 0, 128, 0.15);
}

.tool-input::placeholder,
.tool-textarea::placeholder {
    color: var(--text-quaternary);
}

.tool-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23A1A1AA' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.tool-select option {
    background: #1E1E28;
    color: var(--text-primary);
}

.tool-textarea {
    resize: vertical;
    min-height: 160px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.tool-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.tool-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

/* ===== TOOL BUTTON ===== */
.tool-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-500) 50%, var(--primary-400) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    padding: 16px 32px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 128, 0.5);
    filter: brightness(1.1);
}

.tool-btn:active {
    transform: translateY(0);
}

.tool-btn-secondary {
    background: transparent;
    border: 1px solid rgba(0, 0, 128, 0.4);
    color: var(--text-primary);
}

.tool-btn-secondary:hover {
    background: rgba(0, 0, 128, 0.1);
    border-color: var(--primary-500);
}

/* ===== RESULTS ===== */
.tool-result {
    display: none;
    margin-top: 24px;
}

.tool-result.visible {
    display: block;
    animation: fade-in-up 0.4s ease forwards;
}

.result-highlight {
    background: linear-gradient(135deg, rgba(0, 0, 128, 0.15), rgba(0, 0, 255, 0.08));
    border: 1px solid rgba(0, 0, 128, 0.3);
    border-radius: 16px;
    padding: 28px 32px;
    text-align: center;
    margin-bottom: 20px;
}

.result-highlight .result-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-300);
    margin-bottom: 8px;
}

.result-highlight .result-value {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--primary-300));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-breakdown {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    overflow: hidden;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 15px;
    transition: background 0.15s ease;
}

.result-row:last-child {
    border-bottom: none;
}

.result-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.result-row.total {
    background: rgba(0, 0, 128, 0.1);
    font-weight: 700;
    font-size: 16px;
    border-top: 1px solid rgba(0, 0, 128, 0.2);
}

.result-row .row-name {
    color: var(--text-secondary);
}

.result-row .row-value {
    font-weight: 600;
    color: var(--text-primary);
}

.result-row .row-value.negative {
    color: #f87171;
}

.result-row .row-value.positive {
    color: #4ade80;
}

/* ===== COPY BUTTON ===== */
.copy-wrapper {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.copy-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 0, 128, 0.3);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 15px;
    color: var(--primary-300);
    font-family: 'Inter', sans-serif;
    outline: none;
    cursor: text;
    word-break: break-all;
}

.copy-btn {
    background: rgba(0, 0, 128, 0.2);
    border: 1px solid rgba(0, 0, 128, 0.4);
    border-radius: 12px;
    padding: 14px 20px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover {
    background: rgba(0, 0, 128, 0.4);
}

.copy-btn.copied {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

/* ===== QR OUTPUT ===== */
.qr-output {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 32px;
    background: white;
    border-radius: 16px;
    max-width: 280px;
    margin: 0 auto;
}

.qr-output canvas {
    display: block;
}

.qr-download-btn {
    background: #000080;
    color: white;
    padding: 12px 28px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qr-download-btn:hover {
    background: #0000CC;
    transform: translateY(-1px);
}

/* ===== PASSWORD STRENGTH ===== */
.strength-bar-container {
    margin-top: 10px;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    border-radius: 99px;
    transition: width 0.4s ease, background 0.4s ease;
    width: 0%;
}

.strength-text {
    font-size: 13px;
    font-weight: 600;
    margin-top: 6px;
}

/* ===== JSON VALIDATOR ===== */
.json-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 12px;
}

.json-status.valid {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.json-status.invalid {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
}

.json-formatted {
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #e2e8f0;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre;
    margin-top: 16px;
    line-height: 1.6;
}

/* ===== INFO BADGE ===== */
.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    font-size: 12px;
    color: #93c5fd;
    margin-top: 12px;
}

/* ===== TOOLS HUB GRID ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.tool-hub-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 32px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.tool-hub-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 128, 0.08), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px;
}

.tool-hub-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 0, 128, 0.4);
    box-shadow: 0 16px 48px rgba(0, 0, 128, 0.2);
}

.tool-hub-card:hover::before {
    opacity: 1;
}

.tool-hub-icon {
    font-size: 40px;
    line-height: 1;
}

.tool-hub-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.tool-hub-card p {
    font-size: 14px;
    color: var(--text-tertiary);
    margin: 0;
    line-height: 1.5;
}

.tool-hub-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #4ade80;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: auto;
    width: fit-content;
}

.tool-hub-arrow {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 128, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.tool-hub-card:hover .tool-hub-arrow {
    background: rgba(0, 0, 128, 0.4);
    transform: translateX(3px);
}

/* ===== ANIMATIONS ===== */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-quaternary);
    margin-bottom: 32px;
    justify-content: center;
}

.breadcrumb a {
    color: var(--text-tertiary);
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary-400);
}

.breadcrumb span {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .tool-hero h1 { font-size: 32px; }
    .tool-hero { padding: 120px 0 40px; }
    .tool-card { padding: 24px; }
    .tool-grid-2,
    .tool-grid-3 { grid-template-columns: 1fr; }
    .tools-grid { grid-template-columns: 1fr; }
    .result-highlight .result-value { font-size: 32px; }
}

/* ===== AD SLOT ===== */
.ad-slot--horizontal {
    padding: 12px 0;
    background: transparent;
}

.ad-slot--horizontal .ad-slot-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    color: var(--text-tertiary);
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Ocultar el borde de placeholder cuando hay contenido de ad real dentro */
.ad-slot--horizontal .ad-slot-inner:not(:empty) {
    background: transparent;
    border: none;
    padding: 0;
    min-height: unset;
}
