/* Custom Styling: Vadim Korchukov Portfolio */
:root {
    /* Warm Architectural & Premium Real Estate Palette */
    --bg-base: #fdfbf7;
    --bg-surface: #ffffff;
    --bg-warm-tint: #f5efe6;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-accent-soft: #fbf2e3;
    
    --brand-primary: #1e1b18; /* Warm Dark Graphite */
    --brand-terracotta: #c4552b; /* Architectural Terracotta */
    --brand-terracotta-hover: #ad441c;
    --brand-amber: #d97706;
    --brand-sand: #e6ddce;
    --brand-clay: #78350f;
    
    --text-heading: #1e1b18;
    --text-body: #44403c;
    --text-muted: #78716c;
    --text-light: #a8a29e;
    
    --border-subtle: #e8e4dc;
    --border-warm: #ebd5c1;
    
    --shadow-sm: 0 2px 8px rgba(30, 27, 24, 0.04);
    --shadow-md: 0 10px 30px -5px rgba(30, 27, 24, 0.07);
    --shadow-lg: 0 20px 40px -10px rgba(30, 27, 24, 0.12);
}

*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-body);
    line-height: 1.6;
    padding-bottom: 90px;
    position: relative;
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

/* Typography */
h1, h2, h3, .font-heading {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-heading);
    letter-spacing: -0.015em;
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

h4, h5, h6 {
    color: var(--text-heading);
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ambient Spheres - Strictly contained within overflow hidden */
.ambient-sphere-1 {
    position: absolute;
    top: -60px;
    right: 0;
    width: 320px;
    height: 320px;
    max-width: 100vw;
    background: radial-gradient(circle, rgba(235, 199, 163, 0.35) 0%, rgba(253, 251, 247, 0) 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(50px);
    overflow: hidden;
}
.ambient-sphere-2 {
    position: absolute;
    top: 40%;
    left: 0;
    width: 320px;
    height: 320px;
    max-width: 100vw;
    background: radial-gradient(circle, rgba(244, 219, 190, 0.3) 0%, rgba(253, 251, 247, 0) 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(60px);
    overflow: hidden;
}

@media (min-width: 992px) {
    .ambient-sphere-1 {
        width: 550px;
        height: 550px;
        top: -120px;
        right: -80px;
        filter: blur(60px);
    }
    .ambient-sphere-2 {
        width: 500px;
        height: 500px;
        left: -100px;
        filter: blur(70px);
    }
}

/* Header & Navbar - High Polish */
.navbar-custom {
    background: rgba(253, 251, 247, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
    padding-top: 10px;
    padding-bottom: 10px;
}
.navbar-brand-title {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.01em;
    line-height: 1.15;
}
.navbar-brand-subtitle {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-terracotta);
    font-weight: 700;
}
@media (max-width: 400px) {
    .navbar-brand-title {
        font-size: 1.05rem;
    }
    .navbar-brand-subtitle {
        font-size: 0.62rem;
    }
}

/* Mobile Menu Smooth Transition */
.navbar-collapse {
    background: transparent;
}
@media (max-width: 991px) {
    .navbar-collapse {
        background: #ffffff;
        border-radius: 20px;
        border: 1px solid var(--border-subtle);
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.09);
        padding: 0;
        margin-top: 10px;
    }
    .navbar-collapse .navbar-nav {
        padding: 12px 14px 16px;
    }
    .navbar-nav .nav-link {
        font-size: 1rem;
        padding: 12px 14px !important;
        border-bottom: 1px solid #f6f3ee;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

.nav-link {
    color: var(--text-heading);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 14px !important;
    border-radius: 10px;
    transition: all 0.2s ease;
}
.nav-link:hover, .nav-link:focus {
    color: var(--brand-terracotta);
    background: rgba(196, 85, 43, 0.06);
}

.navbar-toggler {
    padding: 8px 12px;
    background: #faf6f0;
    border-radius: 12px;
    border: 1px solid var(--border-subtle) !important;
    transition: all 0.2s ease;
}
.navbar-toggler:active {
    transform: scale(0.95);
    background: #f0ebe1;
}

/* Range Slider Custom Styling */
.custom-range {
    height: 8px;
    background-color: #ede6dc;
    border-radius: 6px;
    outline: none;
    accent-color: var(--brand-terracotta);
}
.custom-range::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand-terracotta);
    box-shadow: 0 2px 6px rgba(196, 85, 43, 0.4);
    cursor: pointer;
    border: 2px solid #ffffff;
    transition: transform 0.15s ease;
}
.custom-range::-webkit-slider-thumb:hover,
.custom-range::-webkit-slider-thumb:active {
    transform: scale(1.15);
}
.custom-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand-terracotta);
    box-shadow: 0 2px 6px rgba(196, 85, 43, 0.4);
    cursor: pointer;
    border: 2px solid #ffffff;
}

