/* ==========================================
   NEWS.CSS - T-ELEC ENERGY
   Adapted from projects.css for news listing
   ========================================== */

:root {
    --orange: #FF8C42;
    --blue: #0047AB;
    --bg-dark: #0a0a0a;
    --dark-bg: #1a1a1a;
    --footer-text: #cccccc;
    --light: #f8f9fa;
    --text-dark: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Raleway', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--text-dark);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* ==========================================
   NAVIGATION
   ========================================== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
}

.nav-logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
}

.nav-logo img {
    height: 110px;
    width: auto;
    transform: translateY(5px);
    transition: height 0.3s ease;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 10px;
    position: relative;
    padding: 5px 15px;
}

.nav-links li {
    position: relative;
}

.nav-links li a {
    text-decoration: none;
    color: var(--blue);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    padding: 10px 20px;
    display: inline-block;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.nav-marker {
    position: absolute;
    height: 38px;
    width: 0;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    background: var(--blue);
    border-radius: 20px;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-links li:hover a {
    color: white !important;
}

.nav-links:not(:hover) .nav-marker {
    opacity: 0 !important;
    width: 0 !important;
}

/* NAV ITEM */
.nav-item {
    position: relative;
}

/* SUB-MENU DESKTOP */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 10px;
    border-radius: 12px;
    min-width: 240px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 9990;
}

.nav-item:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(10px);
}

nav.scrolled .sub-menu {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.sub-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 !important;
}

.sub-menu ul li a {
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0.5px;
    padding: 10px 15px !important;
    border-radius: 8px;
    transition: all 0.3s ease !important;
    display: block;
    width: 100%;
    white-space: nowrap;
}

nav.scrolled .sub-menu ul li a {
    color: var(--text-dark) !important;
}

.sub-menu ul:hover li a:not(:hover) {
    opacity: 0.4;
}

.sub-menu ul li a:hover {
    color: var(--orange) !important;
    transform: translateX(8px);
    background: rgba(255, 140, 66, 0.1);
}

/* ==========================================
   NEWS BANNER
   ========================================== */
.news-banner {
    margin-top: 130px;
    position: relative;
    width: 100%;
    height: 65vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.news-banner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 1;
    filter: brightness(0.8) contrast(1.1);
}

.news-banner::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 71, 171, 0.6) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(255, 140, 66, 0.3) 100%
    );
    z-index: 2;
}

/* ==========================================
   PAGE HEADER (BANNER TEXT)
   ========================================== */
.page-header {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 10%;
    background: transparent !important;
}

.page-header h1 {
    font-size: clamp(35px, 6vw, 65px);
    font-weight: 900;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out;
}

.page-header h1::after {
    content: "";
    display: block;
    width: 80px;
    height: 6px;
    background: var(--orange);
    margin: 20px auto;
    border-radius: 10px;
}

.page-header p {
    font-size: clamp(14px, 2vw, 20px);
    font-weight: 700;
    color: var(--orange);
    letter-spacing: 6px;
    text-transform: uppercase;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   MAIN LAYOUT
   ========================================== */
.main-content-layout {
    display: flex;
    padding: 50px 8%;
    gap: 40px;
    background: #fcfcfc;
}

/* ==========================================
   SIDEBAR
   ========================================== */
.sidebar {
    flex: 0 0 280px;
}

.sidebar-sticky {
    position: sticky;
    top: 100px;
}

.sidebar-section {
    margin-bottom: 35px;
}

.sidebar-section h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--blue);
    margin-bottom: 20px;
    border-left: 4px solid var(--orange);
    padding-left: 15px;
}

.group-title {
    font-size: 12px !important;
    color: #999 !important;
    margin: 20px 0 10px !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* SEARCH BOX */
.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 1px solid #eee;
    border-radius: 12px;
    outline: none;
    font-family: 'Raleway', sans-serif;
    font-size: 14px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: var(--orange);
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--orange);
}

/* NAV LINK ITEM */
.nav-link-item {
    display: block;
    padding: 12px 15px;
    color: #555;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border-radius: 10px;
    transition: 0.3s;
}

.nav-link-item:hover {
    background: var(--blue);
    color: white !important;
    padding-left: 25px;
}

/* STAT ITEM */
.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    font-size: 14px;
    font-weight: 600;
}

.stat-item i {
    color: var(--orange);
    font-size: 20px;
}

/* SIDEBAR BUTTONS */
.btn-sidebar-call,
.btn-sidebar-contact {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 10px;
    transition: 0.3s;
}

.btn-sidebar-call {
    background: var(--orange);
    color: white;
}

.btn-sidebar-call:hover {
    background: #e07a30;
    color: white;
}

.btn-sidebar-contact {
    background: #f0f4ff;
    color: var(--blue);
    border: 1px solid #dde7ff;
}

.btn-sidebar-contact:hover {
    background: var(--blue);
    color: white;
}

/* ==========================================
   PRODUCT DISPLAY (MAIN CONTENT AREA)
   ========================================== */
.product-display {
    flex: 1;
}

/* BRAND SECTION */
.brand-section {
    position: relative;
    padding: 40px 0;
    overflow: hidden;
    border-bottom: 1px solid #eee;
}

.brand-header {
    position: relative;
    z-index: 2;
    margin-bottom: 40px;
}

.brand-header h2 {
    font-size: 30px;
    color: var(--blue);
    text-transform: uppercase;
    border-left: 6px solid var(--orange);
    padding-left: 20px;
}

/* ==========================================
   NEWS GRID
   ========================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* ==========================================
   NEWS CARD
   ========================================== */
.news-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: all 0.4s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    border-color: var(--orange);
    box-shadow: 0 20px 40px rgba(0, 71, 171, 0.1);
}

