/* ============================================
   PAGES.CSS — Стили для конкретных страниц
   ============================================ */

/* === HERO SECTION === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--bg-dark);
}

.hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-background);
}

.hero__bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-hero);
    opacity: 0.6;
}

.hero__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero__content {
    position: relative;
    z-index: var(--z-content);
    text-align: center;
    max-width: 900px;
    padding: 0 var(--container-padding);
}

.hero__subtitle {
    font-family: var(--font-accent);
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    font-style: italic;
    color: var(--accent-gold);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 20px;
    opacity: 0;
}

.hero__title {
    font-size: clamp(2.8rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 24px;
    opacity: 0;
}

.hero__title .line {
    display: block;
    overflow: hidden;
}

.hero__title .line span {
    display: inline-block;
}

.hero__desc {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
    opacity: 0;
}

.hero__buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
}

.hero__photo {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 90%;
    max-width: 45%;
    object-fit: contain;
    object-position: bottom right;
    opacity: 0.55;
    z-index: 2;
    mask-image: linear-gradient(to top, rgba(0,0,0,1) 40%, rgba(0,0,0,0.5) 70%, transparent 95%);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 40%, rgba(0,0,0,0.5) 70%, transparent 95%);
}

@media (max-width: 768px) {
    .hero__photo {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        height: 85%;
        max-width: 100%;
        width: 100%;
        object-fit: cover;
        object-position: center top;
        opacity: 0.35;
        mask-image: linear-gradient(to top, rgba(0,0,0,1) 20%, rgba(0,0,0,0.6) 50%, transparent 85%);
        -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 20%, rgba(0,0,0,0.6) 50%, transparent 85%);
    }
}

/* Gallery for documents (diplomas, certificates) */
.gallery--docs {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.gallery--docs .gallery__item {
    aspect-ratio: auto !important;
    overflow: visible !important;
    background: var(--bg-dark);
}

.gallery--docs .gallery__item img {
    width: 100%;
    height: auto !important;
    object-fit: contain !important;
}

/* Horizontal certificates (S1, S2) — 2 per row, landscape */
.gallery--horizontal {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.gallery--horizontal .gallery__item {
    aspect-ratio: auto !important;
    overflow: visible !important;
    background: var(--bg-dark);
}

.gallery--horizontal .gallery__item img {
    width: 100%;
    height: auto !important;
    object-fit: contain !important;
}

/* Vertical certificates (S3-S6) — 4 per row, portrait */
.gallery--vertical-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery--vertical-4 .gallery__item {
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--bg-dark);
}

.gallery--vertical-4 .gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .gallery--horizontal {
        grid-template-columns: 1fr;
    }
    .gallery--vertical-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === METHOD SECTION (Пятиконечная звезда) === */
.method {
    background: var(--bg-dark-2);
    position: relative;
    overflow: hidden;
}

.method__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.method__star-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.method__star-canvas {
    width: 100%;
    height: 100%;
}

.method__star-img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.3));
    animation: starSpin 30s linear infinite;
}

@keyframes starSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

.method__sphere {
    padding: 20px;
    border: 1px solid var(--border-subtle);
    background: rgba(26, 16, 32, 0.5);
    transition: all var(--transition-medium);
}

.method__sphere:hover,
.method__sphere.active {
    border-color: var(--accent-gold);
    background: var(--bg-card);
    box-shadow: var(--glow-gold);
}

.method__sphere-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--accent-gold);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.method__sphere-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* === EXPANDABLE SPHERES === */
.method__sphere--expandable {
    cursor: pointer;
}

.method__sphere-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.method__sphere-toggle {
    font-size: 1.2rem;
    color: var(--accent-gold);
    transition: transform var(--transition-medium);
    line-height: 1;
}

.method__sphere--expandable.expanded .method__sphere-toggle {
    transform: rotate(45deg);
}

.method__sphere-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease;
    opacity: 0;
}

.method__sphere--expandable.expanded .method__sphere-detail,
.method__sphere--expandable:hover .method__sphere-detail {
    max-height: 600px;
    opacity: 1;
    margin-top: 12px;
}

.method__sphere--expandable:hover .method__sphere-toggle {
    transform: rotate(45deg);
}

.method__sphere-detail p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.8;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}

.method__sphere--extra {
    border-left: 2px solid var(--primary-red);
}

@media (max-width: 768px) {
    .method__sphere--expandable:hover .method__sphere-detail {
        max-height: 0;
        opacity: 0;
        margin-top: 0;
    }
    .method__sphere--expandable:hover .method__sphere-toggle {
        transform: none;
    }
    .method__sphere--expandable.expanded .method__sphere-detail {
        max-height: 600px;
        opacity: 1;
        margin-top: 12px;
    }
    .method__sphere--expandable.expanded .method__sphere-toggle {
        transform: rotate(45deg);
    }
}