/* Warm Card */
.warm-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    width: 100%;
}
.warm-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-warm);
}

/* Badges */
.badge-warm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fdf2e9;
    color: #b4431a;
    border: 1px solid #f9d8c0;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    max-width: 100%;
}

/* Round Circular Photo Frames */
.hero-avatar-box {
    position: relative;
    display: inline-block;
    max-width: 100%;
}
.avatar-round-frame {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(196, 85, 43, 0.2), 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 6px solid #ffffff;
    outline: 2.5px solid var(--border-warm);
    background: #f5efe6;
    margin: 0 auto;
}
@media (max-width: 576px) {
    .avatar-round-frame {
        width: 230px;
        height: 230px;
        border-width: 5px;
    }
}
.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.5s ease;
}
.hero-avatar-box:hover .avatar-img {
    transform: scale(1.05);
}

/* About Section Circular Frame */
.about-avatar-round-frame {
    position: relative;
    width: 290px;
    height: 290px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(196, 85, 43, 0.16), 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 6px solid #ffffff;
    outline: 2.5px solid var(--border-warm);
    background: #f5efe6;
    margin: 0 auto;
}
@media (max-width: 576px) {
    .about-avatar-round-frame {
        width: 230px;
        height: 230px;
        border-width: 5px;
    }
}

.status-pill {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    color: #166534;
    border: 1px solid #bbf7d0;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

/* Hero UI/UX Premium AIDA Enhancements */
.hero-title {
    font-size: 1.65rem;
    line-height: 1.25;
    letter-spacing: -0.03em;
    font-weight: 700;
}
.hero-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-body);
}
@media (min-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.22;
    }
    .hero-desc {
        font-size: 1.05rem;
        line-height: 1.55;
    }
}
@media (min-width: 992px) {
    .hero-title {
        font-size: 2.65rem;
        line-height: 1.2;
    }
    .hero-desc {
        font-size: 1.12rem;
        line-height: 1.6;
    }
}

.hero-benefit-item {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-heading);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 50px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    white-space: nowrap;
}
@media (min-width: 576px) {
    .hero-benefit-item {
        font-size: 0.88rem;
        padding: 7px 14px;
    }
}

/* Hero Action CTA Buttons Grid */
.hero-cta-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}
.hero-cta-group .btn {
    width: 100%;
    justify-content: center;
}
@media (min-width: 576px) {
    .hero-cta-group {
        flex-direction: row;
        flex-wrap: wrap;
        width: auto;
    }
    .hero-cta-group .btn {
        width: auto;
    }
}
.hero-floating-card {
    position: absolute;
    bottom: 5px;
    left: -15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    border-radius: 16px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 5;
    animation: floatBadge 4s ease-in-out infinite alternate;
}
@keyframes floatBadge {
    0% { transform: translateY(0); }
    100% { transform: translateY(-7px); }
}
@media (max-width: 991px) {
    .hero-floating-card {
        position: relative;
        bottom: auto;
        left: auto;
        margin: 18px auto 0 auto;
        display: inline-flex;
        animation: none;
    }
}
.status-pill .dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.85); opacity: 0.6; }
}

/* Buttons */
.btn-warm-primary {
    background: linear-gradient(135deg, #c4552b 0%, #ad441c 100%);
    color: #ffffff !important;
    font-weight: 700;
    border: none;
    padding: 12px 24px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(196, 85, 43, 0.22);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}
.btn-warm-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(196, 85, 43, 0.32);
    background: linear-gradient(135deg, #b34b22 0%, #9c3c18 100%);
}
.btn-telegram-direct {
    background: #229ED9;
    color: #ffffff !important;
    font-weight: 700;
    border: none;
    padding: 12px 22px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(34, 158, 217, 0.25);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}
.btn-telegram-direct:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(34, 158, 217, 0.35);
    background: #1c8cc3;
}
.btn-warm-outline {
    background: #ffffff;
    color: var(--text-heading) !important;
    font-weight: 600;
    border: 1px solid var(--border-subtle);
    padding: 12px 20px;
    border-radius: 14px;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}
