/* About Us Page Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
    background: radial-gradient(circle at 0% 0%,
            rgba(194, 219, 212, 0.6),
            rgba(239, 253, 234, 0.6));
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate {
    from {
        transform: rotate(-180deg);
        opacity: 0;
    }

    to {
        transform: rotate(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.about-section {
    text-align: center;
    padding: 0px 20px 60px 20px;
    animation: fadeIn 1s ease-out 0.3s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-title {
    font-size: 3rem;
    font-family: "HandyCasual", "Happy monkey", sans-serif;
    color: #5d8a8a;
    margin-bottom: 40px;
    font-weight: 800;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
    text-align: left;
}

.about-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #5cb85c;
    animation: expand 1s ease-out 0.5s both;
}

@keyframes expand {
    from {
        width: 0;
    }

    to {
        width: 60px;
    }
}

.about-text-container {
    max-width: 1400px;
    margin: 0 auto 40px;
    padding: 0 20px;
    background-color: #faf5f2;
    border-radius: 50px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    animation: slideUp 0.8s ease-out both;
    position: relative;
    overflow: hidden;
    
}

.about-text {
    max-width: 1200px;
    margin: 0 auto 30px;
    line-height: 1.8;
    font-size: 20px;
    color: #5d4b4b;
    animation: fadeIn 1s ease-out 0.6s both;
    font-family: 'GlacialIndifference-Bold', "Teachers", "Lexend", "Didact Gothic", Helvetica, sans-serif; 
    letter-spacing: 1px;
    font-size: 1.5rem;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Reduced min width for smaller cards */
    gap: 40px;
    margin-top: 60px;
    padding: 0 20px;
    justify-content: center;
    max-width: 1200px; /* Match about-text width for better fit/alignment */
    margin-left: auto; /* Center the grid */
    margin-right: auto;
}

.info-card {
    background: #faf5f2;
    border-radius: 40px;
    padding: 15px 20px; /* Reduced padding for compact size */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    animation: slideUp 0.8s ease-out both;
    position: relative;
    overflow: hidden;
    text-align: left;
    text-decoration: none;
    color: inherit;
    max-width: 600px;
    font-family: 'GlacialIndifference-Bold', "Teachers", "Lexend", "Didact Gothic", Helvetica, sans-serif; 
    letter-spacing: 1px;
    font-size: 1.5rem;
}

.info-card:nth-child(1) {
    animation-delay: 0.8s;
}

.info-card:nth-child(2) {
    animation-delay: 1s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #ff9a9e, #fecfef, #a18cd1, #fbc2eb);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.info-card:hover::before {
    transform: scaleX(1);
}

.card-content {
    display: flex;
    align-items: center;
    gap: 20px; /* Space between image and text */
}

.card-image {
    flex-shrink: 0;
    width: 200px; /* Reduced width for smaller images/cards */
    height: auto;
}

.card-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

.card-title {
    font-size: 24px;
    color: #5d4b4b;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
    font-family: "HandyCasual", "Happy monkey", sans-serif;
}

.card-text {
    color: #5d4b4b;
    line-height: 1.6;
    font-size: 1.5rem;
    text-align: left;
    flex: 1;
}

/* Animation for the floating feeling */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Tablet (smaller desktops / large tablets) */
@media (max-width: 1200px) {
    .about-section {
        padding: 40px 16px 50px 16px;
    }

    .about-title {
        font-size: 2.4rem; /* scale down slightly */
        margin-bottom: 28px;
    }

    .about-text-container {
        padding: 32px 24px;
    }

    .about-text {
        font-size: 1.25rem;
    }

    .info-cards {
        gap: 32px;
    }

    .card-image {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .about-title {
        font-size: 2.25rem; /* ~36px */
        margin-bottom: 28px;
        text-align: center;
        display: block;
    }
    .about-title::after { width: 40px; }

    .about-text {
        font-size: 1.15rem;
        line-height: 1.6;
    }

    .info-cards {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 0 16px;
    }

    .info-card {
        padding: 14px 18px;
        border-radius: 30px;
        font-size: 1.25rem;
    }

    .card-content {
        flex-direction: column; /* Stack on mobile if needed */
        align-items: flex-start;
        gap: 16px;
    }

    .card-image {
        width: 160px;
        margin: 0 auto 20px; /* Center image on mobile */
    }

    .card-title {
        font-size: 1.3rem;
        text-align: center;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .about-section {
        padding: 30px 12px 40px 12px;
    }

    .about-title {
        font-size: 1.8rem; /* keep the same font family/colour, but smaller */
        margin-bottom: 16px;
        display: block;
        text-align: center;
    }
    .about-title::after { width: 32px; }

    .about-text-container {
        padding: 20px 16px;
        border-radius: 24px;
    }

    .about-text {
        font-size: 1rem;
        line-height: 1.6;
    }

    .info-cards {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 12px;
    }

    .info-card {
        padding: 12px 14px;
        border-radius: 24px;
        max-width: 100%;
        font-size: 1.15rem;
    }

    .card-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-image {
        width: 100%;
        max-width: 300px;
        margin: 0 auto 16px;
    }

    .card-title {
        font-size: 1.15rem;
    }

    .card-text {
        font-size: 1rem;
    }
}