/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f6f9;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   HEADER
   ============================================ */
header {
    background: linear-gradient(135deg, #6c3483, #2980b9);
    color: white;
    text-align: center;
    padding: 50px 20px;
}

header h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

header p {
    font-size: 16px;
    opacity: 0.85;
}

/* ============================================
   MAIN
   ============================================ */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 40px 20px;
}

/* UVOD */
.uvod {
    background: white;
    border-left: 5px solid #6c3483;
    padding: 20px 24px;
    border-radius: 8px;
    margin-bottom: 35px;
    font-size: 15px;
    line-height: 1.7;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    color: #555;
}

.uvod strong {
    color: #6c3483;
}

/* ============================================
   CSS GRID - KARTICE
   ============================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

/* ============================================
   KARTICA
   ============================================ */
.kartica {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    border-top: 4px solid #2980b9;
    transition: box-shadow 0.3s;
}

.kartica:hover {
    box-shadow: 0 6px 25px rgba(0,0,0,0.12);
}

.kartica.istaknuta {
    border-top-color: #e74c3c;
}

.kartica h2 {
    font-size: 17px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.opis-tekst {
    font-size: 13px;
    color: #777;
    line-height: 1.6;
    margin-bottom: 14px;
    flex: 1;
}

/* KOD BLOK */
.kod {
    background: #1e1e2e;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 16px;
    overflow-x: auto;
}

.kod code {
    color: #a9dc76;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

/* DEMO PROSTOR */
.demo-prostor {
    background: #f0f3f8;
    border-radius: 8px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
}

/* BOX - ELEMENT NA KOJEM SE PRIKAZUJE TRANSFORM */
.box {
    width: 75px;
    height: 75px;
    background: linear-gradient(135deg, #2980b9, #6c3483);
    color: white;
    font-weight: bold;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.4s ease;
    user-select: none;
}

.hint {
    font-size: 12px;
    color: #aaa;
    text-align: center;
}

/* ============================================
   2D TRANSFORMACIJE - HOVER EFEKTI
   ============================================ */

/* 1. translate */
.translate:hover {
    transform: translate(40px, 20px);
}

/* 2. translateX */
.translateX:hover {
    transform: translateX(60px);
}

/* 3. translateY */
.translateY:hover {
    transform: translateY(-40px);
}

/* 4. rotate */
.rotate:hover {
    transform: rotate(45deg);
}

/* 5. scale */
.scale:hover {
    transform: scale(1.5);
}

/* 6. scaleX */
.scaleX:hover {
    transform: scaleX(2);
}

/* 7. scaleY */
.scaleY:hover {
    transform: scaleY(2);
}

/* 8. skew */
.skew:hover {
    transform: skew(20deg, 10deg);
}

/* 9. skewX */
.skewX:hover {
    transform: skewX(25deg);
}

/* 10. skewY */
.skewY:hover {
    transform: skewY(20deg);
}

/* 11. matrix */
.matrix:hover {
    transform: matrix(1, 0.3, -0.3, 1, 30, 10);
}

/* 12. kombinacija */
.kombinacija:hover {
    transform: rotate(15deg) scale(1.2) translateX(20px);
}

/* Istaknuta kartica - drugačija boja boxa */
.istaknuta .box {
    background: linear-gradient(135deg, #e74c3c, #f39c12);
}

/* ============================================
   RESPONZIVNOST
   ============================================ */
@media (max-width: 768px) {
    header h1 { font-size: 26px; }
    .grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
}

@media (max-width: 480px) {
    header h1 { font-size: 22px; }
    main { padding: 20px 14px; }
    .grid { grid-template-columns: 1fr; }
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: #2c3e50;
    color: #666;
    text-align: center;
    padding: 20px;
    font-size: 13px;
}
