/* Core Stuff */
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    font-family: var(--primary-font);
    font-size: var(--base-font-size);
    line-height: 1.3
;
    color: var(--body-text-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--heading-font);
    color: var(--heading-color);
}

a {
  text-decoration: none;
  color: var(--heading-color);
}

a:hover {
  color: var(--heading-color);
  text-shadow: 0 0 15px rgba(0, 255, 255, 0.7);
}

pre {
    background: #F0F0F0;
    margin: 1rem 0;
    border-radius: 2px;
}

blockquote {
    border-left: 10px solid #eee;
    margin: 0;
    padding: 0 2rem;
}

/*Images*/
img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: auto;
}

/* Utility Classes */
.wrapper {
    margin: 0 3rem;
}

.padding {
    padding: 3rem 1rem;
}

.left {
    float: left;
}

.right {
    float: right
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

/* Content Styling */

/* --- Card Container for Modules --- */
.card {
    max-width: 1600px;
    margin: 0 auto; /* Center the card */
    padding: 20px;
    border-radius: 0;
    background-color: rgba(10, 10, 13, 0.7); /* Same as widgets */
    border: 1px solid #00ffff; /* Neon border */
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.7); /* Stronger neon glow */
}

/* --- Module Row Layout --- */
.module-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.module-row .content-block {
    flex: 1 1 calc(50% - 20px); /* Flex-grow, flex-shrink, and basis */
}

/* Liquid Cyber Punk Menu Styles */
.header {
    background-color: transparent;
    position: absolute; /* Position over hero */
    width: 100%;
    z-index: 100;
    display: flex; /* Use flexbox for alignment */
    justify-content: space-between; /* Space out logo and nav */
    align-items: center;
    padding: 20px; /* Add padding directly to header */
}

.header .logo {
    flex-shrink: 0; /* Prevent logo from shrinking */
}

.header .main-nav {
    flex-grow: 1; /* Allow nav to take available space */
    text-align: center; /* Center the navigation text */
}

.main-nav ul {
    display: inline-block; /* Allow ul to be centered by text-align */
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav ul li {
    display: inline-block; /* Display menu items inline */
    margin: 0 15px; /* Spacing between menu items */
}

.main-nav ul li a {
    font-family: var(--header-font-family);
    font-size: var(--header-font-size);
    color: var(--header-text-color);
    text-transform: var(--header-text-transform);
    text-decoration: none;
    text-shadow: 0 0 3px #00ffff;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.main-nav ul li a:hover {
    color: #00e0e0;
    text-shadow: 0 0 5px #00e0e0, 0 0 10px #00e0e0;
}

.main-nav ul li.selected > a {
    background-color: transparent; /* Override white background */
    color: #00e0e0; /* Active neon color */
    text-shadow: 0 0 5px #00e0e0, 0 0 10px #00e0e0; /* Stronger neon glow for active */
}

.mobile-menu-icon {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1003; /* Increased z-index to be above the overlay */
    color: #00ffff;
    font-size: 2em;
    cursor: pointer;
}

body .header.scrolled { /* Increased specificity */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* --- Mobile & Scrolled Menu Logic --- */

/* On small screens, ALWAYS hide the nav and show the icon */
@media (max-width: 767px) {
    .header .main-nav {
        display: none;
    }
    .mobile-menu-icon {
        display: block;
    }

    body { font-size: 0.9em; } /* Smaller base font size for mobile */
    h1 { font-size: 2em; }
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.6em; }
    h4 { font-size: 1.4em; }
    h5 { font-size: 1.2em; }
    h6 { font-size: 1em; }
    .section-title { font-size: 1.8em; }
}

/* On large screens, hide the nav and show the icon ONLY when scrolled */
@media (min-width: 768px) {
    .header.scrolled .main-nav {
        display: none;
    }
    .header.scrolled .mobile-menu-icon {
        display: block;
    }
}

/* Styles for the active (visible) mobile menu */
.header .main-nav.active { /* Increased specificity */
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 13, 0.95); /* Dark, semi-transparent background */
    z-index: 1002; /* Ensure it's above everything else */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.main-nav.active ul {
    text-align: center;
}

.main-nav.active ul li {
    display: block; /* Stack menu items vertically */
    margin: 20px 0;
}

.main-nav.active ul li a {
    font-size: 2em; /* Larger font size for mobile menu */
}

/* --- Content Block Styles --- */
.content-block {
    padding: 1rem;
    background-color: #0f0f12; /* Slightly different dark shade for contrast */
    border-top: 1px solid #222;
}

@media (max-width: 760px){
    #about {
        padding-top: 10rem ;
    }
    .content-block {
        padding: 1rem;
    }
    .module-row .content-block {
        flex: 1 1 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

.content-column {
    margin: 0 auto; /* Center the column */
}

.l-box {
    padding: 1em;
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 1.5rem;
    color: var(--heading-color);
    text-shadow: 0 0 5px var(--heading-color);
}
/*footer*/
.footer {
    background-color: #0f0f12;
    border-top: 1px solid #222;
}
/*Blog page styles*/
.e-content{
padding: 4rem;
  max-width: 1200px;
  margin: auto;
  margin-top: 2rem;
}

/*Виджет blog posts*/
  /* Контейнер для сетки плиток */
.blog-grid-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* <-- Магия здесь */
  gap: 20px; /* Расстояние между плитками */
}

/* Стили самой плитки */
.tile {
  border: 1px solid #00ffff;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.7);
  overflow: hidden; /* Чтобы скругленные углы обрезали картинку */
}

.tile img {
  display: block;
  width: 100%;
  height: auto;
}

.tile-content {
  padding: 20px;
}

.tile-content h3 {
  margin-top: 0;
  color:var(--heading-color);
}