/* ============================================= */
/* ============== GLOBAL STYLES & VARIABLES ==== */
/* ============================================= */

/* CSS variables for easy theme customization */
:root {
    --primary-bg-color: #0a192f;  /* Dark blue background */
    --secondary-bg-color: #112240; /* Slightly lighter dark blue */
    --font-color-primary: #ccd6f6; /* Light grey/blue for text */
    --font-color-secondary: #8892b0; /* Muted grey for secondary text */
    --accent-color: #64ffda; /* Teal/mint for highlights and links */
    --header-height: 80px;
}

/* Basic reset and box-sizing */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--primary-bg-color);
    color: var(--font-color-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================= */
/* ============= HEADER & NAVIGATION =========== */
/* ============================================= */

.main-header {
    position: fixed; top: 0; left: 0;
    width: 100%; height: var(--header-height);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 40px; z-index: 100;
    background-color: rgba(10,25,47,0.85);
    backdrop-filter: blur(10px);
}

.logo a { font-weight: bold; font-size: 1.5rem; color: var(--accent-color); text-decoration: none; text-align: center; }
.logo { order: 2; flex: 1; }
#menu-toggle { order: 1; }
.top-right-nav { order: 3; }

.menu-toggle { background: none; border: none; cursor: pointer; z-index: 101; padding: 10px; }
.hamburger-line { width: 30px; height: 3px; background-color: var(--accent-color); margin: 6px 0; transition: all 0.3s ease; }

.top-right-nav a {
    color: var(--accent-color); text-decoration: none; font-size: 1rem;
    padding: 10px 15px; border: 1px solid var(--accent-color); border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.top-right-nav a:hover { background-color: rgba(100,255,218,0.1); }

/* Side nav */
.side-nav {
    position: fixed; top: 0; left: 0; height: 100%; width: 240px;
    background-color: var(--secondary-bg-color); z-index: 99; padding-top: 100px;
    transform: translateX(-100%); transition: transform 0.4s cubic-bezier(0.645,0.045,0.355,1);
}
.side-nav.open { transform: translateX(0); }

.menu-close {
    position: absolute; top: 20px; right: 20px; background: none; border: none;
    color: var(--accent-color); font-size: 2.5rem; cursor: pointer;
}
.side-nav ul { list-style: none; display: flex; flex-direction: column; align-items: center; }
.side-nav ul li { width: 100%; text-align: center; margin: 15px 0; }
.side-nav ul li a { color: var(--font-color-primary); text-decoration: none; font-size: 1.5rem; padding: 10px 0; transition: color 0.3s ease; }
.side-nav ul li a:hover { color: var(--accent-color); }
/* Active state */
.side-nav ul li a.active { color: var(--accent-color); font-weight: bold; text-shadow: 0 0 8px var(--accent-color); }

/* ============================================= */
/* =============== PAGE SECTIONS =============== */
/* ============================================= */

.fullscreen-section {
    min-height: 100vh; /* responsive: allow to grow if content needs it */
    display: flex; justify-content: center; align-items: center;
    padding: 0 5%; position: relative;
}

.hero-section {
    background-image: url("images/cyber3.gif");
    background-size: cover; background-repeat: no-repeat; background-position: center;
    background-color: rgba(0,0,0,0.5); background-blend-mode: overlay;
}

.content-container { max-width: 800px; text-align: center; }

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--font-color-primary); margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(100,255,218,0.35);
}
h2 { font-size: clamp(2rem, 5vw, 3.5rem); color: var(--font-color-primary); margin-bottom: 1rem; }
p  { font-size: 1.1rem; line-height: 1.6; color: var(--font-color-secondary); max-width: 600px; margin: 0 auto; }

