/* === COMPONENTS.CSS — Карточки, кнопки, вкладки, iframe, новости, законы === */

.container {
    padding: 15px 17px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.card--pdf {
  position: relative;
}

.inner-content-area {
  position: relative;
  margin-top: 12px;
}

.inner-tab-content {
  display: none;
  position: relative;
  z-index: 10;
  margin-top: 12px;
}

.inner-tab-content.active {
  display: block;
}

.inner-desc {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 12px;
}

.inner-info {
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #444;
  min-height: 60px;
}

.inner-info a:not(.btn-main) {
  color: #007bff;
  text-decoration: underline;
}

.card { 
    background: rgba(20, 35, 80, 0.38) !important;   /* чуть светлее и менее синий */
    backdrop-filter: blur(20px) saturate(170%) brightness(115%);
    -webkit-backdrop-filter: blur(20px) saturate(170%) brightness(115%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        0 8px 32px rgba(0, 20, 80, 0.06),
        0 1px 0 rgba(255, 255, 255, 0.55) inset,
        0 -1px 0 rgba(0, 0, 0, 0.02) inset;
    border-radius: 28px;
    padding: 5px 17px 17px 17px;
    margin-bottom: 7px;
    animation: fadeInUp 0.8s ease-out forwards;
    position: relative;
    z-index: 1;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    hyphens: none;
    -webkit-hyphens: none;
    text-align: left;
    text-justify: inter-word;
    overflow-wrap: anywhere;
    word-break: normal;
}

.card:hover {
    box-shadow:
        0 14px 40px rgba(0, 20, 80, 0.12),
        0 1px 0 rgba(255, 255, 255, 0.52) inset;
    transform: translateY(-1px);
}

h1, h2, h4, h5, h6 {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
}

#home .card p,
#home .card div {
    text-align: center;
}

.btn-link-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-link-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-link {
    padding: 10px 15px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn-link.is-active {
    opacity: 0.75;
    transform: scale(0.96);
}

/* === BUTTONS === */
.btn-main {
    background: linear-gradient(
        135deg,
        rgba(0, 82, 155, 0.78) 0%,
        rgba(0, 112, 200, 0.78) 100%
    ) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: white !important;
    padding: 16px 18px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 18px;
    width: 100%;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    display: block;
    box-sizing: border-box;
    white-space: normal;
    text-align: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 16px rgba(0, 82, 155, 0.25),
        0 1px 0 rgba(255, 255, 255, 0.2) inset;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.01em;
    touch-action: manipulation;
    isolation: isolate;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Shine effect */
.btn-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.22) 50%,
        transparent 100%
    );
    opacity: 0;
    transform: translateX(-100%);
    transition: transform 0.5s ease, opacity 0.1s ease;
    pointer-events: none;
}

.btn-main:hover::before {
    transform: translateX(160%);
    opacity: 1;
}

.btn-main:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(0, 82, 155, 0.38),
        0 1px 0 rgba(255, 255, 255, 0.3) inset;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.btn-main:active,
.btn-main.is-active {
    transform: scale(0.97) translateY(0);
    box-shadow: 0 2px 8px rgba(0, 82, 155, 0.2);
}

.btn-main.is-active::before {
    transform: translateX(160%);
    opacity: 1;
    transition: transform 0.4s ease, opacity 0.05s ease;
}

.tab-content .btn-main {
    font-size: 1.0rem;
    margin-bottom: 15px;
}

/* === TABS === */
.tab-content {
    font-size: 1.0rem;
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.6s cubic-bezier (0.165, 0.84, 0.44, 1) forwards;
    -webkit-animation: fadeInUp 0.6s
    cubic-bezier (0.165, 0.84, 0.44, 1) forwards;
    transform-origin: bottom center;
}

/* === IFRAME === */
.iframe-wrapper {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.28);
    height: 700px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) inset;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* === VIDEO === */
.video-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 18px;
    margin: 5px 0 10px 0;
    background: rgba(0, 0, 0, 0.15);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.22),
        0 1px 0 rgba(255, 255, 255, 0.12) inset;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.video-wrapper.horizontal {
    aspect-ratio: 16 / 9;
}

.video-wrapper.vertical {
    max-width: 350px;
    aspect-ratio: 9 / 16;
    margin-left: auto;
    margin-right: auto;
}

.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* === STATUS === */
.status-msg {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
    margin-bottom: 15px;
}

/* === NEWS === */
.news-card-mini {
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px;
    border-radius: 14px;
    margin-bottom: 10px;
    transition: all 0.22s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.news-card-mini:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.30);
}

