/* CSS FOR ABOUT */

body {
    background-image: url('../images/cardboards/indian-fabric.jpg');
    background-size: cover;
    background-attachment: fixed;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.container{
    width: 100%;
    min-height: 100vh; /* Changed from height to min-height */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(10, minmax(8vh, auto)); /* Use minmax for flexibility */
    gap: 1vh; /* Scale with viewport */
    padding: 1vh;
    box-sizing: border-box;
}

.title{
    grid-row: 1/2;
    grid-column: 1 / 3;
    background-image: url(../images/cardboards/52.png);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    display: flex; /* Added for centering */
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%; /* Fill the grid cell */
    font-size: clamp(1.2rem, 3vw, 2rem); /* Responsive font size */
    font-weight: bold;
}

.me1{
    grid-row: 2/6;
    grid-column: 1 / 2;
    background-image: url(../images/cards/queen_hearts_black.jpeg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    
    border-radius: 20px;
    border: 3px dashed black; 
    padding: 1vh;
    font-weight: bolder;
    color: black;
    overflow-y: auto; /* Allow scrolling if content overflows */
    font-size: clamp(0.75rem, 1.5vw, 1rem);
}

.me1 p{
    background-image: url(../images/cardboards/95.jpg);
    background-size: cover;
    border: 2px dashed white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 0.8vh;
    margin: 0.5vh 0;
}

.me2{
    grid-row: 4/8;
    grid-column: 2 / 3;
    background-image: url(../images/cards/2S.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    
    border-radius: 20px;
    border: 3px dashed black; 
    padding: 1vh;
    font-weight: bold;
    color: black;
    overflow-y: auto;
    font-size: clamp(0.75rem, 1.5vw, 1rem);
}

.me2 p{
    background-image: url('../images/cardboard.jpg');
    background-size: cover;
    border: 2px dashed darkred;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 0.8vh;
    margin: 0.5vh 0;
}

.swans{
    grid-row: 2 / 4;
    grid-column: 2 / 3;
    border: 5px dashed white;
    border-radius: 10px;
    background-image: url('../images/swans.png');
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.swans:hover{
    transform: scale(1.02);
}

.liz{
    grid-row: 8 / 10;
    grid-column: 2 / 3;
    border: 5px dashed black;
    border-radius: 10px;
    background-image: url('../images/liz.webp');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    background-color: white;
    transition: transform 0.2s ease;
}

.liz:hover{
    transform: scale(1.02);
}

.me3{
    grid-row: 6/10;
    grid-column: 1 / 2;
    background-image: url(../images/cards/10D.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    
    border-radius: 20px;
    border: 3px dashed black; 
    padding: 1vh;
    font-weight: bold;
    color: black;
    overflow-y: auto;
    font-size: clamp(0.75rem, 1.5vw, 1rem);
}

.me3 p{
    background-image: url('../images/cardboards/95.jpg');
    background-size: cover;
    border: 2px dashed darkred;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 0.8vh;
    margin: 0.5vh 0;
}

.text-with-image {
    display: flex;
    align-items: center;
    gap: 0.5vh;
    padding: 0.5vh;
    justify-content: space-between;
    flex-wrap: nowrap; /* Keep items in one line */
}

/* Image on the left */
.text-with-image.left img {
    order: 0;   /* image first */
    border: 2px dashed black;
    border-radius: 10px;
}

/* Image on the right */
.text-with-image.right img {
    order: 1;   /* image last */
    border: 2px dashed black;
    border-radius: 10px;
}

/* Shared styling for images */
.text-with-image img {
    width: clamp(30px, 5vw, 50px); /* Responsive image size */
    height: clamp(30px, 5vw, 50px);
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    flex-shrink: 0; /* Prevent image from shrinking */
}

/* Paragraph inside text-with-image */
.text-with-image p {
    background-image: url('../images/cardboard.jpg');
    background-size: cover;
    border: 2px dashed darkred;
    border-radius: 10px;
    padding: 0.5vh 1vh;
    margin: 0;
    flex-grow: 1; /* Allow text to fill available space */
    font-size: clamp(0.7rem, 1.4vw, 0.95rem);
}

/* Mobile adjustments for very small screens */
@media screen and (max-width: 480px) {
    .container {
        gap: 0.8vh;
        padding: 0.8vh;
        grid-template-rows: repeat(10, minmax(7vh, auto));
    }
    
    .me1, .me2, .me3 {
        padding: 0.8vh;
        font-size: 0.7rem;
    }
    
    .me1 p, .me2 p, .me3 p {
        padding: 0.6vh;
    }
    
    .title {
        font-size: 1rem;
    }
    
    .text-with-image img {
        width: 25px;
        height: 25px;
    }
    
    .text-with-image p {
        font-size: 0.65rem;
        padding: 0.4vh 0.8vh;
    }
}

/* For when viewed as standalone page on larger screens */
@media screen and (min-width: 1200px) {
    .container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 2vh;
    }
    
    .me1, .me2, .me3 {
        font-size: 1rem;
    }
    
    .title {
        font-size: 2rem;
    }
}