/*
Theme Name: NetAcademy
Theme URI: https://www.netacademy.com
Author: NetAcademy Team
Author URI: https://www.netacademy.com
Description: A custom WordPress theme matching IT-Connect layout and UI patterns. Built with vanilla WordPress and CSS.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: netacademy
Tags: custom, blog, news, responsive
*/

/* ============================================
   RESET & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* ============================================
   CONTAINER
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 18px;
}

/* ============================================
   HEADER - TOP BAR (Row 1)
   ============================================ */

.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.site-logo {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.site-logo .logo-main {
    color: #0f4c81;
}

.site-logo .logo-suffix {
    color: #f97316;
}

.header-search {
    display: flex;
    gap: 0;
    max-width: 400px;
    width: 100%;
}

.header-search input[type="search"] {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    outline: none;
}

.header-search input[type="search"]:focus {
    border-color: #00609c;
}

.header-search button {
    padding: 10px 20px;
    background: #00609c;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.header-search button:hover {
    background: #004d7a;
}

/* ============================================
   HEADER - NAVIGATION BAR (Row 2)
   ============================================ */

.main-navigation {
    background: #00609c;
    padding: 0;
}

.main-navigation .container {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 16px 20px;
    color: #fff;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: background 0.3s ease;
}

.nav-menu > li > a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-menu > li:first-child > a {
    padding-left: 0;
}

/* Home Icon */
.nav-menu > li:first-child > a i {
    font-size: 18px;
}

.nav-menu > li.menu-item-home > a {
    text-transform: none;
    font-size: 18px;
    line-height: 1;
}

/* Hide text in home menu item, show only icon */
.nav-menu > li.menu-item-home > a {
    font-size: 0;
}

.nav-menu > li.menu-item-home > a i {
    font-size: 18px;
    display: inline-block;
}

/* Dropdown Menu */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu li {
    border-bottom: 1px solid #e5e7eb;
}

.nav-menu .sub-menu li:last-child {
    border-bottom: none;
}

.nav-menu .sub-menu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-transform: none;
    font-size: 14px;
    font-weight: 400;
}

.nav-menu .sub-menu a:hover {
    background: #f3f4f6;
    color: #00609c;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.site-main {
    padding: 40px 0;
}

/* ============================================
   HERO GRID SECTION
   ============================================ */

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.hero-main-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: #f3f4f6;
    min-height: 450px;
}

.hero-main-card .post-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-main-card .post-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.hero-main-card .post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 30px;
    color: #fff;
}

.hero-main-card .category-pill {
    display: inline-block;
    padding: 6px 12px;
    background: #f97316;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 12px;
}

.hero-main-card .post-meta {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.hero-main-card .post-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.hero-main-card .post-title a {
    color: #fff;
}

.hero-main-card .post-title a:hover {
    text-decoration: underline;
}

/* Hero Side Grid (2x2) */
.hero-side-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.hero-side-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: #f3f4f6;
    min-height: 215px;
    aspect-ratio: 1;
}

.hero-side-card .post-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-side-card .post-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.hero-side-card .post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 20px;
    color: #fff;
}

.hero-side-card .category-pill {
    display: inline-block;
    padding: 4px 10px;
    background: #f97316;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 8px;
}

.hero-side-card .post-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.hero-side-card .post-title a {
    color: #fff;
}

.hero-side-card .post-title a:hover {
    text-decoration: underline;
}

/* ============================================
   MAIN CONTENT + SIDEBAR LAYOUT
   ============================================ */

.content-sidebar-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

/* Latest Posts Section */
.latest-posts-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f4c81;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.post-list-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
}

.post-list-item:last-child {
    border-bottom: none;
}

.post-list-item .post-thumbnail-wrapper {
    flex-shrink: 0;
    width: 200px;
    height: 130px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}

.post-list-item .post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-list-item .post-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.post-list-item .post-content {
    flex: 1;
}

.post-list-item .category-pill {
    display: inline-block;
    padding: 4px 10px;
    background: #00609c;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 8px;
}

.post-list-item .post-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.post-list-item .post-title a {
    color: #333;
}

.post-list-item .post-title a:hover {
    color: #00609c;
    text-decoration: underline;
}

.post-list-item .post-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-top: 8px;
}

.post-list-item .post-meta {
    font-size: 13px;
    color: #999;
    margin-top: 10px;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    margin-top: 0;
}

.widget {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f4c81;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.widget-content {
    font-size: 14px;
    line-height: 1.6;
}

.widget-content ul {
    list-style: none;
}

.widget-content ul li {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.widget-content ul li:last-child {
    border-bottom: none;
}

.widget-content ul li a {
    color: #333;
}

.widget-content ul li a:hover {
    color: #00609c;
    text-decoration: underline;
}

/* Default Newsletter Widget */
.widget-newsletter-placeholder {
    text-align: center;
}

.widget-newsletter-placeholder p {
    margin-bottom: 15px;
    color: #666;
}

.widget-newsletter-placeholder input[type="email"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

.widget-newsletter-placeholder button {
    width: 100%;
    padding: 10px;
    background: #00609c;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.widget-newsletter-placeholder button:hover {
    background: #004d7a;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: #2d3748;
    color: #cbd5e0;
    padding: 50px 0 0;
    margin-top: 60px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 40px;
}

.footer-widget h3 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 12px;
}

.footer-widget ul li a {
    color: #cbd5e0;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-widget ul li a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-widget p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.footer-widget .footer-search {
    display: flex;
    gap: 0;
    margin-top: 15px;
}

.footer-widget .footer-search input[type="search"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #4a5568;
    border-radius: 4px 0 0 4px;
    background: #1a202c;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.footer-widget .footer-search button {
    padding: 10px 15px;
    background: #00609c;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
}

.footer-widget .footer-search button:hover {
    background: #004d7a;
}

.footer-bottom {
    background: #1a202c;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #4a5568;
}

.footer-bottom p {
    font-size: 14px;
    color: #a0aec0;
    margin: 0;
}

.footer-bottom .powered-by {
    margin-top: 8px;
    font-size: 12px;
    color: #718096;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet and below (980px) */
@media (max-width: 980px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-side-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-sidebar-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        margin-top: 40px;
    }

    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-top {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .header-search {
        max-width: 100%;
    }
}

/* Mobile (520px) */
@media (max-width: 520px) {
    .container {
        padding: 0 15px;
    }

    .site-logo {
        font-size: 24px;
    }

    .nav-menu {
        flex-wrap: wrap;
    }

    .nav-menu > li > a {
        padding: 12px 15px;
        font-size: 13px;
    }

    .hero-side-grid {
        grid-template-columns: 1fr;
    }

    .post-list-item {
        flex-direction: column;
    }

    .post-list-item .post-thumbnail-wrapper {
        width: 100%;
        height: 200px;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }

    .hero-main-card {
        min-height: 350px;
    }

    .hero-main-card .post-title {
        font-size: 22px;
    }
}