.news-item {
    background: rgba(255, 255, 255, 0.22);
    border-left: 3px solid rgba(0, 82, 155, 0.8);
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: 0 14px 14px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    transition: transform 0.2s ease;
}

.news-item:hover {
    transform: translateX(2px);
}

.news-title {
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 5px;
    color: #ffffff;
    text-decoration: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* === LAWS === */
.law-link {
    display: block;
    padding: 15px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    text-decoration: none;
    color: #cce4ff;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.28);
    transition: all 0.22s ease;
}

.law-link:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

/* === CONSENT PLACEHOLDER === */
.consent-placeholder {
    background: rgba(255, 255, 255, 0.12);
    border: 1px dashed rgba(255, 255, 255, 0.35);
    padding: 30px 20px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 15px;
}

.consent-placeholder p {
    margin: 10px 0;
    color: rgba(255, 255, 255, 0.75);
}

/* === CONSENT PLACEHOLDER inside video-wrapper.horizontal === */
.video-wrapper.horizontal .consent-placeholder {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px 20px;
    box-sizing: border-box;
    gap: 6px;
    margin-bottom: 0;
    border-radius: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.22);
}

.video-wrapper.horizontal .consent-placeholder p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
}

.video-wrapper.horizontal .load-tool-btn {
    margin-top: 2px;
    max-width: calc(100% - 40px);
}

.load-tool-btn {
    padding: 12px 30px;
    font-size: 16px;
    background: linear-gradient(135deg, #0066cc, #0099ff);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(0, 102, 204, 0.35);
    font-weight: 600;
}

.load-tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.45);
}

.load-tool-btn:active {
    transform: scale(0.97);
}

.text-link {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    display: inline-block;
}

.text-link.is-active,
.text-link:active {
    opacity: 0.6;
    transform: scale(0.95);
}

.info-card2 {
    position: relative;
    margin: 8px auto 16px auto;
    max-width: 560px;
    padding: 18px 22px;
    background: rgba(10, 25, 60, 0.3);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #fff;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 0 0 4px rgba(10, 25, 60, 0.3),
        0 0 0 5px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Декоративные уголки */
.info-card2::before,
.info-card2::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(120, 180, 255, 0.6);
    pointer-events: none;
}

.info-card2::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 16px;
}

.info-card2::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 16px;
}

.info-card {
    background: #f9f9ff;
    border-left: 4px solid #000080;
    border-radius: 10px;
    padding: 13px 15px;
    margin-bottom: 12px;
    color: #1a1a2e;
}

.info-card h3 {
    /* заголовок внутри карточки */
    display: block;
    text-align: left;
    width: auto;
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #000080 !important;
    line-height: 1.3;
}

.info-card p {
    font-size: 0.85rem;
    line-height: 1.55;
    color: #333;
    margin: 0 0 8px 0;
}

.info-card p2 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.55;
    color: #333;
    margin: 0 0 8px 0;
}

.info-card p:last-child {
    margin-bottom: 0;
}

.info-card a {
    color: #000080;
    font-weight: 600;
    text-decoration: none;
    word-break: break-word;
}

.info-card strong {
    color: #1a1a2e;
}

.info-card code {
    background: #e8e8f8;
    color: #000080;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.8rem;
    word-break: break-word;
}

/* === PC font rendering fix === */
@media (hover: hover) and (pointer: fine) {
    .btn-main,
    a.btn-main {
        font-weight: 500;
        text-shadow: none;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .card h1, .card h2, .card h3,
    .card h4, .card h5, .card h6,
    .card p, .card span, .card div,
    .card li, .card a,
    .news-title,
    .law-link,
    .load-tool-btn,
    .status-msg {
        font-weight: 500 !important;
        text-shadow: none;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .card a[style],
    .card div[style] > a,
    main a[style] {
        font-weight: 500 !important;
        text-shadow: none !important;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    .btn-link:hover {
        opacity: 0.82;
        transform: translateY(-1px);
        transition: all 0.25s ease;
    }

    .btn-link:active,
    .btn-link.is-active {
        transform: scale(0.97) translateY(0);
        opacity: 0.75;
        transition: all 0.1s ease;
    }

    .text-link:hover {
        opacity: 0.7;
    }

    .text-link:active,
    .text-link.is-active {
        opacity: 0.6;
        transform: scale(0.95);
        transition: all 0.1s ease;
    }
    
    .card .info-card h3,
    .card .info-card p,
    .card .info-card span,
    .card .info-card div,
    .card .info-card li,
    .card .info-card strong,
    .card .info-card em {
        color: #1a1a2e !important;
        text-shadow: none !important;
    }
    .card .info-card h3 {
        color: #000080 !important;
    }
    .card .info-card a {
        color: #000080 !important;
    }
}