/* ============================================
   Home Page Styles
   ============================================ */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
    color: white;
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section > div:first-child {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    z-index: 1;
}

.hero-section .hero-pattern-overlay {
    width: 100%;
    height: 100%;
}

.hero-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 10;
}

.hero-content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.hero-text {
    text-align: center;
}

.hero-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.hero-text p:first-of-type {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    opacity: 0.95;
    line-height: 1.4;
}

.hero-text p:last-of-type {
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    opacity: 0.9;
    line-height: 1.6;
    font-weight: 400;
}

/* Hero Description - توضیحات هیرو */
.hero-description {
    font-size: 0.9rem;
    line-height: 1.9;
    opacity: 0.9;
    font-weight: 400;
    text-align: justify;
    margin: 0 0 1.5rem 0;
    color: rgba(255, 255, 255, 0.95);
    max-width: 100%;
}

.hero-cta-button {
    display: inline-block;
    background: white;
    color: #3b82f6;
    font-weight: 700;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-size: 1.125rem;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem;
}

.hero-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hero-stats > div {
    text-align: center;
    flex: 1;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.hero-stats > div > div:first-child {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.hero-stats > div > div:last-child {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 400;
}

.hero-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    order: -1;
}

.hero-image-wrapper > div {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.hero-image-wrapper > div > div {
    position: relative;
}

.hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
}

/* Emoji Rotations */
.emoji-rotate {
    transform-origin: center;
    display: inline-block;
}

.emoji-1 {
    animation: rotate 8s linear infinite;
    font-size: 3rem;
}

.emoji-2 {
    animation: rotateReverse 10s linear infinite;
    font-size: 3rem;
}

.emoji-3 {
    animation: rotate 12s linear infinite;
    font-size: 3rem;
}

.emoji-4 {
    animation: rotateReverse 9s linear infinite;
    font-size: 3rem;
}

.emoji-5 {
    animation: rotate 11s linear infinite;
    font-size: 2.5rem;
}

.emoji-6 {
    animation: rotateReverse 13s linear infinite;
    font-size: 2.5rem;
}

.emoji-7 {
    animation: rotate 7s linear infinite;
    font-size: 2.5rem;
}

.emoji-8 {
    animation: rotateReverse 14s linear infinite;
    font-size: 2.5rem;
}

/* Emoji Positions */
.emoji-position-1 {
    position: absolute;
    top: -2rem;
    right: 50%;
    transform: translateX(50%);
}

.emoji-position-2 {
    position: absolute;
    top: 50%;
    right: -2rem;
    transform: translateY(-50%);
}

.emoji-position-3 {
    position: absolute;
    bottom: -2rem;
    right: 50%;
    transform: translateX(50%);
}

.emoji-position-4 {
    position: absolute;
    top: 50%;
    left: -2rem;
    transform: translateY(-50%);
}

.emoji-position-5 {
    position: absolute;
    top: 20%;
    right: -1.5rem;
}

.emoji-position-6 {
    position: absolute;
    bottom: 20%;
    left: -1.5rem;
}

.emoji-position-7 {
    position: absolute;
    top: -1.5rem;
    right: 20%;
}

.emoji-position-8 {
    position: absolute;
    bottom: -1.5rem;
    left: 20%;
}

.hero-fallback {
    display: none;
    text-align: center;
    position: relative;
    padding: 3rem;
}

.hero-fallback > div:first-child {
    display: inline-block;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.hero-fallback > div:first-child > div {
    font-size: 6rem;
    opacity: 0.9;
}

.hero-fallback > div:nth-child(2) {
    position: absolute;
    top: -1rem;
    right: -1rem;
    font-size: 4rem;
    opacity: 0.5;
    animation: pulse 2s infinite;
}

.hero-fallback > div:nth-child(3) {
    position: absolute;
    bottom: -1rem;
    left: -1rem;
    font-size: 3rem;
    opacity: 0.4;
    animation: pulse 2s infinite 0.5s;
}

/* Animations */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateReverse {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.feature-short {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feature-full {
    display: none;
}

.feature-toggle-btn {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin-top: 0.5rem;
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s;
}

/* Levels Section - مقاطع تحصیلی */
.levels-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 50%, #faf5ff 100%);
}

.levels-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.levels-section .text-center {
    text-align: center;
    margin-bottom: 3rem;
}

.levels-section .mb-12 {
    margin-bottom: 3rem;
}

.levels-section .section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.levels-section .section-subtitle {
    font-size: 1.15rem;
    color: #64748b;
    font-weight: 400;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.levels-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 2rem !important;
    margin-top: 2rem;
    width: 100%;
}

.level-card {
    background: white !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    text-decoration: none !important;
    display: block !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 2px solid transparent !important;
    width: 100% !important;
}

.level-card:hover {
    transform: translateY(-12px) scale(1.02) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

.level-card[style*="#10b981"]:hover { border-color: #10b981 !important; }
.level-card[style*="#3b82f6"]:hover { border-color: #3b82f6 !important; }
.level-card[style*="#8b5cf6"]:hover { border-color: #8b5cf6 !important; }
.level-card[style*="#f59e0b"]:hover { border-color: #f59e0b !important; }
.level-card[style*="#ec4899"]:hover { border-color: #ec4899 !important; }

.level-card-header {
    padding: 2.5rem 2rem !important;
    text-align: center !important;
    position: relative !important;
}

.level-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M20 20l-4-4 4-4 4 4-4 4zm0 8l-4-4 4-4 4 4-4 4z'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.level-emoji {
    font-size: 4rem !important;
    display: block !important;
    margin-bottom: 1rem !important;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25)) !important;
    position: relative !important;
    z-index: 1 !important;
    animation: levelFloat 3s ease-in-out infinite !important;
}

@keyframes levelFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.level-title {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: white !important;
    margin-bottom: 0.75rem !important;
    position: relative !important;
    z-index: 1 !important;
}

.level-age {
    font-size: 1rem !important;
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 500 !important;
    position: relative !important;
    z-index: 1 !important;
}

.level-card-body {
    padding: 2rem !important;
    background: white !important;
}

.level-description {
    color: #64748b !important;
    font-size: 0.95rem !important;
    line-height: 1.8 !important;
    margin-bottom: 1.5rem !important;
    min-height: 60px !important;
}

.level-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    transition: all 0.3s !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 12px !important;
    background: rgba(0, 0, 0, 0.05) !important;
    text-decoration: none !important;
}

.level-card[style*="#10b981"] .level-link { color: #10b981 !important; }
.level-card[style*="#3b82f6"] .level-link { color: #3b82f6 !important; }
.level-card[style*="#8b5cf6"] .level-link { color: #8b5cf6 !important; }
.level-card[style*="#f59e0b"] .level-link { color: #f59e0b !important; }
.level-card[style*="#ec4899"] .level-link { color: #ec4899 !important; }

.level-card:hover .level-link {
    gap: 1rem !important;
    background: rgba(0, 0, 0, 0.08) !important;
}

.level-link svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
}

@media (max-width: 768px) {
    .levels-section {
        padding: 3rem 0;
    }
    
    .levels-section .section-title {
        font-size: 1.5rem;
    }
    
    .levels-grid {
        grid-template-columns: 1fr;
    }
    
    .level-emoji {
        font-size: 3rem;
    }
}

/* Courses Section */
.courses-section {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
}

.courses-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.courses-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.courses-section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.courses-section-header p {
    font-size: 1.125rem;
    color: #64748b;
    line-height: 1.6;
    font-weight: 400;
}

.courses-section-header a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
    font-weight: 700;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.courses-section-header a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.courses-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.course-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.course-card-top-bar {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
}

.course-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.course-card-icon span {
    font-size: 1.75rem;
}

.course-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.course-card p {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    min-height: 3rem;
    font-weight: 400;
}

.course-card .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: white;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.course-card .btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.course-card .btn svg {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    transform: rotate(180deg);
}

/* Responsive Design */

/* Tablet (768px and up) */
@media (min-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text p:first-of-type {
        font-size: 1.25rem;
    }
    
    .hero-text p:last-of-type {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: 1rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .courses-section-header {
        flex-direction: row;
        align-items: center;
    }
    
    .courses-section-header h2 {
        font-size: 2rem;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-content-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .hero-text {
        text-align: right;
    }
    
    .hero-image-wrapper {
        order: 0;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-text p:first-of-type {
        font-size: 1.25rem;
    }
    
    .hero-text p:last-of-type {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: 1rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .courses-section-header h2 {
        font-size: 2.5rem;
    }
}

/* Large Desktop (1280px and up) */
@media (min-width: 1280px) {
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .hero-text p:first-of-type {
        font-size: 1.5rem;
    }
}

/* Mobile (640px and below) */
@media (max-width: 640px) {
    .hero-section {
        padding: 1.5rem 0;
    }
    
    .hero-text h1 {
        font-size: 1.5rem;
    }
    
    .hero-text p:first-of-type {
        font-size: 1rem;
    }
    
    .hero-text p:last-of-type {
        font-size: 0.875rem;
    }
    
    .hero-cta-button {
        width: 100%;
        text-align: center;
    }
    
    .hero-stats {
        flex-direction: column;
    }
    
    /* Hide some emojis on very small screens */
    .emoji-rotate {
        font-size: 1.5rem !important;
    }
    
    .emoji-1,
    .emoji-2,
    .emoji-3,
    .emoji-4 {
        display: none;
    }
    
    .courses-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Courses Section Header */
.courses-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.courses-section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.courses-section-header p {
    font-size: 1.125rem;
    color: #64748b;
    line-height: 1.6;
    font-weight: 400;
}

.courses-section-header a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
    font-weight: 700;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.courses-section-header a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.courses-section-header a svg {
    width: 20px;
    height: 20px;
    transform: rotate(180deg);
}

/* Course Card */
.course-card-top-bar {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
}

.course-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.course-card-icon span {
    font-size: 1.75rem;
}

.course-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.course-card p {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    min-height: 3rem;
    font-weight: 400;
}

.course-card .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: white;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.course-card .btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.course-card .btn svg {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    transform: rotate(180deg);
}

/* Responsive Courses Section */
@media (min-width: 768px) {
    .courses-section-header {
        flex-direction: row;
        align-items: center;
    }
    
    .courses-section-header h2 {
        font-size: 2rem;
    }
}

@media (min-width: 1024px) {
    .courses-section-header h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 640px) {
    .courses-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Print Styles */
@media print {
    .hero-section {
        background: white !important;
        color: black !important;
    }
    
    .emoji-rotate {
        display: none;
    }
}

