:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-color: #007bff;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--primary-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

.navbar {
    border-bottom: 1px solid var(--border-color);
    padding: 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;

    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    line-height: 1;
}

/* Логотип в navbar */
.navbar-brand .navbar-logo {
    /* На мобильных (до 992px) делаем его меньше */
    height: 50px !important; 
    width: auto;
    transition: height 0.3s ease;
}

/* На десктопах (от 992px) возвращаем ваши 96px */
@media (min-width: 992px) {
    .navbar-brand .navbar-logo {
        height: 96px !important;
    }
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
}

.btn-primary:hover {
    background-color: #333;
    border-color: #333;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

/* Custom Utilities */
.rounded-lg {
    border-radius: 12px !important;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075)!important;
}

.section-padding {
    padding: 50px 0; /* Reduced padding */
}

/* Homepage Hero Section */
.hero-section {
    position: relative; /* Needed for the overlay */
    background-image: url('../images/interior-design.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: scroll; /* Normal scrolling behavior */
    min-height: 90vh;
    display: flex;
    align-items: flex-start;
    justify-content: start;
    padding-top: 15vh;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2; /* Ensure content is above the overlay */
}

/* Style for the text in the hero */
.lead-hero {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.9;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Results Page Slider Styles */
.result-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px !important;
}
.result-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175)!important;
}
.before-after-slider {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    cursor: col-resize;
}
.before-after-slider .result-image-before,
.before-after-slider .result-image-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Prevent image drag */
}
.before-after-slider .result-image-after {
    /* The magic happens here: clip the 'After' image */
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}
.before-after-slider .before-after-handle {
    position: absolute;
    top: 0;
    left: 50%; /* Initial position */
    width: 4px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    transform: translateX(-2px);
    z-index: 10;
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
}
.before-after-slider .before-after-handle::after {
    content: '\2194'; /* Unicode left-right arrow */
    font-family: sans-serif;
    color: #000;
    background: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* Styles Page Cards */
.style-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 15px !important;
}
.style-card img {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    transition: transform 0.3s ease;
}
.style-card:hover img {
    transform: scale(1.05);
}
.style-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
}
.style-card:hover .style-card-overlay {
    opacity: 1;
}
.style-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #fff;
}
.style-actions {
    display: flex;
    gap: 10px;
}
.style-actions .btn {
    min-width: 120px;
}

/* Footer Styles */
.footer-divider {
    height: 1px;
    background-color: rgba(255,255,255,0.1);
    margin-top: 40px;
}

footer .list-unstyled a {
    transition: color 0.2s ease-in-out;
}
footer .list-unstyled a:hover {
    color: var(--secondary-color) !important; /* white */
}

.payment-icons i,
.social-icons i {
    font-size: 1.7rem; /* Adjust size for visual balance */
    color: rgba(255, 255, 255, 0.7) !important; /* Light gray */
    transition: color 0.2s ease-in-out;
}

.payment-icons i:hover,
.social-icons a:hover i {
    color: var(--secondary-color) !important; /* white on hover */
}

/* Legal Pages Styling */
.page-header-bg {
    background-color: var(--primary-color); /* Dark background for title section */
}

#page-toc ul {
    list-style: none;
    padding-left: 0;
}
#page-toc ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
#page-toc ul li a:hover,
#page-toc ul li a.active {
    color: var(--primary-color);
    font-weight: 600;
}
#page-toc h5 {
    color: var(--primary-color);
}

.page-content-wrapper {
    max-width: 800px; /* Constrain line length for readability */
    margin-left: auto;
    margin-right: auto;
}
.page-content-wrapper h2,
.page-content-wrapper h3,
.page-content-wrapper h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-top: 1rem; /* Space for sticky header */
}
.page-content-wrapper p {
    margin-bottom: 1rem;
    line-height: 1.8;
}
.page-content-wrapper ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 1rem;
}

