/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', 'Arial', sans-serif;
}

body {
    background: #ffffff;
    color: #222222;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
}

/* Header */
.header {
    width: 100%;
    background: #ffffff;
    padding: 15px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2000;
}

/* Logo */
.logo {
    font-size: 28px;
    font-weight: 700;
    color: #222222;
    position: relative;
    transition: transform 0.3s;
    line-height: 1;
}

.logo:hover {
    transform: scale(1.1);
    color: #4db2ec;
}

/* Hamburger */
.hamburger {
    display: none;
    font-size: 27px;
    color: #222222;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    gap: 14px;
}

.nav-menu a {
    color: #222222;
    text-decoration: none;
    padding: 0 14px;
    line-height: 48px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
}

.nav-menu a:hover {
    background: #f5f5f5;
    color: #4db2ec;
}

/* Main Content */
.main-content {
    flex: 2;
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin-right: 24px;
    color: #222222;
    width: 100%;
}

.main-content p, .main-content h3, .main-content li {
    color: #222222;
}

.main-content a {
    color: #4db2ec;
    text-decoration: none;
}

.main-content a:hover {
    text-decoration: underline;
}

.main-content strong {
    color: #222222;
    font-weight: 700;
}

.firmware-title {
    font-size: 2.5em;
    font-weight: 700;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #4db2ec;
    background: linear-gradient(90deg, #007bff, #00c4cc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Device Grid */
.device-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.device-card {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.device-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.device-card h3 {
    font-size: 1.5em;
    font-weight: 700;
    color: #222222;
    margin-bottom: 10px;
}

.device-card p {
    font-size: 1em;
    color: #666666;
    flex-grow: 1;
}

/* Sidebar */
.sidebar {
    flex: 1;
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Profile Info */
.profile-info {
    text-align: center;
    color: #222222;
    margin-bottom: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e5e5;
}

.profile-info img {
    border-radius: 50%;
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
    border: 2px solid #4db2ec;
}

.profile-info h3 {
    font-size: 1.5em;
    margin-bottom: 5px;
    color: #222222;
}

.profile-info p {
    font-size: 1em;
    color: #666666;
}

/* Sidebar Links */
.sidebar-links a {
    display: block;
    color: #222222;
    text-decoration: none;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
}

.sidebar-links a:hover {
    background: #f5f5f5;
    color: #4db2ec;
}

/* Footer */
.footer {
    width: 100%;
    background: #ffffff;
    padding: 15px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666666;
    font-size: 12px;
}

.footer-menu {
    display: flex;
    gap: 16px;
}

.footer-menu a {
    color: #666666;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-menu a:hover {
    color: #4db2ec;
}

/* Firmware Content and Download Button */
.firmware-content {
    margin-top: 20px;
    max-width: 100%;
    overflow: hidden;
}

.firmware-carrier {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.download-button {
    position: relative;
    display: block;
    width: 100%;
    padding: 15px 20px;
    background-color: #5d829b !important;
    color: #fff !important;
    text-decoration: none;
    border-radius: 5px;
    overflow: hidden;
    transition: background-color 0.3s;
    text-align: center;
    font-weight: 700;
    cursor: pointer;
}

.download-button:hover {
    background-color: #486b85 !important;
}

.download-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: left 0.5s ease-out;
    z-index: 0;
}

.download-button:hover::before {
    left: 100%;
}

/* Additional Theme-Specific Styles */
h2 {
    padding: 9px 9px 9px 25px;
    background-image: linear-gradient(to right, #2d446c 0%, #33A597 50%, #08917a 100%);
    border-radius: 10px;
    color: #fff !important;
    box-shadow: 0 7px 28px rgba(23, 43, 99, 0.3);
    font-weight: 700;
    margin-bottom: 15px;
}

.firmware-instructions {
    margin-top: 20px;
}

/* Responsive Design */
@media (min-width: 1019px) and (max-width: 1140px) {
    .container {
        width: 980px;
    }
    .main-content, .sidebar {
        padding: 20px;
    }
    .nav-menu a {
        padding: 0 9px;
        font-size: 11px;
    }
}

@media (min-width: 768px) and (max-width: 1018px) {
    .container {
        width: 740px;
    }
    .main-content, .sidebar {
        padding: 14px;
    }
    .nav-menu a {
        padding: 0 9px;
        font-size: 11px;
    }
    .device-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .container {
        width: 100%;
        padding: 20px;
    }
    .main-content, .sidebar {
        flex: 100%;
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }
    .device-grid {
        grid-template-columns: 1fr;
    }
    .hamburger {
        display: block;
    }
    .nav-menu {
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        width: 200px;
        background: #ffffff;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
        z-index: 2000;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
    }
    .nav-menu.active {
        max-height: 300px;
    }
    .nav-menu a {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        border-bottom: 1px solid #e5e5e5;
        line-height: 1;
    }
    .nav-menu a:last-child {
        border-bottom: none;
    }
    .footer {
        flex-direction: column;
        text-align: center;
    }
    .footer-menu {
        margin-top: 10px;
    }
}