/* CSS Variables for colors and sizes */
:root {
    /* Colors */
    --bg-color: #ececf6;
    --box-bg: #ffffff;
    --button-color: #776ee3;
    --text-color: #212529;
    --link-color: #4283bd;
    --button-hover-color: #867cff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-color-hover: rgba(0, 0, 0, 0.2);
    /* Sizes */
    --logo-width: 150px;
    --card-img-width: 200px;
    --card-padding: 15px;
    --card-border-radius: 12px;
    --button-padding: 8px 70px;
    --button-border-radius: 6px;
    --header-margin-bottom: 40px;
    --guide-margin-bottom: 40px;
    --grid-gap: 25px;
    --font-size-h1: 1.8rem;
    --font-size-h2: 1.4rem;
    --font-size-h3: 1.2rem;
    --font-size-p: 0.9rem;
    --font-size-footer: 0.8rem;
    --font-size-h1-mobile: 1rem;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    direction: rtl;
}

body {
    font-family: "IRANSans", sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Header with logo and animation */
header {
    text-align: center;
    margin-bottom: var(--header-margin-bottom);
    animation: fadeIn 1s ease-out;
}

.logo {
    max-width: var(--logo-width);
    height: auto;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

h1 {
    font-size: var(--font-size-h1-mobile);
    color: var(--text-color);
    text-shadow: 1px 1px 2px var(--shadow-color);
}

/* Guide section with simple shadow and animation */
.guide {
    background-color: var(--box-bg);
    border-radius: var(--card-border-radius);
    padding: var(--card-padding);
    margin-bottom: var(--guide-margin-bottom);
    box-shadow: 0 4px 10px var(--shadow-color);
    max-width: 800px;
    width: 100%;
    animation: fadeIn 1.2s ease-out;
}

.guide h2 {
    font-size: var(--font-size-h2);
    margin-bottom: 15px;
    color: var(--text-color);
}

.guide p {
    margin-bottom: 10px;
    font-size: var(--font-size-p);
}

/* Links section using CSS Grid for easy expansion */
.links-section {
    display: grid;
    grid-template-columns: 1fr; /* Mobile-first: single column */
    gap: var(--grid-gap);
    max-width: 800px;
    width: 100%;
}

.link-card {
    background-color: var(--box-bg);
    border-radius: var(--card-border-radius);
    padding: var(--card-padding);
    text-align: center;
    box-shadow: 0 4px 10px var(--shadow-color);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.link-card:nth-child(1) {
    animation-delay: 0.2s;
}

.link-card:nth-child(2) {
    animation-delay: 0.4s;
}

.link-card:nth-child(3) {
    animation-delay: 0.6s;
}
/* Add more delays for additional cards */

.link-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 6px 15px var(--shadow-color-hover);
}

.link-card img {
    max-width: var(--card-img-width);
    height: auto;
    margin-bottom: 15px;
    border-radius: var(--card-border-radius);
}

.link-card h3 {
    font-size: var(--font-size-h3);
    margin-bottom: 10px;
    color: var(--link-color);
}

.link-card p {
    font-size: var(--font-size-p);
    margin-bottom: 15px;
}

.link-card a {
    display: inline-block;
    background: var(--button-color);
    color: #ffffff;
    padding: var(--button-padding);
    border-radius: var(--button-border-radius);
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.3s ease;
}

.link-card a:hover {
    background: var(--button-hover-color);
    transform: scale(1.05);
}

/* Keyframes for animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media queries for larger screens */
@media (min-width: 600px) {
    h1 {
        font-size: var(--font-size-h1);
    }

    .links-section {
        grid-template-columns: repeat(2, 1fr); /* Two columns on tablets */
    }
}

@media (min-width: 900px) {
    .links-section {
        grid-template-columns: repeat(3, 1fr); /* Three columns on desktops */
    }
}

/* Footer for minimalism */
footer {
    margin-top: 20px;
    padding: 20px 0;
    font-size: var(--font-size-footer);
    color: var(--text-color);
    animation: fadeIn 1.5s ease-out;
}
