/*
Theme Name: Ampere
Author: Artsahskiy
Description: Киберпанк-тема для школы беспилотной авиации.
Version: 1.0.0
Text Domain: ampere
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* Базовые шрифты под дизайн */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #050505;
    color: #fff;
}

.heading-font {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.heading-alt {
    font-family: 'Exo 2', sans-serif;
    font-weight: 800;
}

.body-font {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.6;
}

.mono-font {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: #FF5E00 !important;
}

/* Фоновая сетка */
.grid-pattern {
    position: relative;
}

.grid-pattern:before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(0deg,
            transparent 19%,
            rgba(255, 94, 0, 0.3) 20%,
            rgba(255, 94, 0, 0.3) 21%,
            transparent 22%),
        linear-gradient(90deg,
            transparent 19%,
            rgba(255, 94, 0, 0.3) 20%,
            rgba(255, 94, 0, 0.3) 21%,
            transparent 22%);
    background-size: 100px 100px;
    pointer-events: none;
    z-index: 1;
}

/* Глитч-эффект заголовков */
@keyframes glitch {
    0% {
        text-shadow: -2px 0 #FF5E00, 2px 0 #00FF9D;
        clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    }
    14% {
        text-shadow: -2px 0 #FF5E00, 2px 0 #00FF9D;
        clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    }
    15% {
        text-shadow: -2px 0 #FF5E00, 2px 0 #00FF9D;
        clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
    }
    49% {
        text-shadow: -2px 0 #FF5E00, 2px 0 #00FF9D;
        clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
    }
    50% {
        text-shadow: 2px 0 #FF5E00, -2px 0 #00FF9D;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    100% {
        text-shadow: 2px 0 #FF5E00, -2px 0 #00FF9D;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

.glitch:hover {
    animation: glitch 0.3s ease-in-out infinite;
}

/* HUD-рамки */
.hud-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 2px solid #FF5E00;
    opacity: 0.5;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.hud-corner.tl {
    top: 8px;
    left: 8px;
    border-right: none;
    border-bottom: none;
}

.hud-corner.tr {
    top: 8px;
    right: 8px;
    border-left: none;
    border-bottom: none;
}

.hud-corner.bl {
    bottom: 8px;
    left: 8px;
    border-right: none;
    border-top: none;
}

.hud-corner.br {
    bottom: 8px;
    right: 8px;
    border-left: none;
    border-top: none;
}

.hud-corner:hover {
    opacity: 1;
    box-shadow: 0 0 12px #FF5E00;
}

/* Сканирующая линия */
@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

.hud-scan {
    position: absolute;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #FF5E00 50%, transparent 100%);
    box-shadow: 0 0 8px #FF5E00;
    animation: scan 3s linear infinite;
    opacity: 0.3;
    pointer-events: none;
}

/* HUD-радар в about */
.hud-scope {
    position: absolute;
    width: 150px;
    height: 150px;
    border: 2px solid rgba(255, 94, 0, 0.3);
    border-radius: 50%;
}

.hud-scope::before {
    content: "";
    position: absolute;
    width: 80px;
    height: 2px;
    background: rgba(255, 94, 0, 0.3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hud-scope::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 80px;
    background: rgba(255, 94, 0, 0.3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hud-text {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #FF5E00;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Карточки программ / команды */
.course-card {
    background: linear-gradient(135deg, rgba(18, 18, 18, 0.9) 0%, rgba(5, 5, 5, 0.7) 100%);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 94, 0, 0.15);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.course-card:hover {
    border-color: rgba(255, 94, 0, 0.6);
    box-shadow:
        0 0 40px rgba(255, 94, 0, 0.3),
        inset 0 0 40px rgba(255, 94, 0, 0.08);
    transform: translateY(-6px);
    background: linear-gradient(135deg, rgba(18, 18, 18, 1) 0%, rgba(25, 15, 5, 0.8) 100%);
}

/* Инфострока */
.info-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #FF5E00;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Статусы */
.status-online {
    color: #00FF9D;
}

.status-gold {
    color: #FFD700;
}

/* Пульсация */
@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Линия-сепаратор */
.cyber-line {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, transparent, #FF5E00, transparent);
}

/* Кнопки */
.btn-primary {
    background: linear-gradient(135deg, #FF5E00 0%, #FF8C42 100%);
    border: 2px solid #FF5E00;
    color: #ffffff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(255, 94, 0, 0.6);
    transform: translateY(-2px);
    border-color: #FFD700;
    background: linear-gradient(135deg, #FF8C42 0%, #FF5E00 100%);
}

.btn-secondary {
    background: transparent;
    border: 2px solid #FF5E00;
    color: #FF5E00;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-secondary:hover {
    background: rgba(255, 94, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 94, 0, 0.4);
    color: #FFD700;
    border-color: #FFD700;
}

/* Навигация */
.nav-link {
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
}

.nav-link:hover {
    color: #FF5E00;
    text-shadow: 0 0 10px rgba(255, 94, 0, 0.5);
}

/* Тайпрайтер */
.typewriter {
    white-space: nowrap;
    overflow: hidden;
    animation: type 0.5s steps(20) 0.5s forwards;
}

@keyframes type {
    from { width: 0; }
    to { width: 100%; }
}

/* About: сетка и фичи */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feature-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-left: 2px solid #FF5E00;
    background: rgba(255, 94, 0, 0.05);
    transition: all 0.3s ease;
}

.feature-item:hover {
    border-left-color: #FFD700;
    background: rgba(255, 94, 0, 0.1);
    box-shadow: 0 0 20px rgba(255, 94, 0, 0.15);
    transform: translateX(8px);
}

.feature-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: 2px solid #FF5E00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #FF5E00;
    position: relative;
}

.feature-icon::before {
    content: "";
    position: absolute;
    inset: -4px;
    border: 1px dashed rgba(255, 94, 0, 0.3);
    pointer-events: none;
}

.feature-text h4 {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #FF5E00;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.feature-text p {
    font-size: 0.85rem;
    color: #cccccc;
    line-height: 1.4;
}

/* Статистика */
.stat-box {
    padding: 20px;
    border: 1px solid rgba(255, 94, 0, 0.2);
    background: rgba(255, 94, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-box:hover {
    border-color: rgba(255, 94, 0, 0.6);
    background: rgba(255, 94, 0, 0.1);
    box-shadow: 0 0 20px rgba(255, 94, 0, 0.2);
}

.stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: #FF5E00;
    margin-bottom: 8px;
}

.stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #999999;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Модальное окно профиля */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fade-in 0.3s ease;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    background: linear-gradient(135deg, rgba(18, 18, 18, 0.9) 0%, rgba(5, 5, 5, 0.95) 100%);
    border: 2px solid rgba(255, 94, 0, 0.4);
    display: grid;
    grid-template-columns: 300px 1fr;
    overflow: hidden;
    animation: hologram-unfold 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes hologram-unfold {
    0% {
        opacity: 0;
        transform: scale(0.8) rotateX(20deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateX(0deg);
    }
}

@media (max-width: 768px) {
    .modal-content {
        grid-template-columns: 1fr;
        max-height: 90vh;
    }
}

.modal-sidebar {
    background: linear-gradient(180deg, rgba(255, 94, 0, 0.1) 0%, rgba(5, 5, 5, 0.8) 100%);
    padding: 32px 24px;
    border-right: 1px solid rgba(255, 94, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (max-width: 768px) {
    .modal-sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(255, 94, 0, 0.2);
        padding: 24px;
    }
}

.modal-main {
    padding: 32px;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .modal-main {
        padding: 24px;
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: 2px solid #FF5E00;
    background: rgba(5, 5, 5, 0.9);
    color: #FF5E00;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 94, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 94, 0, 0.4);
    transform: rotate(90deg);
}


/* === ZOOM для модального окна === */
.zoom-container {
    position: relative;
    cursor: zoom-in;
}

.zoom-container.zoomed {
    cursor: zoom-out;
}

#ampere-news-modal-image {
    transition: transform 0.3s ease, z-index 0s;
    transform-origin: center center;
}

#ampere-news-modal-image.zoomed {
    transform: scale(2.5); /* Увеличьте значение при необходимости */
    z-index: 50 !important;
    cursor: zoom-out;
}

/* Затемнение фона при зуме (опционально) */
#ampere-news-modal-image.zoomed {
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.85);
}


/* Кнопка скролла вверх */
.scroll-top-btn {
    clip-path: polygon(50% 0%, 100% 50%, 75% 50%, 75% 100%, 25% 100%, 25% 50%, 0% 50%);
}

/* Убираем default underline у ссылок в теме */
a {
    text-decoration: none;
}
a:hover {
    text-decoration: none;
}
