/* style.css */

/* --- Betűtípusok és Alap Színek --- */
:root {
    --primary-font: 'Roboto', sans-serif;
    --headline-font: 'Playfair Display', serif; /* A főoldali címekhez, mint a New York Times */

    --text-color: #333; /* Sötét szövegszín */
    --light-text-color: #f0f0f0; /* Világos szövegszín sötét háttéren */
    --background-color: #f8f8f8; /* Világos háttér */
    --header-footer-bg: #1a1a1a; /* Sötét szürke fejléc és lábléc */
    --accent-color: #D4AF37; /* Arany szín a luxus érzetért */
    --button-bg: #007bff; /* Kék gomb háttér */
    --button-hover-bg: #0056b3; /* Sötétebb kék gomb hoverre */
}

/* --- Alapvető Reset és Dobozmodell --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--primary-font);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased; /* Szebb betűmegjelenítés */
    text-rendering: optimizeLegibility; /* Jobb olvashatóság */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Fejléc (Header) Stílusok --- */
header {
    background-color: var(--header-footer-bg);
    color: var(--light-text-color);
    padding: 1.5rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

header h1 {
    font-family: var(--headline-font);
    font-size: 3.8rem;
    font-weight: 700;
    margin: 0;
    padding: 0.5rem 0;
    letter-spacing: 3px;
    color: var(--accent-color); /* Arany címszín */
    text-shadow: 2px 2px 5px rgba(0,0,0,0.7); /* Mélyebb árnyék */
}

header p {
    font-size: 1.2rem;
    margin-top: 5px;
    color: rgba(255,255,255,0.8);
}

/* --- Navigáció (Nav) Stílusok --- */
nav {
    margin-top: 20px;
}

nav button {
    background-color: var(--accent-color); /* Arany színű gombok */
    color: var(--header-footer-bg); /* Sötét szöveg az arany gombokon */
    padding: 10px 20px;
    margin: 0 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.0rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

nav button:hover {
    background-color: #bfa02b; /* Kézzel sötétített arany */
    transform: translateY(-2px); /* Enyhe felemelkedés */
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* --- Fő tartalom (Main) Stílusok --- */
main {
    padding: 0 0 40px 0;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 10px;
    margin: 0 auto 30px auto;
}

/* Hero szekció */
.hero {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 30px 80px 30px;
    background: linear-gradient(135deg, #eee, #f5f5f5);
    border-radius: 10px;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.05);
}

.hero h2 {
    font-family: var(--headline-font);
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 30px auto;
    line-height: 1.7;
    color: #555;
}

.hero button {
    background-color: var(--button-bg);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

.hero button:hover {
    background-color: var(--button-hover-bg);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

/* Árfolyam szekció */
.stock-prices-section {
    margin-bottom: 0;
    padding: 10px 0;
    background-color: #fefefe;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Az Árfolyam szekció h3 címsorának elrejtése */
.stock-prices-section h3 {
    display: none;
}

#stock-prices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    padding: 0 20px;
    justify-content: center;
}

/* Stílusok a JavaScript által generált stock-item elemeknek */
.stock-item {
    padding: 8px 12px;
    border-radius: 6px;
    background-color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95em;
    font-family: var(--primary-font);
    transition: transform 0.2s ease;
    border: 1px solid #eee;
}

.stock-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* Az egyes részek arányai maradhatnak így, vagy finomíthatók */
.stock-item .symbol {
    font-weight: bold;
    color: #333;
    flex-basis: 30%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stock-item .price {
    color: #555;
    flex-basis: 40%;
    text-align: right;
    font-weight: 500;
}

.stock-item .change {
    flex-basis: 30%;
    text-align: right;
    font-weight: bold;
}

.stock-item .positive {
    color: #28a745; /* Zöld szín emelkedéshez */
}

.stock-item .negative {
    color: #dc3545; /* Piros szín eséshez */
}

/* Hibaüzenet stílusa */
.stock-item.error {
    color: #dc3545;
    background-color: #ffebe6;
    border: 1px solid #dc3545;
    padding: 8px 12px;
    text-align: center;
    grid-column: 1 / -1;
    font-size: 0.9em;
}

/* ÚJ API LIMIT HIBÁS ÜZENET STÍLUSA */
.stock-item.error.api-limit {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

/* ÚJ loading üzenet stílusa */
.stock-item.loading {
    color: #6c757d;
    text-align: center;
    grid-column: 1 / -1;
    font-size: 1em;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 6px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}

/* ÚJ SZABÁLY: elrejti a konténert, ha a JavaScript üresként jelöli meg */
#stock-prices.hide-if-empty {
    display: none;
}

/* --- ÁLTALÁNOS KÉP STÍLUSOK --- */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

figure {
    margin: 20px 0;
    text-align: center;
}

figcaption {
    font-style: italic;
    color: #666;
    margin-top: 5px;
}

/* --- KÉP STÍLUSOK A CIKK OLDALAKHOZ (pl. fashion-luxury-travel-hotels.html) --- */
.page-content figure img {
    max-width: 100%; /* Módosítottam 50%-ról 100%-ra, hogy mobilnézetben is jól nézzen ki. */
    height: auto;
    display: block;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.page-content figure figcaption {
    font-style: italic;
    font-size: 0.9em;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
}

/* --- KIEMELT CIKK SZEKCIÓ (index.html) --- */
.featured-article {
    margin-bottom: 60px;
    padding: 40px 0;
    text-align: center;
    background-color: #fefefe;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.featured-article .article-preview {
    display: flex;
    flex-direction: column; /* Alapértelmezett: egymás alatt mobilra */
    align-items: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.featured-article .preview-content {
    flex-grow: 1;
    text-align: center; /* Alapértelmezett, kisebb képernyőkön */
}

.featured-article .preview-content h3 {
    font-family: var(--headline-font);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.featured-article .preview-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 30px;
}

.featured-article .read-more-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--header-footer-bg);
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.featured-article .read-more-button:hover {
    background-color: #bfa02b;
    transform: translateY(-2px);
}

/* Rólunk szekció */
.about-us, .call-to-action {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 30px;
    background-color: #fefefe;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.about-us h3, .call-to-action h3 {
    font-family: var(--headline-font);
    font-size: 2.2rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.about-us p, .call-to-action p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 20px auto;
    color: #555;
}

/* Lábélc (Footer) Stílusok */
footer {
    background-color: var(--header-footer-bg);
    color: var(--light-text-color);
    text-align: center;
    padding: 2rem 0;
    margin-top: 50px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

footer p {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: rgba(255,255,255,0.7);
}

/* --- Reszponzív Design (Kisebb képernyőkhöz) --- */

/* Szabályok 769px feletti képernyőkre (asztali és nagyobb tabletek) */
@media (min-width: 769px) {
    .featured-article .article-preview {
        flex-direction: row; /* Kép balra, szöveg jobbra */
        text-align: left;
        align-items: flex-start;
    }

    .featured-article .preview-content {
        text-align: left;
    }

    /* Az Albor beharangozó esetén megfordítjuk az elrendezést nagyobb képernyőn */
    .featured-article:nth-of-type(3) .article-preview { /* Albor: a 3. section */
        flex-direction: row-reverse; /* Megfordítjuk az Albor elrendezését */
    }
    .featured-article:nth-of-type(4) .article-preview { /* Kenya: a 4. section */
        flex-direction: row; /* Visszafordítjuk a Kenya elrendezését */
    }
}

/* Szabályok maximum 768px széles képernyőkre (tabletek és telefonok) */
@media (max-width: 768px) {
    .container {
        padding: 0 15px; /* Kisebb belső térköz a széleken mobilra */
    }

    header h1 {
        font-size: 2.8rem;
        letter-spacing: 1px;
    }

    header p {
        font-size: 1rem;
    }

    nav button {
        margin: 5px 5px;
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .hero h2 {
        font-size: 2.4rem;
    }

    .hero p {
        font-size: 1rem;
        max-width: 90%; /* Kisebb max-width mobilra */
    }

    .hero button {
        padding: 12px 25px;
        font-size: 1.1rem;
    }

    .stock-prices-section h3, .about-us h3, .call-to-action h3 {
        font-size: 1.8rem;
    }

    #stock-prices {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* Még kisebb minmax mobilra */
        gap: 10px; /* Még kisebb rés */
        padding: 0 10px; /* Kisebb padding */
    }

    .stock-item {
        font-size: 0.85em; /* Kicsit kisebb betűméret az árfolyamoknál mobilra */
        padding: 6px 10px;
    }

    main {
        margin: 15px auto;
        padding: 15px 0;
    }

    /* Reszponzív szabályok a featured-article számára 768px alatt */
    .featured-article {
        padding: 20px;
    }
    .featured-article .preview-content h3 {
        font-size: 2rem;
    }
    .featured-article .preview-content p {
        font-size: 1rem;
    }
    .featured-article .read-more-button {
        padding: 10px 20px;
        font-size: 1rem;
    }

    /* Képek a cikk oldalakon (pl. fashion-luxury-travel-hotels.html) */
    .page-content figure img {
        max-width: 90%; /* Kicsit kisebb max-width mobilra, ha a 100% még mindig sok */
    }

    /* Kiemelt cikkek képeinek optimalizálása */
    .featured-article .article-preview img {
        width: 100%; /* Kitölti a szülő konténer szélességét */
        height: auto; /* Fenntartja az arányokat */
        max-width: 450px; /* Ne legyen túl széles még 100% mellett sem, ha a konténer is szűkebb */
        margin-bottom: 20px; /* Egy kis hely a kép alatt */
    }

    /* Ha a cikkbehazangozók is túl nagynak tűnnek, itt kell csökkenteni a margin/padding-et vagy a betűméretet */
    .featured-article .preview-content h3 {
        font-size: 1.8rem; /* Kisebb címsor méret */
    }
    .featured-article .preview-content p {
        font-size: 1rem; /* Kisebb szöveg méret */
    }
}

/* Szabályok maximum 480px széles képernyőkre (nagyon kis telefonok) */
@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 0.9rem;
    }

    nav button {
        display: block; /* Gombok egymás alatt */
        width: 90%; /* Majdnem teljes szélesség */
        margin: 5px auto; /* Középre igazítás */
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 0.9rem;
        padding: 0 10px; /* Kicsit több padding a szövegnek */
    }

    .hero button {
        padding: 10px 20px;
        font-size: 1rem;
    }

    /* Reszponzív szabályok a featured-article számára 480px alatt */
    .featured-article .preview-content h3 {
        font-size: 1.8rem;
    }

    /* Árfolyam szekció nagyon kis képernyőn */
    #stock-prices {
        grid-template-columns: 1fr; /* Egy oszlopba rendeződés */
        padding: 0 15px; /* Kisebb padding */
    }
    .stock-item {
        font-size: 0.9em; /* Nagyobb betűméret, ha csak egy oszlop van */
    }

    /* Kiemelt cikkek képeinek még további optimalizálása nagyon kis képernyőre */
    .featured-article .article-preview img {
        max-width: 300px; /* Még kisebb maximális szélesség */
    }
}