/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
}

/* Header styles */
header {
    background-color: #1a237e;
    color: white;
    text-align: center;
    padding: 2rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Main content styles */
p {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    text-align: left;
    font-size: 1.1rem;
    color: #424242;
}

ol {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    text-align: left;
    font-size: 1.1rem;
    color: #424242;
}

ul {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    text-align: left;
    font-size: 1.1rem;
    color: #424242;
}

.container {
    display: flex;
    align-items: start;  /* aligns items to top of container */
    gap: 20px;          /* space between image and text */
    padding: 20px;
    max-width: 1200px;  /* optional: prevents container from getting too wide */
    margin: 0 auto;     /* optional: centers the container */
}

.left-image {
    width: 40%;        /* adjust this value to control image width */
    height: auto;      /* maintains aspect ratio */
}

.

.right-text {
    flex: 1;          /* takes up remaining space */
}


/* Make it responsive for mobile */
@media (max-width: 768px) {
    .container {
        flex-direction: column;  /* stacks items vertically on mobile */
    }
    
    .left-image {
        width: 100%;  /* full width on mobile */
    }
}

/* Image grid styles - modified for strict 3x3 layout */
.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Always 3 columns */
    gap: 1.5rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    aspect-ratio: 1 / 1; /* Makes the grid square */
}

.image-grid a {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 1 / 1; /* Makes each cell square */
}

.image-grid a:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.image-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.image-grid a:hover img {
    transform: scale(1.05);
}

/* Responsive design - modified to maintain 3x3 grid */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    p {
        font-size: 1rem;
    }

    .image-grid {
        padding: 1rem;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1.5rem 0;
    }

    .image-grid {
        padding: 0.5rem;
        gap: 0.5rem;
    }
}

/* Embedded webpage styles */
.embedded-webpage {
    margin: 2rem 0;
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.embedded-webpage iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Video grid styles */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Creates 2 columns */
    gap: 2rem;
    margin: 2rem 0;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Home link styles */
.home-link {
    text-align: center;
    margin: 3rem 0;
}

.home-link a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #1a237e;
    color: yellow;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.home-link a:hover {
    background-color: #283593;
}

/* Responsive design */
@media (max-width: 768px) {
    /* Stack videos vertically on smaller screens */
    .video-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .embedded-webpage {
        height: 300px;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0 15px;
    }
    
    header {
        padding: 1.5rem 0;
    }
}

/* Three column layout */
.three-column-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.column {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.column h2 {
    color: #1a237e;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.column p {
    margin: 0.5rem 0;
    padding: 0;
}

.column a {
    color: #1a237e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.column a:hover {
    color: #283593;
    text-decoration: underline;
}

/* Responsive design for three columns */
@media (max-width: 992px) {
    .three-column-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .three-column-container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
}