/* canov-styles.css */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #2c3e50;
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    
    /* رنگ‌های اضافی برای کل صفحه */
    --background-color: #f5f7fa;
    --text-color: #333;
    --white: #ffffff;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --success-color: #d4edda;
    --success-text: #155724;
    --error-color: #f8d7da;
    --error-text: #721c24;
    --warning-color: #fff9c4;
    --info-color: #e8f4fc;
    --gray-medium: #7f8c8d;
    --hero-p: #555;
    --overlay-color: rgba(0, 0, 0, 0.7);

    /* رنگ‌های تم تاریک */
    --dark-bg: #1a1a1a;
    --dark-card: #2d2d2d;
    --dark-text: #f0f0f0;
    --dark-overlay: rgba(40, 40, 40, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="rgba(52, 152, 219, 0.05)" width="20" height="20"/></svg>');
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* هدر و ناوبری */
header {
    background: var(--gradient);
    color: var(--white);
    padding: 15px 0;
    box-shadow: 0 4px 12px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

nav a:after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--white);
    transition: width 0.3s ease;
}

nav a:hover:after {
    width: 100%;
}

/* بخش هیرو */
.hero {
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
    border-radius: 0 0 20px 20px;
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    color: var(--hero-p);
}

.cta-button {
    display: inline-block;
    background: var(--gradient);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* شبکه آیتم‌ها */
.maingrid {
    padding: 20px 0 60px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.grid-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease, transform 1.5s ease; 
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 1.5s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* کلاس برای آیتم‌های قابل مشاهده */
.grid-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.icon-container {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    position: relative;
    overflow: hidden;
}

.icon-container:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
}

.icon {
    font-size: 3.1rem;
    width: 70px;
    height: 70px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0) invert(1);
    z-index: 2;
}

.content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.title {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    line-height: 1.5;
}

.title strong {
    color: var(--primary-color);
}

