/**
Theme Name: seismology
Author: Xkreativ.hu
Author URI: https://www.xkreativ.hu
Description: seismology.hu sablon
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: seismology
Template: astra
*/

.entry-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #d32f2f 0%, #d32f2f 10%, transparent 10%, transparent 12%, #d32f2f 12%, #d32f2f 15%, transparent 15%, transparent 18%, #d32f2f 18%, #d32f2f 25%, transparent 25%, transparent 28%, #d32f2f 28%, #d32f2f 100%);
    animation: seismic 2s ease-in-out infinite;
}

.highlight-info {
    padding: 1.5rem;
    padding-left: 1.5rem;
    border-left: 4px solid #c62828;
    background-color: #fff5f5;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(198, 40, 40, 0.12);
}

/* =========================================
   GLOBAL SITE DESIGN 
   ========================================= */

:root {
    --primary: #003366;
    --primary-light: #0055aa;
    --secondary: #e74c3c;
    --text-main: #2c3e50;
    --font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body,
button,
input,
select,
textarea,
.ast-container {
    font-family: var(--font-family);
    color: var(--text-main);
    line-height: 1.6;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6,
.entry-title {
    color: var(--primary);
    font-weight: 700;
}

h2 {
    margin-top: 12px;
}

/* --- Footer Design --- */
.site-footer {
    background-color: #222 !important;
    color: #aaa;
    border-top: 4px solid var(--primary);
}

.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4 {
    color: #fff;
}

/* --- Container Polish --- */
.ast-container {
    max-width: 1200px;
    margin: 0 auto;
}

.entry-title {
    display: table;
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

@keyframes seismic {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

body {
    border-top: 6px solid #003366;
}

/* --- Sticky Header --- */
.site-header {
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* =========================================
   NEWS SLIDESHOW (Swiper)
   ========================================= */

.news-slideshow-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.news-swiper {
    position: relative;
    padding-bottom: 60px;
}

.news-slide-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    padding: 20px 60px 40px;
    min-height: 180px;
}

.news-slide-image {
    flex-shrink: 0;
    width: 280px;
}

.news-slide-image img {
    width: 100%;
    height: auto;
    display: block;
}

.news-slide-text {
    flex: 1;
    min-width: 0;
}

.news-slide-title {
    margin: 0 0 20px;
    font-size: 28px;
    font-weight: 400;
    line-height: 1.4;
}

.news-slide-title a {
    color: #1e88e5;
    text-decoration: underline;
    transition: color 0.3s;
}

.news-slide-title a:hover {
    color: #1565c0;
}

.news-slide-excerpt {
    color: #424242;
    font-size: 18px;
    line-height: 1.6;
    font-weight: 300;
    padding-bottom: 10px;
}

/* Swiper nyilak */
.swiper-button-prev,
.swiper-button-next {
    color: #bdbdbd;
    width: 36px;
    height: 36px;
    transition: color 0.3s;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    color: #757575;
}

.swiper-button-prev {
    left: 10px;
}

.swiper-button-next {
    right: 10px;
}

.swiper-button-prev:after,
.swiper-button-next:after {
    font-size: 24px;
    font-weight: normal;
}

/* Pagination pontok */
.swiper-pagination {
    bottom: 15px !important;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #bdbdbd;
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: #1e88e5;
}

/* =========================================
   NAVIGATION — Hover aláhúzás
   ========================================= */

/* Fő menü linkek */
.main-header-menu > li > a.menu-link {
    position: relative;
    padding-bottom: 5px;
}

.main-header-menu > li > a.menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #1e88e5;
    transition: width 0.3s ease-in-out;
}

.main-header-menu > li:hover > a.menu-link::after {
    width: 100%;
}

/* Aktív oldal aláhúzás */
.main-header-menu > li.current-menu-item > a.menu-link::after,
.main-header-menu > li.current-menu-ancestor > a.menu-link::after {
    width: 100%;
}

/* Almenü linkek */
.main-header-menu .sub-menu li a.menu-link {
    position: relative;
    display: inline-block;
    padding-bottom: 3px;
}

.main-header-menu .sub-menu li a.menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #1e88e5;
    transition: width 0.3s ease-in-out;
}

.main-header-menu .sub-menu li:hover > a.menu-link::after {
    width: 100%;
}

.main-header-menu .sub-menu li.current-menu-item > a.menu-link::after {
    width: 100%;
}

/* =========================================
   NAVIGATION — Menü leírások + szélesség fix
   ========================================= */

@media only screen and (min-width: 922px) {

    /* Menü konténer: ne nyúljon szét */
    .main-header-menu {
        justify-content: flex-start !important;
        gap: 0 !important;
        width: auto !important;
        flex-grow: 0 !important;
    }

    /* Menüpontok: ne növekedjenek */
    .main-header-menu > .menu-item {
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
    }

    /* Menü linkek: leírás nélküliek is felülre */
    .main-header-menu > .menu-item > a {
        height: auto;
        flex-wrap: wrap;
        -webkit-flex-wrap: wrap;
        text-align: center;
        justify-content: center;
        -webkit-justify-content: center;
        align-content: flex-start;          /* JAVÍTVA: vertical align top */
        align-items: flex-start;            /* JAVÍTVA: vertical align top */
        line-height: 1.5;
        width: auto !important;
        min-width: unset !important;
    }

    /* Leírás stílus */
    .menu-item-description {
        color: #777;
        clear: both;
        font-size: 12px;
        flex: 0 0 100%;
        text-transform: none !important;
        letter-spacing: normal !important;
        font-weight: 400 !important;
    }
}

@media only screen and (max-width: 921px) {
    .menu-item-description {
        display: none;
    }
}

/* =========================================
   LAYOUT — Kétoszlopos (sidebar + content)
   ========================================= */

.ke-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.ke-sidebar {
    width: 30%;
    flex-shrink: 0;
    order: 2;
}

@media (min-width: 769px) {
    .ke-sidebar {
        padding-left: 30px;
    }
}

.ke-content {
     width: 70%;                                                      
      flex-grow: 1;
      order: 1;                                                        
      min-width: 0;
}

.ke-sidebar h3 {
    margin-top: 20px;
    color: #1a5ea8;
    background-color: #e8f0fa;
    border-bottom: 1px solid #1a5ea8;
    padding: 8px 12px;
}

@media (max-width: 768px) {
    .ke-layout {
        flex-direction: column;
    }
    .ke-sidebar,
    .ke-content {
        width: 100%;
    }
    .ke-sidebar {
        order: 2;
    }
    .ke-content {
        order: 1;
    }
}

/* =========================================
   PAGE-SPECIFIC
   ========================================= */

.page-id-74 .entry-content {
    margin-top: 20px;
}

 #primary {
      min-width: 0;                                                    
  }

/* =========================================
   RESPONSIVE EARTHQUAKE TABLES
   ========================================= */

.annual-eq-table-wrapper,
.entry-content .annual-eq-table-wrapper {
    overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      width: 100%;                                                     
      max-width: 100%;
      min-width: 0;                                                    
      margin-bottom: 30px; 
}

.annual-eq-table-inner {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #555;
    min-width: fit-content;
}

.annual-eq-table-wrapper table {
    min-width: 600px;
    width: 100%;
}

/* Scroll shadow – jobb szélen látható amíg van több tartalom */
.annual-eq-table-wrapper {
    background:
        linear-gradient(to right, #fff 20%, transparent),
        linear-gradient(to left,  #fff 20%, transparent) right,
        linear-gradient(to right, rgba(0,0,0,0.10), transparent) left,
        linear-gradient(to left,  rgba(0,0,0,0.10), transparent) right;
    background-size: 30px 100%, 30px 100%, 12px 100%, 12px 100%;
    background-repeat: no-repeat;
    background-attachment: local, local, scroll, scroll;
    background-color: #fff;
}

@media (max-width: 768px) {
    .eq-table-block::before,
    .eq-table-block::after {
        content: '→ görgess oldalra';
        display: block;
        text-align: center;
        font-size: 12px;
        color: #888;
        font-style: italic;
        padding: 4px 0;
        transition: opacity 0.4s;
    }
    .eq-table-block.scrolled::before,
    .eq-table-block.scrolled::after {
        opacity: 0;
    }
}
@media (min-width: 769px) {
    .eq-table-block::before,
    .eq-table-block::after { display: none; }
}

/* =========================================
   GALLERY
   ========================================= */

.gallery {
    display: grid;
    /* auto-fit: ha kevesebb item van, középre rendezi őket; 3 item esetén kitölti a sort */
    grid-template-columns: repeat(auto-fit, minmax(0, calc(33.333% - 7px)));
    gap: 10px;
    justify-content: center;
}

.gallery-item {
    min-width: 0;
    max-width: none !important;
    width: 100% !important;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   NEWS SLIDESHOW — MOBIL
   ========================================= */

@media (max-width: 768px) {
    .news-slide-content {
        flex-direction: column;
        gap: 20px;
        padding: 15px 50px 35px;
        min-height: 150px;
    }

    .news-slide-image {
        width: 100%;
    }

    .news-slide-title {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .news-slide-excerpt {
        font-size: 16px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 32px;
        height: 32px;
    }

    .swiper-button-prev:after,
    .swiper-button-next:after {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .news-slide-content {
        padding: 15px 40px 30px;
    }

    .news-slide-title {
        font-size: 20px;
    }

    .news-slide-excerpt {
        font-size: 15px;
    }

    .swiper-button-prev {
        left: 5px;
    }

    .swiper-button-next {
        right: 5px;
    }
}

/* =========================================
   UL LI DESIGN – tartalom felsorolások
   ========================================= */

.entry-content ul {
    list-style: none;
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.entry-content ul li {
    position: relative;
    padding-left: 0.5em;
    margin-bottom: 0.35em;
    line-height: 1.6;
}

.entry-content ul li::before {
    content: '▸';
    position: absolute;
    left: -1.1em;
    color: #d32f2f;
    font-size: 0.8em;
    top: 0.2em;
    line-height: 1;
}

/* Beágyazott lista – szürke vízszintes vonal */
.entry-content ul ul {
    margin-top: 0.3em;
    margin-bottom: 0.3em;
}

.entry-content ul ul li::before {
    content: '–';
    color: #999;
    font-size: 1em;
    top: 0;
}

/* Plugin UI listák kivétele (szeizmogram dátum-linkek stb.) */
.entry-content ul.seismo-prev-links li,
.entry-content .seismo-prev-links ul li {
    padding-left: 0;
    position: static;
    margin-bottom: 0;
}

.entry-content ul.seismo-prev-links li::before,
.entry-content .seismo-prev-links ul li::before {
    content: none;
}

/* =========================================
   TABLE-STACK – mobilon egymás alá kerülő cellák
   Elérhető osztályok:
     table-stack      – oszlopszélesség nincs meghatározva
     table-stack-50   – 2 oszlop, 50-50% desktopön
     table-stack-33   – 3 oszlop, ~33% desktopön
     table-stack-30   – 3 oszlop, ~33% desktopön (alias)
   Használat: WP szerkesztő → Blokk → Advanced → Additional CSS class
   ========================================= */

@media (max-width: 768px) {
    .table-stack,
    .table-stack thead,
    .table-stack tbody,
    .table-stack tr,
    .table-stack th,
    .table-stack td {
        display: block;
        width: 100% !important;
    }

    .table-stack thead {
        display: none;
    }

    .table-stack tr {
        margin-bottom: 12px;
        border: 1px solid #ccc;
        border-radius: 6px;
        overflow: hidden;
    }

    .table-stack td {
        padding: 8px 12px;
        border: none;
        border-bottom: 1px solid #eee;
        text-align: left !important;
    }

    .table-stack td:last-child {
        border-bottom: none;
    }

    .table-stack td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.75em;
        font-weight: 700;
        color: #888;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 2px;
    }
}

/* table-stack-50: 2 oszlop, 50-50% desktopön */
.table-stack-50 {
    table-layout: fixed;
    width: 100%;
}
.table-stack-50 th,
.table-stack-50 td {
    width: 50%;
    text-align: center;
    vertical-align: top;
}

/* table-stack-33 / table-stack-30: 3 oszlop, ~33% desktopön */
.table-stack-33,
.table-stack-30 {
    table-layout: fixed;
    width: 100%;
}
.table-stack-33 th,
.table-stack-33 td,
.table-stack-30 th,
.table-stack-30 td {
    width: 33.333%;
    text-align: center;
    vertical-align: top;
}

/* Mobilon mindkettő stackelődik, mint a table-stack */
@media (max-width: 768px) {
    .table-stack-50,
    .table-stack-50 thead,
    .table-stack-50 tbody,
    .table-stack-50 tr,
    .table-stack-50 th,
    .table-stack-50 td,
    .table-stack-33,
    .table-stack-33 thead,
    .table-stack-33 tbody,
    .table-stack-33 tr,
    .table-stack-33 th,
    .table-stack-33 td,
    .table-stack-30,
    .table-stack-30 thead,
    .table-stack-30 tbody,
    .table-stack-30 tr,
    .table-stack-30 th,
    .table-stack-30 td {
        display: block;
        width: 100% !important;
    }

    .table-stack-50 thead,
    .table-stack-33 thead,
    .table-stack-30 thead {
        display: none;
    }

    .table-stack-50 tr,
    .table-stack-33 tr,
    .table-stack-30 tr {
        margin-bottom: 12px;
        border: 1px solid #ccc;
        border-radius: 6px;
        overflow: hidden;
    }

    .table-stack-50 td,
    .table-stack-33 td,
    .table-stack-30 td {
        padding: 8px 12px;
        border: none;
        border-bottom: 1px solid #eee;
        text-align: left !important;
    }

    .table-stack-50 td:last-child,
    .table-stack-33 td:last-child,
    .table-stack-30 td:last-child {
        border-bottom: none;
    }

    .table-stack-50 td::before,
    .table-stack-33 td::before,
    .table-stack-30 td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.75em;
        font-weight: 700;
        color: #888;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 2px;
    }
}

/* =========================================
   RESPONSIVE WP CONTENT TABLES
   ========================================= */

.wp-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    margin-bottom: 1.5em;
}

.wp-table-wrap table {
    min-width: 400px;
    width: 100%;
    border-collapse: collapse;
}

/* Általános content táblák: nincs border */
.entry-content table,
.entry-content table th,
.entry-content table td,
.wp-table-wrap table,
.wp-table-wrap table th,
.wp-table-wrap table td,
.bulletin-grid,
.bulletin-grid th,
.bulletin-grid td,
.table-stack,
.table-stack th,
.table-stack td,
.table-stack-50,
.table-stack-50 th,
.table-stack-50 td,
.table-stack-33,
.table-stack-33 th,
.table-stack-33 td,
.table-stack-30,
.table-stack-30 th,
.table-stack-30 td {
    border: none;
}

/* =========================================
   BULLETIN GRID
   ========================================= */

.bulletin-grid {
    max-width: 860px;
    margin-left: 0;
    margin-right: auto;
}

/* =========================================
   NEW
   ========================================= */
.ast-below-header-bar {box-shadow: none;}
.site-header {
    position: relative;
    z-index: 100;
}
.site-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -30px;
    width: 100%;
    height: 30px;
    background: radial-gradient(ellipse at 50% 0%, rgba(0,0,0,0.18) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* =========================================
   Arrow weg 
   ========================================= */

@media only screen and (min-width: 922px) {
	.ast-icon.icon-arrow svg {display: none;}
}


/* Hide Hungarian-only header button on English pages (Polylang body class) */                                                     
body.lang-en .ast-builder-button-wrap {
      display: none !important;                                                 
  }