/* ===================================
   SHARED PAGE STYLES
   Used by News, Products, Applications pages
   Minimalist approach - DRY principle
   =================================== */

/* Common Variables as CSS Custom Properties */
:root {
    --primary-red: #da251d;
    --primary-red-dark: #b91c14;
    --primary-navy: #092235;
    --light-bg: #f8f9fa;
    --light-gray: #e9ecef;
    --text-dark: #495057;
    --text-light: #6c757d;
    --border-light: rgba(0,0,0,0.05);
    --shadow-light: 0 4px 20px -8px rgba(9,34,53,0.12);
    --shadow-hover: 0 12px 40px -12px rgba(218, 37, 29, 0.25);
    --transition: all .3s ease;
    --border-radius: 1.5rem;
    --border-radius-sm: 1rem;
}

/* ===================================
   PAGE HEADER COMPONENT
   =================================== */
.page-header {
    background-size: cover; 
    background-position: center; 
    position: relative; 
    min-height: 320px;
}

.page-header[data-bg="customer-service-4.jpg"] {
    background-image: url('/assets/img/backgrounds/customer-service-4.jpg');
}

.page-header[data-bg="Products-center-2021.jpg"] {
    background-image: url('/assets/img/backgrounds/Products-center-2021.jpg');
}

.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9,34,53,0.55);
}

.page-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 4rem 0 2rem 0;
}

.page-title {
    color: #fff;
    font-size: 3rem;
    letter-spacing: 2px;
    margin-bottom: 1.2rem;
}

.breadcrumbs {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
}

.breadcrumbs a {
    color: rgba(255,255,255,0.8);
    text-decoration: underline;
}

/* ===================================
   CATEGORY NAVIGATION
   =================================== */
.category-nav {
    display: flex; 
    flex-wrap: wrap; 
    gap: 1rem; 
    margin: 2.5rem 0 3rem 0; 
    justify-content: center;
    align-items: center;
}

.category-nav a {
    background: linear-gradient(135deg, var(--light-bg) 0%, var(--light-gray) 100%); 
    color: var(--primary-navy); 
    border-radius: 2rem; 
    padding: .8rem 2rem; 
    font-weight: 600;
    text-decoration: none; 
    transition: var(--transition); 
    box-shadow: 0 2px 12px -4px rgba(9,34,53,0.15);
    border: 2px solid transparent;
    font-size: .95rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.category-nav a:hover,
.category-nav a.active {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%); 
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px -6px rgba(218, 37, 29, 0.4);
    border-color: rgba(255,255,255,0.2);
}

.category-nav a img {
    width: 1.8em !important;
    height: 1.8em !important;
    object-fit: contain;
    filter: brightness(1);
    transition: filter .3s ease;
}

.category-nav a:hover img {
    filter: brightness(0) invert(1);
}

/* ===================================
   CATEGORY SECTIONS
   =================================== */
.category-block { 
    margin-bottom: 4rem; 
    scroll-margin-top: 120px;
}

.category-title { 
    font-size: 2.2rem; 
    margin-bottom: 2rem; 
    color: var(--primary-navy);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-red);
    position: relative;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
}

.category-title img {
    width: 2.5em !important;
    height: 2.5em !important;
    object-fit: contain;
    padding: .3rem;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    border-radius: 50%;
    filter: brightness(0) invert(1);
}

/* ===================================
   GRID LAYOUTS
   =================================== */
.content-grid { 
    display: grid;
    gap: 2rem;
    margin-top: 1rem;
}

