/* ===== DESIGN SYSTEM & VARIABLES ===== */
:root {
    /* Color Palette */
    --bg-dark: #09080d;
    --card-bg: rgba(20, 18, 30, 0.6);
    --card-border: rgba(255, 255, 255, 0.07);
    --text-primary: #ffffff;
    --text-secondary: #a09eb0;
    --text-muted: #6b6978;
    
    /* Brand Gradients */
    --primary-gradient: linear-gradient(135deg, #ff7b39 0%, #ff4b4b 100%);
    --primary-glow: rgba(255, 123, 57, 0.35);
    --bg-glow-orange: rgba(255, 123, 57, 0.12);
    --bg-glow-purple: rgba(142, 68, 173, 0.12);
    
    /* Feedback States */
    --success-color: #2ecc71;
    --success-bg: rgba(46, 204, 113, 0.1);
    --success-border: rgba(46, 204, 113, 0.2);
    --error-color: #e74c3c;
    --error-bg: rgba(231, 76, 60, 0.1);
    --error-border: rgba(231, 76, 60, 0.2);
    
    /* Inputs */
    --input-bg: rgba(255, 255, 255, 0.02);
    --input-border: rgba(255, 255, 255, 0.08);
    --input-focus-border: #ff7b39;
    --input-focus-glow: rgba(255, 123, 57, 0.15);
    
    /* Radius & Transitions */
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ===== RESET & BASE STYLES ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Ambient Background Lights */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    pointer-events: none;
    z-index: -1;
}

.bg-glow-1 {
    top: -200px;
    left: -200px;
    background: radial-gradient(circle, var(--bg-glow-orange) 0%, transparent 70%);
}

.bg-glow-2 {
    bottom: -200px;
    right: -200px;
    background: radial-gradient(circle, var(--bg-glow-purple) 0%, transparent 70%);
}

/* ===== CONTAINER (GLASS CARD) ===== */
.container {
    width: 100%;
    max-width: 680px;
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ===== HEADER & LOGO ===== */
header {
    text-align: center;
    margin-bottom: 35px;
}

.logo {
    max-width: 190px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
    filter: drop-shadow(0 8px 24px rgba(255, 123, 57, 0.15));
    transition: var(--transition-smooth);
}

.logo:hover {
    transform: scale(1.03);
}

h1 {
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 40%, #c4c2d6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 3px;
    border-radius: 30px;
    display: flex;
    gap: 2px;
}

.lang-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    text-transform: uppercase;
    font-family: var(--font-family);
    transition: var(--transition-smooth);
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 24px;
    animation: fadeIn 0.4s ease-out;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

input, select, textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition-smooth);
    outline: none;
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

input:hover, select:hover, textarea:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--input-focus-border);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px var(--input-focus-glow);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a09eb0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

select option {
    background: #14121e;
    color: var(--text-primary);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Validation Errors */
.error-field {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 0 4px var(--error-bg) !important;
    animation: shake 0.35s ease-in-out;
}

/* ===== BUTTONS ===== */
button[type="submit"] {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 16px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    width: 100%;
    font-family: var(--font-family);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
    margin-top: 10px;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px var(--primary-glow);
}

button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px var(--primary-glow);
}

/* ===== CONFIRMATION PAGE STYLE ===== */
.confirmation-message {
    text-align: center;
    padding: 20px 0;
}

.confirmation-message p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.return-btn {
    display: inline-block;
    background: var(--primary-gradient);
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

.return-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px var(--primary-glow);
}

.return-btn:active {
    transform: translateY(0);
}

/* ===== NOTIFICATIONS ===== */
.notification {
    position: fixed;
    top: 25px;
    right: 25px;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 380px;
    width: calc(100% - 50px);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.notification.visible {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid var(--success-border);
    color: white;
    border-left: 5px solid var(--success-color);
}

.notification.error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid var(--error-border);
    color: white;
    border-left: 5px solid var(--error-color);
}

.notification .close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 22px;
    margin-left: 15px;
    cursor: pointer;
    padding: 0 0 0 10px;
    line-height: 1;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.notification .close-btn:hover {
    color: var(--text-primary);
}

.notification #notification-message {
    flex: 1;
    padding-right: 10px;
    font-size: 0.95rem;
    font-weight: 500;
}

/* ===== ANIMATIONS ===== */
.conditional-block {
    display: none;
    animation: slideUpFade 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes slideUpFade {
    from { 
        opacity: 0; 
        transform: translateY(15px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* ===== RESPONSIVE STYLING ===== */
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }
    
    .container {
        padding: 30px 20px;
    }
    
    .lang-switcher {
        position: relative;
        top: 0;
        right: 0;
        margin-bottom: 20px;
        justify-content: flex-end;
        align-self: flex-end;
    }
    
    header {
        margin-top: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
}

/* ===== MAIN NAVIGATION ===== */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 18px;
    border-radius: 30px;
    border: 1.5px solid transparent;
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 10px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* ===== CATALOG CONTROLS ===== */
.catalog-controls {
    margin-bottom: 35px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-wrapper input {
    padding-left: 45px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    opacity: 0.5;
    pointer-events: none;
}

.catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1.5px solid var(--input-border);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
    transition: var(--transition-smooth);
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* ===== CATALOG GRID ===== */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 10px;
}

.machine-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1.5px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.machine-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

.machine-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.3));
    transition: var(--transition-smooth);
}

.machine-card:hover .machine-image {
    transform: scale(1.04);
}

.machine-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.machine-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.machine-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 18px;
    flex-grow: 1;
}

.machine-specs {
    margin-bottom: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.spec-item strong {
    color: var(--text-muted);
    font-weight: 500;
}

.spec-item span {
    font-weight: 500;
    color: var(--text-primary);
}

.machine-btn {
    display: block;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
}

.machine-btn:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    box-shadow: 0 6px 15px var(--primary-glow);
}

.no-results {
    grid-column: span 2;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 1rem;
}

/* Responsive adjustments for catalog */
@media (max-width: 600px) {
    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .no-results {
        grid-column: 1;
    }
}

/* ===== LIGHTBOX MODAL ===== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 8, 13, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    opacity: 1;
}

.lightbox-content {
    max-width: 85%;
    max-height: 80%;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox.show .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.lightbox-close:hover {
    color: white;
    transform: scale(1.1);
}

/* Cursor pointer on machine images to show they are clickable */
.machine-image {
    cursor: pointer;
}