
/* =========================================
   1. RESET & VARIABLES
   ========================================= */
:root {
    /* Colors */
    --c-bg-body: #0b0f19;
    --c-bg-card: #161d2f;
    --c-bg-card-hover: #1c253b;
    --c-primary: #3b82f6;
    --c-primary-hover: #60a5fa;
    --c-accent: #f59e0b;
    --c-accent-glow: rgba(245, 158, 11, 0.4);
    --c-danger: #ef4444;
    --c-text-main: #f1f5f9;
    --c-text-muted: #94a3b8;
    --c-border: #2d3748;
    
    /* Gradients */
    --g-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --g-accent: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --g-dark: linear-gradient(180deg, rgba(11, 15, 25, 0) 0%, #0b0f19 100%);

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --fs-h1: clamp(2rem, 5vw, 3.5rem);
    --fs-h2: clamp(1.5rem, 3vw, 2.25rem);
    --fs-body: 1rem;

    /* Spacing & Layout */
    --container-width: 1200px;
    --sp-xs: 0.5rem;
    --sp-sm: 1rem;
    --sp-md: 2rem;
    --sp-lg: 4rem;
    --br-sm: 0.5rem;
    --br-md: 1rem;
    --br-lg: 2rem;

    /* Transitions */
    --trans-fast: 0.2s ease;
    --trans-med: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--c-bg-body);
    color: var(--c-text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--trans-fast);
}