/* News Grid */
.news-grid {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

/* Products/Applications Grid */
.items-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Contact Methods Grid */
.contact-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* Info Grid */
.info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

/* Network Grid */
.network-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

/* ===================================
   CARD COMPONENTS
   =================================== */
.content-card {
    background: #fff; 
    border-radius: var(--border-radius); 
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit;
}

.content-card:hover { 
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(218, 37, 29, 0.1);
    text-decoration: none !important;
    color: inherit;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    opacity: 0;
    transition: opacity .3s ease;
}

.content-card:hover::before {
    opacity: 1;
}

.card-content {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-image {
    text-align: center;
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    background: linear-gradient(135deg, var(--light-bg) 0%, #ffffff 100%);
    border-radius: var(--border-radius-sm);
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image img { 
    max-width: 70px; 
    max-height: 70px;
    object-fit: contain;
    border-radius: .5rem;
    transition: transform .3s ease;
}

.content-card:hover .card-image img {
    transform: scale(1.05);
}

.card-title { 
    color: var(--primary-navy); 
    font-size: 1rem; 
    margin-bottom: .6rem;
    font-weight: 600;
    line-height: 1.3;
    transition: color .3s ease;
}

.content-card:hover .card-title {
    color: var(--primary-red);
}

.card-summary { 
    color: var(--text-dark); 
    line-height: 1.4;
    margin-bottom: 0.8rem;
    font-size: .85rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-info {
    background: var(--light-bg);
    border-radius: .5rem;
    padding: .6rem;
    margin-top: auto;
    font-size: .8rem;
    line-height: 1.3;
}

.product-info div {
    margin-bottom: .3rem;
}

.product-info div:last-child {
    margin-bottom: 0;
}

.product-info strong {
    color: var(--primary-navy);
    font-weight: 600;
}

.card-meta {
    color: var(--text-light);
    font-size: .85rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 500;
}

.card-meta::before {
    content: '';
    margin-right: .5rem;
}

.card-footer {
    margin-top: auto;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-cta {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    transition: var(--transition);
    position: relative;
    display: inline-flex;
    align-items: center;
}

.content-card:hover .card-cta {
    color: var(--primary-red-dark);
}

.card-cta::after {
    content: '→';
    margin-left: .5rem;
    transition: transform .3s ease;
}

.content-card:hover .card-cta::after {
    transform: translateX(4px);
}

/* ===================================
   CONTACT SPECIFIC COMPONENTS
   =================================== */
.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: #fff;
}

.contact-icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.contact-link {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--primary-red-dark);
    text-decoration: underline;
}

.contact-description {
    color: var(--text-light);
    font-size: .9rem;
    margin-top: .8rem;
}

/* ===================================
   INFO CARD COMPONENTS
   =================================== */
.info-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    padding: 2.5rem;
    border: 1px solid var(--border-light);
}

.info-card h3 {
    color: var(--primary-navy);
    font-size: 1.4rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-red);
    position: relative;
}

.info-card h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
}

.info-item {
    margin-bottom: 1.5rem;
}

.info-label {
    color: var(--primary-navy);
    font-weight: 600;
    display: block;
    margin-bottom: .3rem;
}

.info-value {
    color: var(--text-dark);
    line-height: 1.5;
}

.benefits-list {
    list-style: none;
    padding: 0;
}

.benefits-list li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.benefits-list li::before {
    content: '✓';
    color: var(--primary-red);
    font-weight: bold;
    margin-right: 1rem;
    width: 20px;
    height: 20px;
    background: rgba(218, 37, 29, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
}

/* ===================================
   SECTION HEADERS
   =================================== */
.section-header {
    color: var(--primary-navy);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-dark);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
}

/* ===================================
   PAGINATION
   =================================== */
.pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pagination-nav a,
.pagination-nav span {
    padding: .7rem 1.2rem;
    border-radius: .5rem;
    text-decoration: none;
    transition: var(--transition);
}

.pagination-nav a {
    background: var(--light-bg);
    color: var(--primary-navy);
    border: 1px solid var(--border-light);
}

.pagination-nav a:hover {
    background: var(--primary-red);
    color: #fff;
    transform: translateY(-2px);
}

.pagination-nav .current {
    background: var(--primary-red);
    color: #fff;
}

.pagination-nav .disabled {
    background: transparent;
    color: var(--text-light);
    cursor: not-allowed;
    border: 1px solid var(--border-light);
}

/* ===================================
   EMPTY STATES
   =================================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.empty-state h3 {
    color: var(--primary-navy);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* ===================================
   SMOOTH SCROLLING
   =================================== */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    .category-nav {
        margin: 2rem 0;
        justify-content: flex-start;
    }
    
    .category-nav a {
        padding: .6rem 1.5rem;
        font-size: .9rem;
    }
    
    .category-nav a img {
        width: 1.5em !important;
        height: 1.5em !important;
    }
    
    .category-title {
        font-size: 1.8rem;
    }
    
    .category-title img {
        width: 2em !important;
        height: 2em !important;
    }
    
    .items-grid,
    .news-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 3rem;
    }
    
    .network-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .card-content {
        padding: 1.2rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .card-summary {
        font-size: .85rem;
        -webkit-line-clamp: 2;
    }
    
    .card-image {
        padding: .8rem;
        min-height: 80px;
    }
    
    .card-image img {
        max-width: 70px;
        max-height: 70px;
    }
    
    .product-info {
        padding: .6rem;
        font-size: .8rem;
    }
    
    .card-footer {
        padding-top: .8rem;
    }
    
    .info-card {
        padding: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .page-title {
        font-size: 2.2rem;
    }
    
    .page-header-content {
        padding: 3rem 0 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .category-nav {
        overflow-x: auto;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-red) transparent;
        padding-bottom: .5rem;
    }
    
    .category-nav::-webkit-scrollbar {
        height: 4px;
    }
    
    .category-nav::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .category-nav::-webkit-scrollbar-thumb {
        background: var(--primary-red);
        border-radius: 2px;
    }
    
    .category-title {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-summary {
        font-size: .8rem;
        -webkit-line-clamp: 2;
    }
    
    .product-info {
        padding: .5rem;
        font-size: .75rem;
    }
    
    .card-cta {
        font-size: .85rem;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .contact-icon img {
        width: 25px;
        height: 25px;
    }
    
    .info-card {
        padding: 1.5rem;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */
@media (prefers-reduced-motion: no-preference) {
    .category-block {
        animation: fadeInUp 0.6s ease-out forwards;
        opacity: 0;
        transform: translateY(30px);
    }
    
    .category-block:nth-child(2) { animation-delay: 0.1s; }
    .category-block:nth-child(3) { animation-delay: 0.2s; }
    .category-block:nth-child(4) { animation-delay: 0.3s; }
    .category-block:nth-child(5) { animation-delay: 0.4s; }
    
    @keyframes fadeInUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ===================================
   DETAIL PAGES STYLES
   =================================== */
.detail-container {
    max-width: 800px;
    margin: 2rem auto;
}

.application-detail {
    max-width: 700px;
}

.detail-page-title {
    font-size: 2.2rem !important;
}

.detail-content {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    padding: 3rem;
    border: 1px solid var(--border-light);
}

.detail-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.detail-title {
    color: var(--primary-navy);
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.detail-meta {
    color: var(--text-light);
    font-size: .9rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 500;
}

.detail-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px -8px rgba(9,34,53,0.15);
}

.detail-image-float {
    max-width: 180px;
    height: auto;
    float: right;
    margin-left: 2rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 4px 20px -8px rgba(9,34,53,0.15);
}

.detail-body {
    line-height: 1.8;
    color: var(--text-dark);
    font-size: 1rem;
}

.detail-body h1, .detail-body h2, .detail-body h3 {
    color: var(--primary-navy);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.detail-body p {
    margin-bottom: 1.2rem;
}

.detail-body ul, .detail-body ol {
    margin-bottom: 1.2rem;
    padding-left: 2rem;
}

.detail-body img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: var(--border-radius-sm);
}

.detail-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.back-link {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.back-link:hover {
    color: var(--primary-red-dark);
    transform: translateX(-4px);
}

/* ===================================
   PRODUCT DETAIL SPECIFIC STYLES
   =================================== */
.category-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.product-description {
    margin-bottom: 2rem;
    line-height: 1.7;
    color: var(--text-dark);
}

.product-specs {
    background: var(--light-bg);
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    margin-top: 2rem;
}

.product-specs h3 {
    color: var(--primary-navy);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.specs-grid {
    display: grid;
    gap: 1rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background: #fff;
    border-radius: 0.5rem;
    border: 1px solid var(--light-gray);
}

.spec-item strong {
    color: var(--primary-navy);
    font-weight: 600;
}

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

/* ===================================
   DETAIL PAGES RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    .detail-container {
        margin: 1rem auto;
    }
    
    .detail-content {
        padding: 2rem;
    }
    
    .detail-title {
        font-size: 1.6rem;
    }
    
    .detail-body {
        font-size: .95rem;
    }
    
    .spec-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .detail-content {
        padding: 1.5rem;
    }
    
    .detail-title {
        font-size: 1.4rem;
    }
    
    .detail-body ul, .detail-body ol {
        padding-left: 1.5rem;
    }
    
    .product-specs {
        padding: 1rem;
    }
} 