/* Reset and base styles */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    line-height: 1.6;
    display: flex;
    /* Make body a flex container */
    flex-direction: column;
    /* Stack children vertically */
    min-height: 100vh;
    /* Ensure body takes full viewport height */
}

/* Variables */

:root {
    --primary-color: #ff6b00;
    --primary-hover: #ffa342;
    --dark-bg: #1a1a1a;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --white: #ffffff;
    --container-max-width: 1200px;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Container */

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */

.navbar {
    background-color: var(--dark-bg);
    border-bottom: 1px solid var(--gray-800);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 700;
    transition: var(--transition);
}

.logo:hover {
    color: var(--primary-hover);
}

.logo-img {
    width: 40px;
    height: 40px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -16px;
    /* Adjust this value if needed to align with your design */
    left: 12px;
    right: 12px;
    height: 2px;
    background-color: var(--primary-color);
}

/* Mobile menu */

.mobile-menu-btn {
    display: none;
    /* Hidden by default, shown in media query */
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger {
    width: 24px;
    height: 2px;
    background-color: var(--white);
    transition: var(--transition);
}

.mobile-menu {
    display: none;
    /* Hidden by default, toggled by JS */
    padding: 16px 0;
    border-top: 1px solid var(--gray-800);
}

.mobile-menu.open {
    display: block;
}

.mobile-nav-link {
    display: block;
    color: var(--white);
    text-decoration: none;
    padding: 12px 20px;
    /* Added horizontal padding for mobile links */
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--primary-color);
}

/* Main content */

.main-content {
    flex: 1;
    /* Allow main content to grow and push footer down */
    padding: 80px 0 120px;
    /* Added padding to main content */
}

/* Page title */

.page-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin: 64px 0 48px;
    padding-top: 40px;
    /* Add padding to push content down from fixed header */
}

/* Hero section (index.html) */

.hero {
    /* Исправлен путь к изображению и уменьшено затемнение */
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url("images/hero-background.jpg");
    /* Увеличено затемнение до 40% */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    flex-grow: 1;
    /* Ensure hero takes full height if it's the only content */
}

.hero-content {
    max-width: 800px;
    padding: 20px;
    /* Added padding for content inside hero */
}

.hero-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.hero-logo-img {
    width: 64px;
    height: 64px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

.hero-subtitle {
    font-size: 24px;
    font-weight: 500;
    color: var(--white);
    margin: 24px 0 32px;
}

.hero-description {
    font-size: 18px;
    color: var(--gray-200);
    margin-bottom: 48px;
    line-height: 1.7;
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

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

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* About page styles */

.about-hero {
    display: flex;
    flex-direction: row;
    /* Default to row for larger screens */
    gap: 40px;
    margin-bottom: 60px;
    align-items: stretch;
    /* Ensure children stretch to match height */
}

.about-hero-image {
    flex: 1;
    min-width: 300px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    height: 350px;
    /* Fixed height for consistency */
    display: flex;
    /* Added to center image if it's smaller */
    align-items: center;
    justify-content: center;
}

.about-hero-image .hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Затемнение для about-hero-v3.jpeg */

.about-hero-image .image-darkening-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.3);
    /* 30% черный оверлей */
    border-radius: var(--border-radius);
    /* Соответствует радиусу родителя */
}

.about-hero-content {
    flex: 1;
    min-width: 300px;
    display: flex;
    /* Make it a flex container to stretch its child */
    flex-direction: column;
}

.content-card {
    background-color: var(--gray-800);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--gray-700);
    height: 100%;
    /* Ensure it takes full height of its flex parent */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Vertically center content if there's extra space */
}

.section-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: left;
    /* Ensure text is left-aligned within the card */
}

.text-content {
    font-size: 16px;
    color: var(--gray-200);
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: left;
    /* Ensure text is left-aligned within the card */
}

.text-content:last-child {
    margin-bottom: 0;
}

.about-secondary {
    margin-bottom: 60px;
}

.secondary-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.secondary-image .secondary-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.overlay-content {
    color: var(--white);
    max-width: 600px;
}

.overlay-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
}

.overlay-text {
    font-size: 18px;
    color: var(--gray-200);
}

/* Company details */

.company-details {
    margin-bottom: 80px;
    /* Увеличен отступ снизу для секции */
}

.details-card {
    background-color: var(--gray-800);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--gray-700);
    overflow-x: auto;
}

.card-header {
    background-color: var(--primary-color);
    padding: 12px 20px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin: -30px -30px 20px -30px;
    text-align: center;
}

