/* ========== RESET & BASE STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    min-height: 100vh;
}

.main-title {
    text-align: center;
    color: #2c3e50;
    margin: 20px 0 40px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    font-size: 2.2em;
    border-left: 8px solid #3498db;
    border-right: 8px solid #3498db;
}

/* ========== EXERCISE CONTAINERS ========== */
.exercise-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
}

.exercise-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.exercise-container h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.exercise-container h3::before {
    content: "•";
    color: #e74c3c;
    font-size: 1.5em;
}

/* ========== EXERCISE 1: IMAGE HYPERLINK ========== */
.img-link {
    display: inline-block;
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

.img-link:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.4);
}

.exercise-image {
    width: 300px;
    height: auto;
    border: 3px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.img-link:hover .exercise-image {
    border-color: #3498db;
}

/* ========== EXERCISE 2: CUSTOMIZED ORDERED LIST ========== */
.custom-list {
    list-style: none;
    counter-reset: custom-counter;
    padding-left: 0;
    max-width: 600px;
    margin: 0 auto;
}

.custom-list li {
    counter-increment: custom-counter;
    padding: 15px 20px 15px 70px;
    margin: 10px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    position: relative;
    border-left: 5px solid #3498db;
    transition: all 0.3s ease;
}

.custom-list li:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transform: translateX(10px);
}

.custom-list li::before {
    content: counter(custom-counter);
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: #3498db;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}


/* ========== EXERCISE 3: MARGIN PARAGRAPH ========== */
.margin-text {
    margin-left: 70px;
    margin-right: 70px;
    background: #eef0ff;
    padding: 10px;
    border-left: 4px solid #6c63ff;
   
}
/* ========== EXERCISE 4: STYLED PARAGRAPH ========== */
.styled-p {
    color: #555;
    font-family: "Trebuchet MS", sans-serif;
    background: #e7ffe7;
    padding: 10px;
    border-left: 4px solid rgb(0, 32, 128);


}

.custom-h1::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.custom-p {
    color: #e84393;
    font-family: 'Courier New', Courier, monospace;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    font-size: 1.2em;
    border: 2px dashed #fd79a8;
    margin-top: 20px;
    line-height: 1.8;
}

/* ========== EXERCISE 5: FOUR-WINDOW FRAME ========== */
.frame {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 200px;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.window {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.window:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 25px rgba(0,0,0,0.3);
}

.top-left {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.top-right {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.bottom-left {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.bottom-right {
    background: linear-gradient(135deg, #f39c12 0%, #d35400 100%);
    color: white;
}



/* ========== EXERCISE 6 & 11 - Static Background Logo ==========  */
/* Note: HTML structure for T11 needed adjustment to display correctly */
.static-bg, .full-bg-logo {
    width: 100%;
    height: 250px; /* Define a fixed height for demonstration */
    
    background-image: url("bitmaps.png"); /* Requires 'bitmaps.png' image file */
    background-repeat: no-repeat;
    background-size: contain; /* fits the image proportionally */
    background-position: center;
    background-attachment: fixed; /* Makes the background static relative to viewport */
    
    border: 2px solid #ddd;
    margin-top: 10px;
}
/* ========== EXERCISE 7: STYLED H1 ========== */
.styled-h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 3em;
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.1);
    position: relative;
    border: 3px solid #764ba2;
    border-radius: 15px;
    overflow: hidden;
}

.styled-h1::after {
    content: "★";
    position: absolute;
    top: 10px;
    right: 20px;
    color: #f1c40f;
    font-size: 1.5em;
    animation: spin 4s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== EXERCISE 9: BREADCRUMB ========== */

.breadcrumb a {
    color: #6c63ff;
    text-decoration: none;
    font-weight: bold;
}
.breadcrumb span {
    color: #444;
}


/*  ========== EXERCISE 10 - MEDIA QUERIES  ==========*/

.responsive-box {
    border: 2px solid #333;
    padding: 12px;
    width: 60%;
    text-align: center;
    background: #eee;
    margin: 0 auto;
}

@media (min-width: 576px) {
    .responsive-box { background-color: #ff9b9b; }
}

@media (min-width: 768px) {
    .responsive-box { background-color: #627dff; color: white; }
}

@media (min-width: 992px) {
    .responsive-box { background-color: #fff395; color: #333; }
}
}


/* ========== EXERCISE 11: BITMAPS LOGO ========== */
.static-bg {
    width: 100%;              /* full width */
    height: auto;             /* auto height based on padding */
    padding-top: 40%;         /* gives responsive height */
    
    background-image: url("LOGO-BITMAPS.png");
    background-repeat: no-repeat;
    background-size: contain; /* fits the image proportionally */
    background-position: center;
    background-attachment: fixed;
    
    border: 2px solid #ddd;;
}

.logo-bg {
    width: 100%;
    height: 200px;

    background-image: url("LOGO-BITMAPS.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    background-attachment: fixed; /* THIS is the key */
    border: 2px solid #ddd;
    margin-top: 15px;
}
/* ========== EXERCISE 12: JOB TABLE ========== */
.job-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.job-table th {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 18px;
    text-align: left;
    font-weight: 600;
    font-size: 1.1em;
}

.job-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

.job-table tr:nth-child(even) {
    background: #f8f9fa;
}

.job-table tr:hover {
    background: #e3f2fd;
    transform: scale(1.005);
    transition: all 0.2s ease;
}

.table-title {
    text-align: center !important;
    font-size: 1.3em !important;
    letter-spacing: 1px;
}

.total-row {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%) !important;
    color: white;
    font-weight: bold;
}

/* ========== FOOTER ========== */
footer {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
    margin-top: 50px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    border-top: 5px solid #3498db;
}

footer p {
    margin: 10px 0;
    font-size: 1.1em;
}

/* ========== MEDIA QUERIES ========== */
/* Mobile (Red) */
@media (max-width: 767px) {
    .responsive-box {
        background: #e74c3c;
    }
    
    .frame {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 150px);
    }
    
    .margin-p {
        margin: 0 20px;
    }
    
    .bitmaps-text {
        font-size: 2.5em;
    }
    
    .custom-h1 {
        font-size: 2em;
    }
}

/* Tablet (Blue) */
@media (min-width: 768px) and (max-width: 991px) {
    .responsive-box {
        background: #3498db;
    }
    
    .bitmaps-text {
        font-size: 3em;
    }
    
    .custom-h1 {
        font-size: 2.4em;
    }
}

/* Desktop (Yellow) */
@media (min-width: 992px) {
    .responsive-box {
        background: #f1c40f;
    }
    
    body {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* ========== UTILITY CLASSES ========== */
.exercise-note {
    background: #fff9e6;
    border-left: 4px solid #f1c40f;
    padding: 12px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.code-snippet {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    margin: 15px 0;
    overflow-x: auto;
}

.success-badge {
    display: inline-block;
    background: #2ecc71;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    margin-left: 10px;
    font-weight: bold;
}