.news-card-img {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.news-card:hover .news-card-img img {
    transform: scale(1.08);
}

.news-card-img .date-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: var(--orange);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.news-card-no-img {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #0047AB 0%, #FF8C42 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cat-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; margin-bottom: 8px; letter-spacing: .03em; }
.cat-energy    { background: #fff7ed; color: #ea580c; }
.cat-technical { background: #eff6ff; color: #2563eb; }
.nav-link-item.active-cat { background: var(--blue) !important; color: white !important; padding-left: 25px !important; }

.news-card-body h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--blue);
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-body h3::after {
    content: "";
    display: block;
    width: 30px;
    height: 3px;
    background: var(--orange);
    margin-top: 10px;
}

.news-card-summary {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
    flex: 1;
}

.news-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #f5f5f5;
}

.news-card-views {
    font-size: 12px;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-card-btn {
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.3s;
}

.news-card:hover .news-card-btn {
    color: var(--orange);
    gap: 8px;
}

/* ==========================================
   SKELETON LOADING
   ========================================== */
.news-skeleton {
    border-radius: 16px;
    overflow: hidden;
    background: white;
    border: 1px solid #f0f0f0;
    height: 380px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================
   REVEAL EFFECT
   ========================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    visibility: hidden;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

.news-grid .news-card:nth-child(2) { transition-delay: 0.1s; }
.news-grid .news-card:nth-child(3) { transition-delay: 0.2s; }
.news-grid .news-card:nth-child(4) { transition-delay: 0.3s; }

/* ==========================================
   FOOTER
   ========================================== */
.main-footer {
    background-color: var(--dark-bg);
    color: #fff;
    padding: 60px 0 20px 0;
    font-family: 'Raleway', sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 40px;
}

.footer-col h4 {
    color: var(--orange);
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    text-transform: uppercase;
    font-weight: 700;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 50px;
    height: 2px;
    background: var(--orange);
}

.footer-slogan {
    font-size: 1rem;
    font-weight: 900;
    color: var(--orange);
    margin: 15px 0;
    letter-spacing: 1px;
}

.footer-desc {
    color: var(--footer-text);
    line-height: 1.6;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

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

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--footer-text);
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--orange);
    padding-left: 5px;
}

.footer-contact ul {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--footer-text);
    font-size: 0.9rem;
}

.footer-contact i {
    color: var(--orange);
    margin-top: 4px;
    width: 20px;
    text-align: center;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 35px;
    height: 35px;
    background: #333;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--orange);
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #333;
    text-align: center;
    font-size: 0.85rem;
    color: #777;
}

.footer-bottom a {
    color: var(--orange);
    text-decoration: none;
}

/* ==========================================
   MOBILE MENU TOGGLE
   ========================================== */
.menu-toggle {
    display: none;
    color: #121212;
    font-size: 26px;
    cursor: pointer;
    z-index: 10000;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 992px) {
    .main-content-layout {
        flex-direction: column;
    }

    .sidebar {
        flex: none;
        width: 100%;
    }

    .sidebar-sticky {
        position: relative;
        top: 0;
    }

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

@media (max-width: 768px) {
    .menu-toggle {
        display: block !important;
        margin-right: 15px;
    }

    .nav-logo img {
        height: 80px;
        transform: translateY(0);
    }

    .nav-links {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 75% !important;
        height: 100vh !important;
        background: rgba(15, 15, 15, 0.98) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        padding: 90px 30px 30px 30px !important;
        transition: right 0.4s cubic-bezier(0.19, 1, 0.22, 1) !important;
        overflow-y: auto !important;
        z-index: 9998 !important;
        gap: 0 !important;
    }

    .nav-links.nav-active {
        right: 0 !important;
    }

    .nav-item {
        width: 100% !important;
        margin-bottom: 5px !important;
    }

    .nav-item > a {
        color: #fff !important;
        font-size: 15px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 15px 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    }

    .nav-marker {
        display: none !important;
    }

    .sub-menu {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100% !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: none !important;
    }

    .sub-menu.mobile-active {
        display: block !important;
        margin-top: 5px !important;
    }

    .sub-menu ul {
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    .sub-menu ul li {
        width: 100% !important;
        display: block !important;
    }

    .sub-menu ul li a {
        padding: 12px 0 !important;
        font-size: 14px !important;
        color: rgba(255,255,255,0.7) !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        white-space: normal !important;
        transform: none !important;
        background: transparent !important;
    }

    nav.scrolled .nav-links li a { color: #fff !important; }
    nav.scrolled .sub-menu { background: transparent !important; border: none !important; box-shadow: none !important; }
    nav.scrolled .sub-menu ul li a { color: rgba(255,255,255,0.7) !important; }

    .main-content-layout {
        flex-direction: column !important;
        padding: 20px 5% !important;
        gap: 20px !important;
    }

    .sidebar {
        width: 100% !important;
        flex: none !important;
        padding: 0 !important;
    }

    .sidebar-sticky {
        position: relative !important;
        top: 0 !important;
    }

    .news-banner {
        height: 250px !important;
        min-height: unset !important;
        margin-top: 110px !important;
    }

    .news-banner img {
        height: 100% !important;
        object-fit: contain !important;
        object-position: center center !important;
    }

    .page-header h1 {
        font-size: 28px !important;
        letter-spacing: 0 !important;
    }

    .page-header p {
        letter-spacing: 2px !important;
        font-size: 12px !important;
    }

    .news-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .footer-container {
        grid-template-columns: 1fr !important;
        text-align: left;
    }

    .footer-col h4::after {
        left: 0;
    }
}

@media (max-width: 600px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .footer-col h4::after {
        left: 0;
    }
}