ul, ol {
    list-style: none;
    padding-left: 0;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

/* =========================================
   2. LAYOUT UTILITIES
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--sp-sm);
    width: 100%;
}

/* Flexbox fix for the inline style in HTML */
div[style*="display:flex"] {
    gap: var(--sp-md);
    align-items: flex-start;
}

/* =========================================
   3. HEADER
   ========================================= */
header {
    background: rgba(22, 29, 47, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--c-border);
    padding: var(--sp-sm) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Desktop Header Logo Area */
.men1 a {
    display: block;
    width: 150px;
    height: 40px;
    background: url('path/to/logo.png') no-repeat center/contain; /* Fallback if image missing */
    background-color: var(--c-bg-card); /* Placeholder style */
    border-radius: var(--br-sm);
}

/* Mobile Header Styling */
header.mob {
    display: none; /* Hidden by default on desktop */
}

/* Navigation Links inside Header */
.menn {
    display: flex;
    gap: var(--sp-xs);
    align-items: center;
}

.men3, .men4 {
    padding: 0.5rem 1rem;
    border-radius: var(--br-sm);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: var(--trans-med);
    text-align: center;
}

.men3 {
    background: transparent;
    border: 1px solid var(--c-primary);
    color: var(--c-primary);
}

.men3:hover {
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.men4 {
    background: var(--g-accent);
    color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.men4:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--c-accent-glow);
}

/* =========================================
   4. HERO / SLIDER SECTION
   ========================================= */
.main {
    min-height: 80vh;
}

.joyl-slide {
    position: relative;
    width: 100%;
    height: 400px;
    background: var(--c-bg-card);
    background-image: radial-gradient(circle at center, #252f46 0%, #0b0f19 100%);
    border-radius: 0 0 var(--br-lg) var(--br-lg);
    margin-bottom: var(--sp-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.joyl-slide::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--g-dark);
}

/* Placeholder for main1 in slide */
.main1 {
    width: 100%;
    height: 100%;
    min-height: 300px;
}

/* =========================================
   5. CONTENT TYPOGRAPHY
   ========================================= */
h1, h2, h3 {
    color: var(--c-text-main);
    font-weight: 700;
    margin-bottom: var(--sp-sm);
    line-height: 1.2;
}

h1 {
    font-size: var(--fs-h1) !important; /* Overriding inline style */
    text-align: center;
    margin: var(--sp-md) 0 !important;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: var(--fs-h2);
    margin-top: var(--sp-md);
    padding-bottom: var(--sp-xs);
    border-bottom: 2px solid var(--c-primary);
    display: inline-block;
}

p {
    margin-bottom: 1.25rem;
    color: var(--c-text-muted);
    font-size: 1.05rem;
}

/* Lists */
ol, ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--c-text-muted);
}

ol li, ul li {
    margin-bottom: 0.5rem;
    position: relative;
}

ul li::before {
    content: "•";
    color: var(--c-accent);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

ol {
    list-style-type: decimal;
    padding-left: 2rem;
}

/* Bold text highlights */
strong, b {
    color: var(--c-primary);
    font-weight: 600;
}

/* =========================================
   6. MAIN LAYOUT & WIDGETS
   ========================================= */
/* Left Main Column */
.joy-left {
    flex: 3;
    background: var(--c-bg-card);
    padding: var(--sp-md);
    border-radius: var(--br-md);
    border: 1px solid var(--c-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Right Sidebar */
.main-right {
    flex: 1;
    min-width: 300px;
    background: var(--c-bg-card);
    border-radius: var(--br-md);
    padding: var(--sp-sm);
    border: 1px solid var(--c-border);
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
}

.main-right a.href {
    display: block;
    width: 100%;
    height: 250px;
    background-color: #1c253b;
    border-radius: var(--br-sm);
    position: relative;
    overflow: hidden;
}

.main-right a.href::before {
    content: 'Реклама';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--c-text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    opacity: 0.5;
}

/* =========================================
   7. INTERACTIVE ELEMENTS (Buttons & Forms)
   ========================================= */
.btn-box {
    display: flex;
    justify-content: center;
    margin: var(--sp-md) 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1em 2.5em;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    background: var(--g-accent);
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
    color: #fff;
}

.btn:hover::before {
    opacity: 1;
}

.btn:active {
    transform: translateY(-1px);
}

/* Form Styles (Generic override as specific HTML wasn't deep in forms) */
input[type="text"], 
input[type="email"], 
input[type="password"] {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--c-bg-body);
    border: 1px solid var(--c-border);
    border-radius: var(--br-sm);
    color: #fff;
    margin-bottom: 1rem;
    transition: border-color var(--trans-fast);
}

input:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* =========================================
   8. FOOTER
   ========================================= */
footer {
    background: var(--c-bg-card);
    border-top: 1px solid var(--c-border);
    padding: var(--sp-md) 0;
    margin-top: var(--sp-lg);
    text-align: center;
}

.menu-fo {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--c-text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-top a {
    color: var(--c-text-main);
}

.footer-top a:hover {
    color: var(--c-primary);
}

/* =========================================
   9. UTILITIES & SCROLLER
   ========================================= */
/* Scroll to Top Button */
#scroller {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--c-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: var(--trans-med);
    opacity: 0.8;
}

#scroller:hover {
    opacity: 1;
    transform: translateY(-5px);
    background: var(--c-primary-hover);
}

.b-top-but {
    font-size: 0; /* Hide text, show icon */
}

.b-top-but::after {
    content: '↑';
    font-size: 1.5rem;
    color: #fff;
    display: block;
}

/* =========================================
   10. RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 1024px) {
    div[style*="display:flex"] {
        flex-wrap: wrap;
    }
    
    .main-right {
        width: 100%;
        flex: none;
        order: 2; /* Move sidebar to bottom on tablets */
    }
}

@media (max-width: 768px) {
    /* Hide Standard Header, Show Mobile Header */
    header:not(.mob) {
        display: none;
    }

    header.mob {
        display: block;
        padding: 10px 0;
    }

    header.mob .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .menn {
        gap: 5px;
    }

    .men3, .men4 {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    /* Layout Adjustments */
    div[style*="display:flex"] {
        flex-direction: column !important; /* Force column layout */
    }

    .joy-left, .main-right {
        width: 100%;
        padding: var(--sp-sm);
    }

    .joyl-slide {
        height: 250px;
        border-radius: 0;
    }

    .btn {
        width: 100%;
        font-size: 1rem;
    }

    /* Typography */
    h1 {
        font-size: 1.75rem !important;
    }
    
    h2 {
        font-size: 1.4rem;
    }

    .menu-fo {
        flex-direction: column;
        gap: 0.5rem;
    }
}
