/* Reset some basic styles for consistency across browsers */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes typewriter {
    from {
        width: 0; /* Start with no width */
    }
    to {
        width: 100%; /* Expand to full width */
    }
}

@keyframes blinkCursor {
    from, to {
        border-color: transparent;
    }
    100% {
        border-color: #007BFF; /* Cursor color */
    }
}

/* Main heading styling */
h1 {
    font-family: monospace; /* Use a monospace font for consistent character width */
    overflow: hidden; /* Hide overflow */
    white-space: nowrap; /* Keep text on one line */
    display: inline-block; /* For the typewriter effect */
    border-right: 2px solid #007BFF; /* Simulate the cursor */
    font-size: 2.5em; /* Adjust font size */
    color: #007BFF; /* Set text color */
    animation: 
        typewriter 4s steps(38, end) 1s infinite, /* Typing effect */
        blinkCursor 1s step-end 2s infinite; /* Blinking cursor */
    width: fit-content; /* Ensure the width matches the text content */
    max-width: 100%; /* Prevent the text from overflowing */
}


/* Body styling */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f7f7f7;
    color: #333;
    text-align: center;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Space out the header and the main content */
}

/* Logo styling */
.logo {
    width: 25%;
    height: auto;
    margin-bottom: 2%;
    min-width: 250px;  /* Prevent the logo from becoming too small */
}

/* Header container styling */
header {
    display: flex; /* Arrange logo and text horizontally */
    align-items: center; /* Vertically align logo and text */
    justify-content: center; /* Center content horizontally */
    flex-direction: column; /* Stack logo and heading vertically */
    margin-bottom: 1%; /* Adjust spacing below the header */
}


/* Widget container */
.widget-container {
    display: flex;
    justify-content: left; /* Center the widgets horizontally */
    align-items: left;
    flex-wrap: wrap;
    gap: 2%;
    padding: 0 1%; 
    flex-grow: 1; /* Allow the widget container to grow and take up remaining space */
    margin-top: 2%; /* Add some spacing between header and widgets */
    margin-bottom:2%; /* Add spacing at the bottom */
}

/* Widget styling */
.widget {
    display: inline-block;
    border: 2px solid #007BFF;
    border-radius: 10px;
    padding: 5%;
    width: 400px;
    height: 400px;
    background-color: #cbd6e0;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0; /* Ensure the widgets do not shrink */
    margin-bottom: 8%;
}

/* Widget hover effect */
.widget:hover {
    background-color: #007BFF;
    color: #fff;
    transform: scale(1.05);
}

/* Widget title styling */
.widget h3 {
    font-size: 1.5em;
    margin-bottom: 1%;
}

/* Widget description styling */
.widget p {
    font-size: 1em;
    color: #555;
}

/* Widget image styling */
.widget img {
    width: 80%;  /* Adjusted to ensure it fits well inside the widget */
    height: 80%; /* Maintain aspect ratio */
    max-width: 100%; /* Ensure it doesn't exceed the widget width */
    margin-bottom: 1%;
    border-radius: 1%;
    object-fit: contain; /* Ensures image fits inside the widget without being stretched */
}

/* Mobile-First Media Queries */
/* Mobile-First Media Queries */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    .logo {
        width: 40%;
    }

    .widget-container {
        flex-direction: column; /* Stack widgets vertically */
        padding: 0 5%;
    }

    .widget {
        width: 90%; /* Widgets take nearly full width */
        margin-bottom: 5%;
    }

    .widget img {
        width: 70%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8em;
    }

    .logo {
        width: 50%;
    }

    .widget h3 {
        font-size: 1.2em;
    }

    .widget p {
        font-size: 0.9em;
    }

    .widget img {
        width: 80%;
    }
}