/* General Styles for header, images, etc. */
header { 
    position: relative; 
    padding: 20px; 
    text-align: center; 
    background-color: #dbd0be;
}

h1 {
    font-size: 3.5vw;
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-weight: bold;
    margin: 20px 40px;
    padding: 10px;
}

/* Logo Styling */
.logoleft, .logoright { 
    position: absolute; 
    top: 0;
    width: 180px; 
    height: auto; 
}

.logoleft { left: 0; }
.logoright { right: 0; }

/* Navigation */
nav {
    background-color: #466792;
    padding: 10px 0;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

nav ul li {
    display: inline;
    margin: 0 50px;
}

nav ul li a {
    color: antiquewhite;
    text-decoration: none;
    font-size: 2vw; 
    text-transform: uppercase;  
    font-family: Georgia, 'Times New Roman', Times, serif; 
}

nav ul li a:hover { 
    text-decoration: underline;
}

body { 
    background-color: antiquewhite;
}

/* Image Rows */
.horses-image-row-top, .horses-image-row-btm, .consultancy-img-row, .books-img-row { 
    display: grid; 
    gap: 10px;
    position: relative;
}
.horses-image-row-top {
    padding: 20px 20px 5px 20px;
} 
.horses-image-row-btm {
    padding: 5px 20px 20px 20px;
}
.consultancy-img-row, .books-img-row {
    padding: 20px;
}
.horses-image-row-top {
    grid-template-columns: repeat(3, 1fr);
}

.horses-image-row-btm, .consultancy-img-row, .books-img-row {
    grid-template-columns: repeat(2, 1fr);
}

.horses-image-row-top img, .horses-image-row-btm img,
.consultancy-img-row img, .books-img-row img {
    border-radius: 5px;
    width: 100%;
    height: 350px;
    object-fit: cover;
}

/* Overlay h2 */
.horses-image-row-btm h2, .consultancy-img-row h2, .books-img-row h2 { 
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 36px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    background-color: rgba(70, 103, 146, 0.7);
    padding: 10px;
    text-transform: uppercase;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    font-style: italic;
    font-family: Georgia, 'Times New Roman', Times, serif;
}

/* Responsive Design for Small Devices (Mobile) */
@media (max-width: 768px) {
    /* Adjust header text size */
    h1 {
        font-size: 28px;
        margin: 15px 20px;
    }

    /* Stack logo images vertically */
    .logoleft, .logoright {
        position: relative;
        width: 150px;
        height: auto;
        margin-bottom: 10px;
    }

    /* Navigation links adjustments */
    nav ul li {
        display: block;
        margin: 10px 0;
    }

    nav ul li a {
        font-size: 18px;
        padding: 10px;
    }

    /* Stack images for smaller screens */
    .horses-image-row-top {
        grid-template-columns: 1fr; /* Stack images on top of each other */
    }

    .horses-image-row-btm {
        grid-template-columns: 1fr;
    }

    .consultancy-img-row, .books-img-row {
        grid-template-columns: 1fr; /* Stack images vertically */
    }

    /* Adjust font size for h2 */
    .horses-image-row-btm h2, .consultancy-img-row h2, .books-img-row h2 {
        font-size: 24px;
    }

    /* Adjust footer font size */
    footer {
        font-size: 12px;
    }
}

/* Responsive Design for Larger Devices (Tablets and Small Laptops) */
@media (max-width: 1024px) {
    /* Adjust header text size for medium screens */
    h1 {
        font-size: 30px;
        margin: 15px 30px;
    }

    .logoleft, .logoright {
        width: 160px;
        height: auto;
    }

    nav ul li {
        margin: 0 30px;
    }

    /* Keep images in two columns on medium screens */
    .horses-image-row-top {
        grid-template-columns: repeat(2, 1fr); /* Two columns for medium screens */
    }

    .horses-image-row-btm {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Adjust font size for h2 */
    .horses-image-row-btm h2, .consultancy-img-row h2, .books-img-row h2 {
        font-size: 28px;
    }
}