.card-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--white);
    margin: 0;
}

.card-content {
    padding: 0;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table td {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-700);
    font-size: 16px;
    color: var(--gray-200);
}

.details-table tr:last-child td {
    border-bottom: none;
}

.table-label {
    font-weight: 500;
    color: var(--primary-color);
    width: 180px;
    padding-right: 40px;
    /* Увеличен отступ справа для лейбла */
    white-space: nowrap;
    text-align: left;
    /* Ensure label is left-aligned */
}

.table-value {
    color: var(--white);
    text-align: left;
    /* Ensure value is left-aligned */
}

/* Catalog styles */

.catalog-info {
    text-align: center;
    margin-bottom: 40px;
}

.catalog-count {
    font-size: 20px;
    color: var(--gray-200);
}

.count-number {
    font-weight: 700;
    color: var(--primary-color);
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.equipment-card {
    background-color: var(--gray-900);
    /* Changed to gray-900 for consistency with Next.js preview */
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, background-color 0.3s ease;
    /* Added background-color transition */
    border: 1px solid var(--gray-800);
    /* Added border for the "frame" */
    padding: 20px;
    /* Added padding to the card itself */
}

.equipment-card:hover {
    transform: translateY(-5px);
    background-color: var(--gray-800);
    /* Darker on hover */
}

.card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: var(--white);
    /* White background for images */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    /* Rounded corners for image container */
    margin-bottom: 16px;
    /* Space below image */
}

.equipment-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Use contain to show full image without cropping */
    display: block;
}

.equipment-card h3,
.equipment-card h4,
.equipment-card p {
    padding: 0;
    /* Removed padding as it's on the card now */
}

.equipment-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 0;
    /* Removed top margin as padding is on card */
    margin-bottom: 10px;
    line-height: 1.2;
    /* Tighter line height */
}

.equipment-subtitle {
    font-size: 16px;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 15px;
    line-height: 1.2;
    /* Tighter line height */
}

.equipment-description {
    font-size: 14px;
    color: var(--gray-300);
    /* Changed to gray-300 for better contrast */
    line-height: 1.6;
    flex-grow: 1;
    /* Allows description to take available space */
    margin-bottom: 20px;
}

.card-footer {
    border-top: 1px solid var(--gray-700);
    padding-top: 20px;
    /* Adjusted padding */
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    /* Center items in footer */
    margin-top: auto;
    /* Pushes footer to the bottom */
}

.price-info {
    font-size: 14px;
    color: var(--gray-400);
    /* Changed to gray-400 */
    font-weight: 500;
    text-align: center;
    /* Center text */
}

/* Contacts styles */

.contacts-layout {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
    flex-wrap: wrap;
    /* Allow wrapping on smaller screens */
}

.contacts-info {
    flex: 2;
    /* Takes more space */
    min-width: 300px;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.contact-card {
    background-color: var(--gray-900);
    /* Changed to gray-900 */
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 25px;
    border: 1px solid var(--gray-800);
    /* Added border for the "frame" */
}

.contact-card-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-align: center;
    /* Center title */
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background-color: var(--gray-800);
    /* Background for each contact item */
    padding: 16px;
    /* Padding for each contact item */
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease;
}

.contact-item:hover {
    background-color: var(--gray-700);
    /* Darker on hover */
}

.contact-icon {
    background-color: var(--primary-color);
    /* Background for icon */
    padding: 8px;
    /* Padding for icon */
    border-radius: var(--border-radius);
    flex-shrink: 0;
    display: flex;
    /* Center SVG inside */
    align-items: center;
    justify-content: center;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    color: var(--white);
    /* Icon color */
}

.contact-details {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 14px;
    color: var(--gray-400);
    margin-bottom: 4px;
}

.contact-link,
.contact-value {
    font-size: 16px;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    word-break: break-all;
    /* Allow long emails to break */
}

.contact-link:hover {
    color: var(--primary-color);
}

/* Изменения для рамки и текста в контактах */

.contact-note {
    background-color: var(--gray-800);
    /* Более светлый фон */
    border: 1px solid var(--gray-700);
    /* Более светлая рамка */
    padding: 15px;
    border-radius: var(--border-radius);
    font-size: 14px;
    color: var(--gray-200);
    /* Убедимся, что текст виден */
    line-height: 1.6;
    margin-top: auto;
    /* Pushes note to the bottom of the card */
    text-align: center;
    opacity: 1;
    /* Убираем прозрачность, если она делала текст нечитаемым */
}

