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

body {
    font-family: 'Roboto', sans-serif;
    background: #7e7676;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   HEADER
   ============================================ */
header {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.3;
}

header h1 {
    font-size: 42px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

header p {
    font-size: 18px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

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

/* UVOD */
.uvod {
    background: white;
    border-left: 5px solid  #4ecdc4;
    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: #4ecdc4;
}

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

/* ============================================
   KARTICA
   ============================================ */
.kartica {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    border: 1px solid #333;
    transition: all 0.3s ease;
}

.kartica:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.kartica.istaknuta {
    border-color: #ff6b6b;
}

.kartica h2 {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 12px;
}

.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: #ffffff;
    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-color: #4ecdc4;
    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, #a3c5db, #1a769b);
}

/* ============================================
   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: #8b97a3;
    color: #444242;
    text-align: center;
    padding: 20px;
    font-size: 13px;
}
