/* ===================================
   op-4.css - All About Pizza
   CSS3 Styling
   Shirmenbaatar / 120222199
=================================== */

/* ---- Google Fonts Import ---- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Lato:wght@300;400;700&display=swap');

/* ---- CSS Variables ---- */
:root {
    --red:       #c0392b;
    --red-dark:  #922b21;
    --orange:    #e67e22;
    --yellow:    #f39c12;
    --cream:     #fdf6ec;
    --brown:     #6e3b1f;
    --light:     #fff8f0;
    --shadow:    rgba(0, 0, 0, 0.15);
}

/* ---- Reset & Base ---- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--cream);
    background-image:
        radial-gradient(circle at 20% 20%, rgba(230,126,34,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(192,57,43,0.07) 0%, transparent 50%);
    color: #333;
    line-height: 1.7;
}

/* ---- Header ---- */
header {
    background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 50%, var(--orange) 100%);
    color: #fff;
    padding: 50px 20px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
}

header::before {
    content: '';
    position: absolute;
    top: -40px; left: -40px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

header::after {
    content: '';
    position: absolute;
    bottom: -60px; right: -30px;
    width: 250px; height: 250px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    letter-spacing: 2px;
    text-shadow: 3px 3px 8px rgba(0,0,0,0.3);
    animation: fadeDown 0.8s ease both;
}

/* ---- Navigation ---- */
nav {
    background: var(--brown);
    padding: 20px 30px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}

nav h2 {
    font-family: 'Playfair Display', serif;
    color: var(--yellow);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

nav ul li a {
    display: inline-block;
    color: #ffe0b2;
    text-decoration: none;
    padding: 6px 16px;
    border: 1px solid rgba(255,224,178,0.3);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

nav ul li a:hover {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(230,126,34,0.4);
}

/* ---- Audio Player ---- */
audio {
    display: block;
    margin: 20px auto;
    border-radius: 30px;
    box-shadow: 0 4px 15px var(--shadow);
    width: 90%;
    max-width: 500px;
}

/* ---- Sections ---- */
section {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    animation: fadeUp 0.6s ease both;
}

/* ---- Article Cards ---- */
article {
    background: #fff;
    border-radius: 16px;
    padding: 35px 40px;
    box-shadow: 0 6px 25px var(--shadow);
    border-left: 5px solid var(--red);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

article::before {
    content: '🍕';
    position: absolute;
    top: 15px; right: 20px;
    font-size: 1.8rem;
    opacity: 0.15;
    transform: rotate(15deg);
}

article:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}

/* ---- Headings inside articles ---- */
article h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    color: var(--red-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px dashed rgba(192,57,43,0.2);
}

/* ---- Paragraphs ---- */
article p {
    color: #555;
    font-size: 1rem;
    margin-top: 10px;
}

/* ---- Lists ---- */
article ul,
article ol {
    padding-left: 25px;
    margin-top: 10px;
}

article ul li,
article ol li {
    padding: 5px 0;
    color: #555;
    font-size: 0.98rem;
}

article ul li::marker { color: var(--orange); }
article ol li::marker { color: var(--red);    font-weight: bold; }

/* ---- Images ---- */
article img {
    display: block;
    max-width: 100%;
    width: 320px;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 6px 20px var(--shadow);
    border: 3px solid var(--cream);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

article img:hover {
    transform: scale(1.03) rotate(-1deg);
    box-shadow: 0 10px 30px rgba(192,57,43,0.2);
}

/* ---- Table ---- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow);
}

table th {
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: #fff;
    padding: 12px 20px;
    font-family: 'Playfair Display', serif;
    letter-spacing: 1px;
    text-align: left;
}

table td {
    padding: 11px 20px;
    border-bottom: 1px solid #f0e0d0;
    color: #555;
    font-size: 0.95rem;
}

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

table tr:nth-child(even) td {
    background: #fff8f2;
}

table tr:hover td {
    background: #fdebd0;
    transition: background 0.25s;
}

/* ---- Links ---- */
article a {
    color: var(--red);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

article a:hover {
    border-bottom-color: var(--orange);
}

/* ---- Footer ---- */
footer {
    background: linear-gradient(135deg, var(--red-dark), var(--brown));
    color: #ffe0b2;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

footer a {
    display: inline-block;
    margin-top: 10px;
    color: var(--yellow);
    text-decoration: none;
    font-weight: 700;
    padding: 8px 20px;
    border: 2px solid var(--yellow);
    border-radius: 25px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

footer a:hover {
    background: var(--yellow);
    color: var(--brown);
    transform: scale(1.05);
}

/* ---- Animations ---- */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    header h1  { font-size: 2rem; }
    article    { padding: 25px 20px; }
    nav ul     { flex-direction: column; }
    nav ul li a { display: block; }
}