.button {
    display: inline-block; margin-top: 2rem; padding: 12px 24px;
    border: 1px solid var(--accent-color); border-radius: 4px; color: var(--accent-color);
    text-decoration: none; transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.button:hover { background-color: rgba(100,255,218,0.1); box-shadow: 0 0 14px rgba(100,255,218,0.4); }

/* Scroll indicator */
.scroll-indicator {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    width: 24px; height: 40px; border: 2px solid var(--accent-color); border-radius: 20px;
}
.scroll-indicator span {
    position: absolute; top: 8px; left: 50%; width: 4px; height: 8px;
    background-color: var(--accent-color); border-radius: 2px; transform: translateX(-50%); animation: scroll-anim 2s infinite;
}
@keyframes scroll-anim { 0%{transform:translate(-50%,0);opacity:1} 50%{transform:translate(-50%,10px);opacity:1} 100%{transform:translate(-50%,20px);opacity:0} }

/* ============================================= */
/* ============= MOBILE RESPONSIVE ============= */
/* ============================================= */

@media (max-width: 768px) {
    .main-header { padding: 0 20px; }
    .top-right-nav { display: none; }
    .side-nav { width: 280px; }
    .fullscreen-section { padding: 0 10%; }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    p  { font-size: 1rem; }
    .side-nav ul li a.active { color: var(--accent-color); font-weight: bold; }
}

/* ============================================= */
/* =========== COMPLETE BLOG STYLES ============ */
/* ============================================= */

.content-section {
    padding: 120px 5% 60px; min-height: 100vh;
    display: flex; justify-content: center; align-items: flex-start;
}
.blog-container, .blog-post-container { max-width: 800px; width: 100%; text-align: left; }
.blog-container h2, .blog-container p { text-align: center; }

.blog-list { margin-top: 4rem; display: flex; flex-direction: column; gap: 3rem; }
.blog-preview { border-bottom: 1px solid #233554; padding-bottom: 2rem; }
.blog-title a { color: var(--font-color-primary); text-decoration: none; font-size: 1.75rem; transition: color 0.3s ease; }
.blog-title a:hover { color: var(--accent-color); }
.blog-meta { color: var(--font-color-secondary); font-size: 0.9rem; margin: 0.5rem 0 1rem; }
.blog-excerpt { color: var(--font-color-secondary); line-height: 1.6; }
.read-more { display: inline-block; margin-top: 1rem; color: var(--accent-color); text-decoration: none; font-weight: bold; }

.blog-row {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: 2rem; margin-top: 3rem; margin-bottom: 3rem; width: 100%;
}
.blog-card {
    background-color: var(--secondary-bg-color); border-radius: 4px; border: 1px solid #233554;
    text-align: left; flex: 1; min-width: 280px; max-width: 350px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; display: flex; flex-direction: column; padding: 0;
}
.blog-card-image { width: 100%; height: 180px; object-fit: cover; }
.blog-card-content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.blog-card-excerpt { color: var(--font-color-secondary); font-size: 1rem; line-height: 1.6; margin-bottom: 1.5rem; flex-grow: 1; }
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.2), 0 0 16px rgba(100,255,218,0.25); }
.blog-card h3 { color: var(--font-color-primary); margin-bottom: 1rem; font-size: 1.25rem; }

/* Tablet: 2-up feel for cards */
@media (max-width: 1024px) { .blog-row { justify-content: center; } .blog-card { flex: 0 1 calc(50% - 2rem); } }
@media (max-width: 768px) { .blog-row { flex-direction: column; align-items: center; } }

/* ======== BLOG POST HERO IMAGE STYLE ========= */
.post-hero-image { width: 100%; height: auto; margin-top: 2rem; border-radius: 4px; }

/* ============================================= */
/* ================ FOOTER STYLES ============== */
/* ============================================= */

.site-footer {
    background-color: var(--secondary-bg-color); color: var(--font-color-secondary);
    /* COMPACT FOOTER TUNING: tighten vertical padding */
    padding: 24px 5% 12px;
    position: relative;
}