/* Pricing Page Custom Token Amount Result Styling */
.pricing-result-group {
    font-size: 1.75rem; /* Match h3 font size */
    font-weight: 700; /* Match h3 font weight */
}

/* Pricing Page Buy Now Button Styling */
@media (min-width: 992px) { /* Applies to desktop (lg and up) */
    #buy_custom_tokens_btn {
        min-height: calc(3rem * 2); /* Double height of a standard btn-lg */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        line-height: 1.2; /* Adjust line height for two lines of text */
    }
}

/* Custom Token Amount Calculator - Mobile Styling */

/* Hide number input spin buttons */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
}

@media (max-width: 991.98px) { /* Small devices (lg breakpoint and below) */
    .custom-amount-calculator-group {
        flex-direction: column; /* Stack items vertically */
        width: 100%; /* Ensure input group takes full width */
    }

    .custom-amount-calculator-group .btn {
        width: 100%; /* Buttons take full width */
        /* border-radius: 0.375rem !important; */ /* Managed by specific rules below */
    }
    
    .custom-amount-calculator-group .form-control {
        width: 100%; /* Input takes full width */
        margin-bottom: 0 !important; /* Remove bottom margin */
        border-radius: 0 !important; /* Remove border-radius */
    }

    /* Order for mobile layout: +, Input, - */
    #increase_generations_btn {
        order: -1; /* Place '+' button first */
        margin-bottom: 0; /* Remove gap */
        border-top-left-radius: 0.375rem !important;
        border-top-right-radius: 0.375rem !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }
    
    #custom_generations_input {
        order: 0; /* Input field in the middle */
        margin-bottom: 0; /* Remove gap */
        border-radius: 0 !important; /* Ensure input is square */
    }

    #decrease_generations_btn {
        order: 1; /* Place '-' button last */
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
        border-bottom-left-radius: 0.375rem !important;
        border-bottom-right-radius: 0.375rem !important;
    }

    /* Reset some Bootstrap input-group specific styles */
    .custom-amount-calculator-group > :not(:first-child):not(.dropdown-menu):not(.dropdown-toggle) {
        margin-left: 0 !important;
    }
    .custom-amount-calculator-group > :not(:last-child) {
        margin-right: 0 !important;
    }
}

/* How It Works Page Cards */
.how-it-works-card .card-img-top {
    height: 200px; /* Fixed height for consistent image size */
    object-fit: cover;
}
.how-it-works-card .card-body {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}
.how-it-works-card .card-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}
.how-it-works-card .card-text {
    font-size: 0.95rem;
    line-height: 1.6;
}
.how-it-works-card ul {
    margin-top: 1rem;
    margin-bottom: 0;
}
.how-it-works-card ul li {
    margin-bottom: 0.5rem;
}

/* Contact Modal Styling */
.modal-body .hover-primary:hover {
    color: var(--primary-color) !important;
}

/* Auth Buttons in Navbar (Desktop) */
@media (min-width: 992px) {
    .auth-wrapper .btn {
        padding: 0.4rem 0.8rem; /* Уменьшенный паддинг */
        white-space: nowrap;    /* Запрет переноса текста */
        width: 100px;           /* Фиксированная ширина для выравнивания */
    }
    .auth-wrapper .btn.btn-outline-primary {
        margin-right: 0.5rem; /* Добавляем небольшой отступ между кнопками */
    }
}

/* Generator Results Buttons - Ensure consistent height for view/download buttons */
.results-gallery .btn {
    padding-top: 0.375rem !important;
    padding-bottom: 0.375rem !important;
    line-height: 1.5 !important; /* Standard line-height for small buttons */
}

/* My History Table Image Thumbnails */
.history-thumbnail {
    max-width: 100px;
    height: auto; /* Maintain aspect ratio */
    display: block; /* Ensure it takes up its own line and respects max-width better */
    cursor: pointer; /* Inherit pointer from parent or re-add explicitly */
}
