/* Custom Styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.7;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #a80000;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #700000;
}

/* Navbar Scroll Effect */
.navbar-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 0;
}

/* Animation Delays */
.animation-delay-200 {
    animation-delay: 200ms;
}

.animation-delay-400 {
    animation-delay: 400ms;
}

/* Hero Chart Gradient */
.chart-gradient {
    background: linear-gradient(180deg, rgba(251,191,36,0.3) 0%, rgba(251,191,36,0) 100%);
}

/* Counter Animation */
.counter {
    font-variant-numeric: tabular-nums;
}

/* Page Header (for inner pages) - matches original logo: bright red to dark navy blue */
.page-header {
    background: linear-gradient(135deg, #c00a1f 0%, #a80000 50%, #700000 100%);
    position: relative;
    overflow: hidden;
    padding: 6rem 0 4rem;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(251,191,36,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    height: 4rem;
    clip-path: ellipse(55% 100% at 50% 100%);
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #a80000;
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
}

.form-label {
    display: block;
    font-weight: 600;
    color: #a80000;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Service Tabs */
.service-tab {
    cursor: pointer;
    transition: all 0.3s;
}

.service-tab.active {
    background: linear-gradient(135deg, #a80000, #700000);
    color: white;
    transform: translateX(8px);
}

.service-tab.active .service-icon {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

/* Timeline */
.timeline-item {
    position: relative;
    padding-right: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: #fbbf24;
    border-radius: 50%;
    border: 3px solid #dbeafe;
}

.timeline-item::after {
    content: '';
    position: absolute;
    right: 5px;
    top: 2rem;
    bottom: -1rem;
    width: 2px;
    background: #dbeafe;
}

.timeline-item:last-child::after {
    display: none;
}

/* News Card Hover */
.news-card img,
.news-card .news-placeholder {
    transition: transform 0.5s ease;
}

.news-card:hover .news-placeholder,
.news-card:hover img {
    transform: scale(1.08);
}

/* FAQ Accordion */
.faq-item {
    border-bottom: 1px solid #e5e7eb;
}

.faq-question {
    cursor: pointer;
    transition: all 0.3s;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    padding-bottom: 1rem;
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
    color: #d97706;
}

.faq-icon {
    transition: transform 0.3s;
}

/* Number Counter Animation */
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pulse Animation for live elements */
@keyframes soft-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.live-dot {
    animation: soft-pulse 2s infinite;
}

/* Page transitions */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Print Styles */
@media print {
    #navbar, .no-print, footer {
        display: none !important;
    }
}

/* Responsive Board Hierarchy Order: Mobile (Chairman 1st, Vice 2nd) vs Desktop (5-column RTL podium) */
.board-card-chairman { order: 1; }
.board-card-vice { order: 2; }
.board-card-gholamzadeh { order: 3; }
.board-card-feizipour { order: 4; }
.board-card-arastoo { order: 5; }

@media (min-width: 1024px) {
  .board-card-gholamzadeh { order: 1; }
  .board-card-vice { order: 2; }
  .board-card-chairman { order: 3; }
  .board-card-feizipour { order: 4; }
  .board-card-arastoo { order: 5; }
}

/* Responsive Board Member Images - Perfectly framed on mobile without face cropping */
@media (max-width: 1023px) {
  .board-img-box {
    width: 6.5rem !important;
    height: 6.5rem !important;
    max-width: 6.5rem !important;
    max-height: 6.5rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
    border-radius: 1rem !important;
    overflow: hidden !important;
  }
  .board-img-box img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .board-img-box {
    width: 7.5rem !important;
    height: 7.5rem !important;
    max-width: 7.5rem !important;
    max-height: 7.5rem !important;
  }
}
