/* styles.css - Mobile-fixed version with working hamburger & visible content */

/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    padding-top: 60px;
    background-color: rgb(201, 207, 211);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===================================
   NAVBAR STYLES
   =================================== */
.navbar {
    background-color: rgb(199, 201, 214);
    padding: 0.75rem 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 1000;
}

.navbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.navbar .logo {
    color: #222;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
    min-width: 120px;
}

.navbar .logo:hover {
    color: #4CAF50;
}

/* Desktop nav links */
.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links li a {
    color: #222;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links li a:hover {
    color: #4CAF50;
}

.nav-links li a.active {
    color: #3250bd;
}

.nav-links li a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #4CAF50;
}

/* Hamburger button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    touch-action: manipulation;
    z-index: 1001;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: #222;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===================================
   CARDS SECTION - Sunken top & bottom
   =================================== */
.cards-section {
    background-color: rgb(52, 161, 215);
    padding: 1.5rem 0;
    margin-top: 0;
    text-align: center;
    box-shadow: 
        inset 0 20px 25px -15px rgba(0, 0, 0, 0.4),
        inset 0 -20px 25px -15px rgba(0, 0, 0, 0.3);
}

.cards-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.cards-section h2 {
    color: white;
    font-size: 1.7rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.languages-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
}

.language-card {
    background-color: #b8cbc4;
    color: #333;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    padding: 0.8rem;
    width: 95px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.language-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.language-card h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.language-card img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

/* ===================================
   MAIN CONTENT
   =================================== */
.container {
    max-width: 1100px;
    margin: 1rem auto;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    flex: 1;
}

.feed-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.feed-column {
    display: flex;
    flex-direction: column;
}

.link-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 0.5rem;
}

.feed-item {
    padding: 0.5rem 0;
    transition: background 0.2s ease;
}

.feed-item:hover {
    background-color: #f9f9f9;
}

.feed-link {
    text-decoration: none;
    color: #222;
    display: block;
}

.feed-title {
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.4;
}

.feed-date {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.35rem;
}

/* Column separator on desktop */
@media (min-width: 769px) {
    #techradar-feed {
        border-right: 1px solid #eee;
        padding-right: 1rem;
    }
    #techplanet-feed {
        padding-left: 1rem;
    }
}

/* ===================================
   FOOTER
   =================================== */
footer {
    text-align: center;
    padding: 2rem;
    background: #333;
    color: white;
    margin-top: auto;
}

footer p {
    margin: 0;
    color: white;
}

/* ===================================
   RESPONSIVE - Hamburger & mobile fixes
   =================================== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: rgb(233, 234, 243);
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .nav-links.active {
        max-height: 400px;
    }

    .nav-links li a {
        display: block;
        padding: 1rem 2rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        font-size: 1rem;
    }

    .nav-links li a.active::after {
        display: none;
    }

    .feed-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 0.75rem 0.75rem;    /* Even tighter side margins */
        padding: 1rem;              /* Compact padding */
        border-radius: 6px;
        max-width: none;            /* Remove max-width limit */
        width: calc(100% - 1.5rem); /* Full width minus small margin */
    }

    /* Also tighten the feed layout on very small screens */
    .feed-layout {
        gap: 1.5rem;
        padding: 0 0.5rem;          /* Extra safety margin inside */
    }

    .feed-column {
        padding: 0 0.5rem;
    }

    .feed-title {
        font-size: 1rem;
    }

    .feed-date {
        font-size: 0.8rem;
    }
    
    .navbar {
        padding: 0.75rem 1rem;
    }

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

    .language-card {
        width: 75px;
        padding: 0.6rem;
    }

    .language-card img {
        width: 40px;
        height: 40px;
    }
}