.link-button {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.link-button:hover {
    color: var(--secondary-color);
    gap: 10px;
}

/* محتوای صفحه درباره ما */
.about-hero {
    padding: 60px 0 30px;
    text-align: center;
}

.about-hero h1 {
    font-size: 2.8rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-content {
    background: var(--white);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
    line-height: 1.9;
}

.about-content p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    text-align: justify;
}

.highlight {
    background: var(--gradient);
    color: var(--white);
    padding: 15px 25px;
    border-radius: 10px;
    margin: 25px 0;
    font-weight: 500;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.feature-item {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-item h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
}

.cta-section {
    text-align: center;
    padding: 40px 0;
    background: var(--gradient);
    color: var(--white);
    border-radius: 15px;
    margin: 40px 0;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

/* استایل‌های فرم ثبت‌نام */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-color);
    overflow: hidden;
}

.form-header {
    background: var(--gradient);
    color: var(--white);
    padding: 20px;
    text-align: center;
}

.form-header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.progress-container {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    height: 10px;
    margin: 15px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--white);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.steps-container {
    padding: 20px;
    position: relative;
    min-height: 400px;
}

.step {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.step.active {
    display: block;
}

.hint-box {
    background: var(--light-color);
    border-right: 4px solid var(--primary-color);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.8;
}

.form-control {
    margin-bottom: 20px;
}

.form-control label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control input,
.form-control select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control input:focus,
.form-control select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.birth-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.buttons-container {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-next {
    background: var(--gradient);
    color: var(--white);
}

.btn-prev {
    background: var(--gradient);
    color: var(--white);
}

.btn-submit {
    background: var(--secondary-color);
    color: var(--white);
    width: 100%;
    justify-content: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    margin: 0 5px;
    transition: all 0.3s ease;
}

.step-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.success-message {
    text-align: center;
    padding: 40px 20px;
    display: none;
}

.success-icon {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.error-message {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

/* فوتر */
footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}

.footer-section p {
    margin-bottom: 15px;
    opacity: 0.8;
}

.footer-section a {
    color: inherit !important;
    text-decoration: none;
    margin-bottom: 15px;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Additional styles for log.php */
.red-marker {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 0.1em 0.3em;
}

.yellow-marker {
    background-color: var(--warning-color);
    color: var(--text-color);
    padding: 0.1em 0.3em;
}

.log-form {
    padding: 40px 0;
    background: var(--light-color);
    min-height: 100vh;
}

.log-form .form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

.form-title {
    text-align: center;
    color: var(--dark-color);
    margin-bottom: 30px;
    font-size: 1.8rem;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.yellow-bg {
    background-color: var(--warning-color) !important;
}

.submit-btn {
    display: block;
    width: 100%;
    background: var(--gradient);
    color: var(--white);
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.submit-btn:disabled {
    background: var(--gray-medium);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#message {
    text-align: center;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    display: none;
    opacity: 1;
    transition: opacity 2s ease;
}

.success {
    background-color: var(--success-color);
    color: var(--success-text);
    border: 1px solid #c3e6cb;
}

.error {
    background-color: var(--error-color);
    color: var(--error-text);
    border: 1px solid #f5c6cb;
}

.next-student-info {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--gray-medium);
}

/* استایل‌های فرم اطلاعات تکمیلی اولیا */
.supp-form {
    padding: 40px 0;
    background: var(--light-color);
    min-height: 100vh;
}

.supp-form .form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    color: var(--primary-color);
    margin: 25px 0 15px;
    font-size: 1.4rem;
    padding-right: 10px;
    border-right: 3px solid var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.form-control textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    resize: vertical;
    min-height: 100px;
}

.form-control textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* استایل‌های جدید برای پیام و لودینگ */
.form-message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    display: none;
}

.form-message.success {
    background-color: var(--success-color);
    color: var(--success-text);
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: var(--error-color);
    color: var(--error-text);
    border: 1px solid #f5c6cb;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* استایل‌های فرم اولیا - olia.php */
.parent-form {
    padding: 40px 0;
    background: var(--light-color);
    min-height: calc(100vh - 200px);
}

.parent-form .form-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    padding: 30px;
    line-height: 1.8;
}

.form-content {
    margin-bottom: 30px;
}

.form-content h2 {
    color: var(--primary-color);
    margin: 25px 0 15px;
    font-size: 1.4rem;
}

.form-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.form-content ol {
    padding-right: 20px;
    margin-bottom: 20px;
}

.form-content li {
    margin-bottom: 10px;
}

.notes {
    background: var(--info-color);
    padding: 20px;
    border-radius: 10px;
    border-right: 4px solid var(--primary-color);
    margin: 30px 0;
}

.notes h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
}

.notes ol {
    padding-right: 20px;
}

.start-button {
    display: block;
    width: 250px;
    margin: 40px auto;
    background: var(--gradient);
    color: var(--white);
    padding: 15px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* استایل برای مودال */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
}

.modal-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-color);
    text-align: center;
}

.modal-date {
    color: var(--gray-medium);
    text-align: center;
    margin-bottom: 20px;
    font-size: 16px;
}

.modal-description {
    line-height: 1.8;
    color: #444;
    font-size: 16px;
}

/* انیمیشن برای نمایش مودال */
.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* تم تاریک */
.dark-mode {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

.dark-mode .grid-item,
.dark-mode .about-content,
.dark-mode .feature-item,
.dark-mode .form-container,
.dark-mode .log-form .form-container,
.dark-mode .supp-form .form-container,
.dark-mode .parent-form .form-container {
    background: var(--dark-card);
    color: var(--dark-text);
}

.dark-mode .hero {
    background: var(--dark-overlay);
}

.dark-mode .title,
.dark-mode .feature-item h3,
.dark-mode .form-title,
.dark-mode .form-control label {
    color: var(--dark-text);
}

.dark-mode .cta-section {
    background: var(--gradient);
}

.dark-mode .form-control input,
.dark-mode .form-control select,
.dark-mode .form-control textarea {
    background: var(--dark-card);
    color: var(--dark-text);
    border-color: var(--gray-medium);
}

/* دکمه تم تاریک */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px var(--shadow-color);
    z-index: 100;
    border: none;
    font-size: 1.2rem;
}

/* رسپانسیو */
.mobile-text {
    display: none;
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 20px;
    }
    
    .nav-toggle {
        display: block;
    }
    
    nav {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 80px);
        background: var(--dark-color);
        transition: all 0.4s ease;
        z-index: 999;
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        padding: 30px;
        gap: 20px;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .about-hero h1 {
        font-size: 2.2rem;
    }
    
    .about-content {
        padding: 25px;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .birth-inputs {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .log-form .form-container,
    .supp-form .form-container,
    .parent-form .form-container {
        padding: 20px;
        margin: 0 15px;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .desktop-text {
        display: none;
    }
    
    .mobile-text {
        display: block;
    }
    
    .hero .container h2 {
        line-height: 1.8;
        text-align: center;
    }
    
    .hero .container p {
        line-height: 1.8;
        text-align: center;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
}