/* NXP Distributor Website - Base CSS Framework */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    border-bottom: 2px solid #0099cc;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #0099cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #0099cc;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #0099cc;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 2rem;
}

.nav-menu a {
    color: #333;
    font-weight: 500;
}

.nav-menu a:hover {
    color: #0099cc;
    text-decoration: none;
}

/* Hero Banner */
.hero {
    background: linear-gradient(135deg, #003366 0%, #0099cc 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* Main Content */
main {
    padding: 2rem 0;
}

/* Section Styles */
.section {
    padding: 3rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    display: inline-block;
    border-bottom: 3px solid #0099cc;
}

/* Cards and Grids */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.card h3 {
    color: #0099cc;
    margin-top: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: #0099cc;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #0077b3;
    text-decoration: none;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #0099cc;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #ddd;
}

.footer-links a:hover {
    color: #0099cc;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #555;
    font-size: 0.9rem;
    color: #aaa;
}

/* Contact Information */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.contact-item {
    display: flex;
    align-items: flex-start;
}

.contact-icon {
    margin-right: 1rem;
    color: #0099cc;
    font-size: 1.2rem;
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #0099cc;
}

.breadcrumb span {
    margin: 0 0.5rem;
}

/* Responsive Navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow-x: auto;
    display: block;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

th {
    background-color: #0099cc;
    color: white;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

tr:hover {
    background-color: #e8f4f8;
}

.product-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-table th, .product-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.product-table th {
    background-color: #0099cc;
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.product-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.product-table tr:hover {
    background-color: #e8f4f8;
}

/* Sortable table headers */
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 25px;
}

.sortable-header::after {
    content: '↕';
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

.sortable-header.sort-asc::after {
    content: '↑';
    opacity: 1;
}

.sortable-header.sort-desc::after {
    content: '↓';
    opacity: 1;
}

/* Media Queries for Responsive Design */
@media screen and (max-width: 1199px) {
    .section {
        padding: 2rem 0;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .container {
        width: 92%;
    }
}

@media screen and (max-width: 991px) {
    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
        max-width: 600px;
    }

    .section {
        padding: 2.5rem 0;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .card {
        padding: 1.2rem;
    }

    .container {
        width: 94%;
    }
}

@media screen and (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
        z-index: 1000;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1.5rem 0;
    }

    .hero {
        padding: 2.5rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
        max-width: 90%;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card {
        padding: 1rem;
    }

    .section {
        padding: 2rem 0;
    }

    .section-title {
        margin-bottom: 2rem;
    }

    .container {
        width: 90%;
    }

    .navbar {
        padding: 0.8rem 0;
    }

    .logo {
        font-size: 1.6rem;
    }

    main {
        padding: 1.5rem 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    footer {
        padding: 2rem 0 1rem;
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .breadcrumb {
        padding: 0.8rem 0;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 8px 10px;
    }
}

@media screen and (max-width: 575px) {
    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .card {
        padding: 0.8rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .section {
        padding: 1.5rem 0;
    }

    .container {
        width: 88%;
    }

    .logo {
        font-size: 1.4rem;
    }

    .nav-menu li {
        margin: 1.2rem 0;
        font-size: 1.1rem;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }

    table {
        font-size: 0.8rem;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .footer-section {
        margin-bottom: 1.5rem;
    }
}

/* High resolution screens */
@media screen and (min-width: 1200px) {
    .container {
        max-width: 1300px;
    }

    .grid {
        gap: 2.5rem;
    }

    .card {
        padding: 2rem;
    }
}