@media (max-width: 768px) {
    .method__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .method__star-container {
        max-width: 300px;
    }
}

/* === ABOUT SECTION (на главной) === */
.about-preview {
    position: relative;
    overflow: hidden;
}

.about-preview__grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.about-preview__photo-wrapper {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.about-preview__photo-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid var(--accent-gold);
    opacity: 0;
    transition: opacity var(--transition-medium);
    transform: translate(10px, 10px);
    pointer-events: none;
}

.about-preview__photo-wrapper:hover::after {
    opacity: 0.5;
}

.about-preview__photo {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.about-preview__photo-wrapper:hover .about-preview__photo {
    transform: scale(1.03);
}

.about-preview__text h2 {
    margin-bottom: 16px;
}

.about-preview__roles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.about-preview__text p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

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

/* === ACHIEVEMENTS === */
.achievements {
    background: var(--bg-dark-2);
}

.achievements__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.achievement {
    padding: 30px 20px;
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-medium);
}

.achievement:hover {
    border-color: var(--accent-gold);
    transform: translateY(-4px);
}

@media (max-width: 768px) {
    .achievements__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === REVIEWS SECTION === */
.reviews-section {
    position: relative;
}

.reviews__carousel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .reviews__carousel { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .reviews__carousel { grid-template-columns: 1fr; }
}

/* === CASES SECTION === */
.cases-section {
    background: var(--bg-dark-2);
}

.case-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
    border: 1px solid var(--border-subtle);
    margin-bottom: 30px;
    transition: all var(--transition-medium);
}

.case-card:hover {
    border-color: var(--border-active);
}

.case-card__before, .case-card__after {
    padding: 20px;
}

.case-card__label {
    font-family: var(--font-accent);
    font-size: 0.92rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.case-card__before .case-card__label {
    color: var(--primary-red-light);
}

.case-card__after .case-card__label {
    color: var(--accent-gold);
}

@media (max-width: 768px) {
    .case-card {
        grid-template-columns: 1fr;
        padding: 24px;
    }
}

/* === PRICING SECTION === */
.pricing-section .grid {
    align-items: stretch;
}

/* === CTA SECTION === */
.cta-section {
    background: var(--gradient-hero);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: var(--gradient-red-glow);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.cta-section h2 {
    position: relative;
    z-index: 2;
    margin-bottom: 16px;
}

.cta-section p {
    position: relative;
    z-index: 2;
    font-family: var(--font-accent);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.cta-section .btn {
    position: relative;
    z-index: 2;
}

/* === INNER PAGE HERO === */
.page-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: var(--gradient-hero);
    padding-top: 80px;
}

.page-hero__content {
    position: relative;
    z-index: var(--z-content);
}

.page-hero h1 {
    margin-bottom: 16px;
}

.page-hero .subtitle {
    font-family: var(--font-accent);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-secondary);
}

/* === ABOUT PAGE SPECIFICS === */
.bio-section {
    position: relative;
}

.bio-section__content {
    max-width: 800px;
    margin: 0 auto;
}

.bio-section__content p {
    font-size: 1.05rem;
    line-height: 2;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.bio-section__content > p:first-of-type::first-letter {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 900;
    float: left;
    line-height: 1;
    margin-right: 12px;
    margin-top: 4px;
    color: var(--accent-gold);
}

/* === USEFUL PAGE — CALCULATOR === */
.calculator-section {
    background: var(--bg-dark-2);
}

.calculator {
    max-width: 500px;
    margin: 0 auto;
    background: var(--gradient-card);
    border: 1px solid var(--border-subtle);
    padding: clamp(30px, 5vw, 50px);
    text-align: center;
}

.calculator__title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.calculator__desc {
    font-family: var(--font-accent);
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.calculator__input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 4px;
    margin-bottom: 20px;
    transition: border-color var(--transition-fast);
    outline: none;
}

.calculator__input::placeholder {
    color: var(--text-muted);
    letter-spacing: 1px;
}

.calculator__input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

.calculator__result {
    margin-top: 30px;
    padding: 24px;
    border: 1px solid var(--accent-gold);
    background: rgba(212, 175, 55, 0.05);
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-medium);
}

.calculator__result.visible {
    opacity: 1;
    transform: translateY(0);
}

.calculator__result-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.calculator__result-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--accent-gold);
}

.calculator__result-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.calculator__cta {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.calculator__cta p {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* === INTERVIEW PAGE === */
.interview-section {
    min-height: 60vh;
}

.interview-placeholder {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 30px;
    border: 1px dashed var(--border-subtle);
}

.interview-placeholder__icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--accent-gold);
}

.interview-placeholder__text {
    font-family: var(--font-accent);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-secondary);
}