.contact-image {
    flex: 1;
    /* Takes less space, but grows */
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-image .image-container {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    width: 100%;
    height: 100%;
    min-height: 300px;
    /* Ensure image container has a minimum height */
}

.contact-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Image overlay for contact image */

.contact-image .image-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent, rgba(0, 0, 0, 0.2));
    /* Gradient overlay */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Align content to bottom */
    align-items: flex-start;
    /* Align text to left */
    padding: 24px;
    /* Padding for content inside overlay */
    text-align: left;
    /* Align text left */
}

.contact-image .overlay-content {
    background-color: rgba(0, 0, 0, 0.5);
    /* Semi-transparent background for text */
    backdrop-filter: blur(4px);
    /* Blur effect */
    border-radius: var(--border-radius);
    padding: 16px 24px;
    max-width: none;
    /* Remove max-width constraint */
}

.contact-image .overlay-title {
    font-size: 24px;
    /* Adjusted font size */
    margin-bottom: 8px;
    /* Adjusted margin */
    color: var(--primary-color);
    /* Changed title color */
}

.contact-image .overlay-text {
    font-size: 16px;
    /* Adjusted font size */
    color: var(--gray-200);
}

/* Footer */

.footer {
    background-color: var(--dark-bg);
    border-top: 1px solid #333333;
    padding: 32px 0;
    margin-top: auto;
    /* Push footer to the bottom */
}

.footer-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.footer-info p {
    font-size: 14px;
    color: #aaaaaa;
}

.footer-contacts {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #aaaaaa;
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-separator {
    color: var(--gray-600);
    font-size: 14px;
}

/* Responsive Design */

@media (max-width: 1024px) {
    .about-hero {
        flex-direction: column;
        align-items: center;
    }
    .contacts-layout {
        flex-direction: column;
        align-items: center;
    }
    .about-hero-image,
    .about-hero-content,
    .contacts-info,
    .contact-image {
        width: 100%;
        max-width: 600px;
        /* Limit width on smaller screens */
        height: auto;
        /* Allow height to adjust on smaller screens */
    }
    .secondary-image .secondary-img {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .hero {
        background-attachment: scroll;
        padding: 40px 20px;
    }
    .hero-title {
        font-size: 32px;
    }
    .hero-subtitle {
        font-size: 18px;
    }
    .hero-description {
        font-size: 16px;
    }
    .hero-logo-img {
        width: 48px;
        height: 48px;
    }
    .page-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    .about-hero,
    .about-secondary,
    .company-details,
    .equipment-grid,
    .contacts-layout {
        margin-bottom: 40px;
    }
    .content-card,
    .details-card,
    .equipment-card,
    .contact-card {
        padding: 20px;
    }
    .section-title,
    .card-title,
    .contact-card-title {
        font-size: 24px;
    }
    .overlay-title {
        font-size: 28px;
    }
    .overlay-text {
        font-size: 16px;
    }
    .details-table td {
        font-size: 13px;
    }
    .table-label {
        width: 100px;
        /* Further reduce width for labels on small mobile */
        padding-right: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    .nav-container {
        padding: 0 16px;
    }
    .hero-content {
        transform: scale(0.9);
    }
    .hero-title {
        font-size: 28px;
    }
    .hero-subtitle {
        font-size: 16px;
    }
    .hero-description {
        font-size: 14px;
    }
    .page-title {
        font-size: 24px;
    }
    .about-hero-image,
    .about-hero-content,
    .contacts-info,
    .contact-image {
        max-width: 100%;
    }
    .secondary-image .secondary-img {
        height: 250px;
    }
    .overlay-title {
        font-size: 24px;
    }
    .overlay-text {
        font-size: 14px;
    }
    .contact-cards {
        grid-template-columns: 1fr;
        /* Stack cards on very small screens */
    }
}

/* Declarations Section */

.declarations-section {
    margin-bottom: 80px;
}

.declarations-card {
    background-color: var(--gray-800);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--gray-700);
}

.declarations-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 20px;
}

.declaration-item {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.declaration-item:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.declaration-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.declaration-img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: none;
    object-position: center;
    display: block;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

/* Responsive design for declarations */

@media (max-width: 768px) {
    .declarations-list {
        gap: 30px;
    }
    .declaration-item {
        padding: 15px;
    }
    .declaration-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    .declaration-img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .declarations-card {
        padding: 20px;
    }
    .declarations-list {
        gap: 25px;
    }
    .declaration-item {
        padding: 12px;
    }
    .declaration-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    .declaration-img {
        max-width: 100%;
        height: auto;
    }
}