.btn-warm-outline:hover {
    border-color: var(--brand-terracotta);
    color: var(--brand-terracotta) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Social Cards */
.social-chip {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-heading);
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    width: 100%;
}
.social-chip-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.social-chip:hover {
    border-color: var(--brand-terracotta);
    color: var(--brand-terracotta);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.social-chip img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Icon box */
.icon-accent-box {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: #fdf2e9;
    color: var(--brand-terracotta);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 16px;
    border: 1px solid #f9d8c0;
}

/* Stat Item */
.stat-item {
    background: #ffffff;
    border-radius: 14px;
    padding: 10px 6px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    transition: transform 0.2s ease;
}
.stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--brand-terracotta);
    font-family: 'Playfair Display', Georgia, serif;
    white-space: nowrap;
}
.stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-top: 4px;
    line-height: 1.25;
    text-align: center;
}
@media (min-width: 576px) {
    .stat-item {
        border-radius: 18px;
        padding: 14px 16px;
    }
    .stat-value {
        font-size: 1.85rem;
    }
    .stat-label {
        font-size: 0.72rem;
    }
}
@media (min-width: 992px) {
    .stat-value {
        font-size: 2.1rem;
    }
    .stat-item {
        padding: 16px 18px;
    }
}

/* Calculator */
.calc-panel {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    padding: 24px 20px;
}
@media (min-width: 768px) {
    .calc-panel {
        padding: 32px;
    }
}
.calc-result-box {
    background: #fdfbf7;
    border: 1px solid #ebd5c1;
    border-radius: 20px;
    padding: 20px;
}
@media (min-width: 768px) {
    .calc-result-box {
        padding: 28px;
    }
}
.form-control-warm, .form-select-warm {
    background-color: #faf8f5;
    border: 1.5px solid var(--border-subtle);
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-heading);
    transition: all 0.2s ease;
    max-width: 100%;
}
.form-control-warm:focus, .form-select-warm:focus {
    background-color: #ffffff;
    border-color: var(--brand-terracotta);
    box-shadow: 0 0 0 4px rgba(196, 85, 43, 0.12);
    outline: none;
}

/* Micro Social Buttons under avatar */
.social-icon-circle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    padding: 0;
    transition: all 0.2s ease;
}
.social-icon-circle:hover {
    transform: translateY(-2px);
    border-color: var(--brand-terracotta);
    box-shadow: var(--shadow-sm);
}
.social-icon-circle img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: cover;
}
.mobile-dock {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 1050;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
}
@media (max-width: 991px) {
    .mobile-dock {
        display: flex;
        align-items: center;
        justify-content: space-around;
        gap: 6px;
    }
}
.dock-btn {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 2px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.15;
    transition: transform 0.15s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}
.dock-btn:active {
    transform: scale(0.95);
}
.dock-btn i {
    font-size: 1.1rem;
    margin-bottom: 2px;
    display: block;
}
.dock-btn span {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dock-btn-phone {
    background: #fbf2e3;
    color: var(--brand-terracotta);
    border: 1px solid #f9d8c0;
}
.dock-btn-tg {
    background: linear-gradient(135deg, #229ED9 0%, #1783b7 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(34, 158, 217, 0.28);
    flex: 1.15 1 0;
}
.dock-btn-max {
    background: linear-gradient(135deg, #2a54ff 0%, #5c38ec 50%, #8c25f5 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 14px rgba(92, 56, 236, 0.35);
    flex: 1.05 1 0;
}
.dock-btn-max:hover, .dock-btn-max:focus {
    color: #ffffff;
}
.dock-btn-save {
    background: #ffffff;
    color: var(--text-body);
    border: 1px solid var(--border-subtle);
}

@media (max-width: 360px) {
    .dock-btn {
        font-size: 0.62rem;
        padding: 5px 1px;
    }
    .dock-btn i {
        font-size: 0.95rem;
    }
}

/* Ensure no horizontal scroll across elements */
.container, .container-fluid, .row {
    max-width: 100%;
}