/* COMPACT FOOTER TUNING:
   - Keep 4 columns on desktop
   - Add a max-width container to prevent ultra-wide stretch
   - Reduce internal gaps and bottom padding
   - Align items to start so short columns don't stretch height
*/
.footer-main {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 1.25rem;                 /* was 2rem / 1.5rem */
    padding-bottom: 18px;         /* was 40px → 28px → 18px */
    border-bottom: 1px solid #233554;
    align-items: start;
    max-width: 1200px;            /* NEW: contain width to keep it visually compact */
    margin: 0 auto;               /* center container */
}

.footer-heading {
    color: var(--font-color-primary);
    /* COMPACT FOOTER TUNING */
    font-size: 1.05rem;           /* was 1.2/1.15 */
    margin-bottom: 0.6rem;        /* was 1.5/0.9 */
}
.footer-heading::before { content: '» '; color: var(--accent-color); }

/* COMPACT FOOTER TUNING: tighter text rhythm */
.footer-column p { margin-bottom: 0.5rem; line-height: 1.5; }

.social-icons { display: flex; gap: 0.5rem; margin-top: 0.75rem; } /* was 0.75–1.5rem */
.social-icons a {
    display: inline-flex; justify-content: center; align-items: center;
    width: 32px; height: 32px;   /* was 40 → 36 → now 32 */
    border-radius: 50%;
    background-color: #233554; color: var(--font-color-primary);
    text-decoration: none; font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.social-icons a:hover { background-color: var(--accent-color); color: var(--primary-bg-color); transform: translateY(-2px); }

/* COMPACT FOOTER TUNING: smaller form controls */
.footer-form { display: flex; margin-top: 0.6rem; }
.footer-form input {
    flex-grow: 1; border: none; padding: 6px 10px;
    background-color: #ccd6f6; color: #0a192f; border-radius: 4px 0 0 4px; min-width: 100px;
}
.footer-form button {
    border: none; background-color: #3b3b8e; color: white; padding: 6px 10px;
    cursor: pointer; border-radius: 0 4px 4px 0; font-weight: 700;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.4rem; } /* was 0.75 → 0.5 */
.footer-links a { color: var(--font-color-secondary); text-decoration: none; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--accent-color); }

/* COMPACT FOOTER TUNING: smaller bottom row */
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 8px;             /* was 20 → 12 → now 8 */
    font-size: 0.85rem;           /* was 0.9/0.88 */
    max-width: 1200px;            /* match top container */
    margin: 0 auto;
}

.footer-legal-links a { color: var(--font-color-secondary); text-decoration: none; margin: 0 0.5rem; }
.footer-legal-links a:hover { color: var(--accent-color); }

/* Footer responsive tiers – KEEP 4 → 2 → 1 */
@media (max-width: 1199px) { .footer-main { grid-template-columns: repeat(2, minmax(220px, 1fr)); } }
@media (max-width: 767px)  { .footer-main { grid-template-columns: 1fr; } }

/* Responsive adjustments for footer bottom row */
@media (max-width: 768px) {
    .footer-bottom { flex-direction: column; gap: 0.6rem; text-align: center; }
}

/* ============================================= */
/* ============== OVERLAY STYLES =============== */
/* ============================================= */

.page-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5); z-index: 98;
    opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease;
}
.page-overlay.active { opacity: 1; visibility: visible; }

/* ============================================= */
/* =========== BACK TO TOP (FLOATING) ========== */
/* ============================================= */

.floating-back-to-top {
    position: fixed; right: 24px; bottom: 24px;
    background: var(--accent-color); color: var(--primary-bg-color);
    text-decoration: none; font-size: 1.15rem; border-radius: 999px;
    padding: 12px; box-shadow: 0 0 12px rgba(100,255,218,0.55);
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease; z-index: 200;
}
.floating-back-to-top:hover { transform: scale(1.12); box-shadow: 0 0 18px rgba(100,255,218,0.85); }

/* Legacy ID kept for compatibility */
#back-to-top { font-size: 1.5rem; text-decoration: none; transition: transform 0.3s ease; }
#back-to-top:hover { transform: scale(1.2); }
