/* Reset and Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9fb;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

a {
    text-decoration: none;
    color: #0056b3;
    transition: color 0.3s ease;
}

a:hover {
    color: #003d82;
}

/* Header & Navigation */
.site-header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000; /* Increased z-index to stay above everything */
    width: 100%;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px; /* Reduced from 20px to prevent horizontal issues */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.site-logo img {
    max-height: 60px;
    width: auto;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-navigation a {
    color: #444;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
    padding: 10px 5px; /* Increased padding for better touch targets */
    position: relative;
    display: inline-block; /* Ensure padding applies correctly */
}

.main-navigation a:hover,
.main-navigation a.active {
    color: #0056b3;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0056b3;
    transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation a.active::after {
    width: 100%;
}

/* Page Title */
.page-header {
    background-color: #f1f4f8;
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid #e1e5eb;
    width: 100%;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 10px;
}

/* Main Content */
.site-content {
    flex: 1;
    padding: 60px 0;
    width: 100%;
}

/* Partners List */
.partners-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.partner-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border: 1px solid #eef0f3;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

@media (max-width: 992px) {
    .partner-card {
        flex-direction: column;
        align-items: stretch;
    }
    
    .partner-logo {
        flex: 0 0 auto;
        padding: 30px 20px;
        border-right: none;
        border-bottom: 1px solid #eef0f3;
        min-height: 160px;
    }
}

.partner-logo {
    padding: 30px;
    flex: 0 0 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fafafa;
    border-right: 1px solid #eef0f3;
    height: 100%;
}

.partner-logo img {
    max-width: 100%;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.partner-info {
    padding: 30px;
    flex: 1;
}

.partner-info h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2d3748;
}

.partner-info p {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 15px;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    color: #0056b3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 0; /* Add padding for better touch target */
}

.btn-link svg {
    margin-left: 5px;
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.btn-link:hover svg {
    transform: translateX(4px);
}

/* Home Page */
.hero-section {
    background-color: #0056b3;
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.hero-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 20px;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

.about-section {
    display: grid;
    gap: 60px;
    grid-template-columns: 1fr;
}

@media (min-width: 992px) {
    .about-section {
        grid-template-columns: 1fr 1fr;
    }
}

.about-text h2, .customers-section h3 {
    font-size: 28px;
    color: #1a202c;
    margin-bottom: 20px;
}

.about-text p {
    font-size: 18px;
    color: #4a5568;
    line-height: 1.8;
}

.customer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.customer-list li {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #eef0f3;
}

.customer-icon {
    width: 40px;
    height: 40px;
    background: #eef2f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0056b3;
    flex-shrink: 0;
}

.customer-icon svg {
    width: 20px;
    height: 20px;
}

.customer-info strong {
    display: block;
    color: #2d3748;
    font-size: 16px;
}

.customer-info span {
    color: #718096;
    font-size: 14px;
}

/* Catalog Page */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.catalog-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef0f3;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.catalog-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.catalog-img {
    height: 220px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border-bottom: 1px solid #eef0f3;
}

.catalog-img img {
    max-width: 100%;
    max-height: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.catalog-title {
    padding: 25px;
    text-align: center;
}

.catalog-title h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 18px;
}

/* Licenses Page */
.licenses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    justify-content: center;
}

.license-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef0f3;
    text-align: center;
}

.license-img {
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
}

.license-img img {
    max-width: 100%;
    height: auto;
    border: 1px solid #e2e8f0;
}

.license-card h3 {
    color: #2d3748;
    font-size: 18px;
}

/* Contacts Page */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.contact-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef0f3;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: #eef2f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0056b3;
    margin: 0 auto 20px;
}

.contact-icon svg {
    width: 28px;
    height: 28px;
}

.contact-card h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 20px;
}

.contact-card p {
    color: #4a5568;
    margin-bottom: 10px;
}

.contact-card p:last-child {
    margin-bottom: 0;
}

.company-details {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef0f3;
    text-align: center;
}

.company-details h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 22px;
}

.company-details p {
    color: #4a5568;
    font-size: 16px;
    margin-bottom: 10px;
}

/* Footer */
.site-footer {
    background-color: #1a202c;
    color: #a0aec0;
    padding: 40px 0;
    text-align: center;
    font-size: 14px;
    width: 100%;
}

.site-footer p {
    margin-bottom: 10px;
}

.site-footer a {
    color: #cbd5e0;
}

.site-footer a:hover {
    color: #ffffff;
}

/* Responsive Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px; /* Slightly larger for easier tapping */
    cursor: pointer;
    color: #333;
    padding: 10px; /* Better touch target area */
    margin-right: -10px; /* Offset padding to align visually */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    /* Header */
    .site-header {
        padding: 10px 0;
    }
    
    .site-logo img {
        max-height: 45px;
        max-width: 100%; /* Ensure logo doesn't overflow container */
        width: auto;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1010; /* Highest z-index to always be clickable */
        padding: 10px;
        margin-right: -5px; /* Adjust to align properly without causing overflow */
    }

    .main-navigation {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 320px;
        height: 100%; /* Use 100% instead of 100vh to avoid mobile browser chrome issues */
        background: #fff;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
        padding: 80px 0 20px;
        transition: left 0.3s ease-in-out;
        z-index: 1005; /* Make sure menu is above everything */
        overflow-y: auto;
        overflow-x: hidden; /* Prevent internal horizontal scroll */
        display: block;
    }
    
    .main-navigation.active {
        left: 0; /* Slide in */
    }
    
    .main-navigation ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 0;
    }
    
    .main-navigation a {
        padding: 15px 30px;
        width: 100%;
        text-align: left;
        font-size: 16px;
        border-bottom: 1px solid #f0f0f0;
    }

    .main-navigation a::after {
        display: none; /* Remove underline animation on mobile */
    }

    /* Overlay for mobile menu */
    body.menu-open {
        overflow: hidden;
    }
    
    body.menu-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999; /* Changed from 1000 to 999 so it sits under the menu (1001) and header (1000) */
        transition: opacity 0.3s ease;
    }
    
    /* Typography */
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .page-title {
        font-size: 26px;
    }

    .about-text h2, .customers-section h3 {
        font-size: 24px;
    }
    
    /* Layouts */
    .hero-section {
        padding: 50px 0;
    }
    
    .site-content {
        padding: 40px 0;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
    }
    
    .licenses-grid {
        grid-template-columns: 1fr;
    }
    
    .contacts-grid {
        grid-template-columns: 1fr;
    }
}

/* Typography for very small screens */
@media (max-width: 360px) {
    .hero-title {
        font-size: 26px;
    }
    .hero-subtitle {
        font-size: 16px;
    }
    .page-title {
        font-size: 22px;
    }
    .about-text h2, .customers-section h3 {
        font-size: 20px;
    }
    .partner-logo {
        padding: 20px 10px;
        min-height: 120px;
    }
}
