/* IRANSansX Font Family */
@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/woff2/IRANSansX-Regular.woff2') format('woff2'),
         url('../fonts/woff/IRANSansX-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/woff2/IRANSansX-Medium.woff2') format('woff2'),
         url('../fonts/woff/IRANSansX-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/woff2/IRANSansX-Bold.woff2') format('woff2'),
         url('../fonts/woff/IRANSansX-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Global Styles */
* {
    font-family: 'IRANSansX', Tahoma, Arial, sans-serif;
}

body {
    background-color: var(--light-color);
    color: var(--dark-color);
    overflow-x: hidden;
    font-size: 1.125rem;
}

/* Global heading styles */
h1, h2, h3, h4, h5, h6 {
    font-weight: bold !important;
}

h1 {
    font-size: calc(1.375rem + 1.5vw) !important;
}

h2 {
    font-size: calc(1.325rem + 0.9vw) !important;
}

h3 {
    font-size: calc(1.3rem + 0.6vw) !important;
}

h4 {
    font-size: calc(1.275rem + 0.3vw) !important;
}

h5 {
    font-size: 1.35rem !important;
}

/* Override Bootstrap colors with CSS variables */
.bg-primary {
    background: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.btn-primary {
    background: var(--primary-color);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    color: white;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-width: 2px;
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.bg-secondary {
    background: var(--secondary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.btn-secondary {
    background: var(--secondary-color);
    border: none;
    color: white;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.bg-info {
    background-color: var(--info-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

.bg-light {
    background-color: var(--light-color) !important;
}

.text-light {
    color: var(--light-color) !important;
}

.bg-dark {
    background-color: var(--dark-color) !important;
}

.text-dark {
    color: var(--dark-color) !important;
}

/* Navbar Styles */
.navbar {
    background: var(--primary-color) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--light-color);
    font-weight: 500;
    margin: 0 0.5rem;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--secondary-color);
}

.navbar-brand {
    font-size: 1.05rem !important;
}

.navbar-dark .navbar-nav .nav-link {
    font-size: 0.95rem !important;
}

/* Card Styles */
.card {
    background-color: #ffffff !important;
    color: #1f2937 !important;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card.position-relative:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2) !important;
}

.card-body {
    background-color: #ffffff !important;
    color: #1f2937 !important;
}

.card-title, .card-text {
    color: #1f2937 !important;
}

.card h2, .card h3, .card h4, .card h5, .card h6 {
    color: #1f2937 !important;
    font-weight: bold !important;
}

.card p {
    color: #1f2937 !important;
    font-size: 1.25rem;
}

.card li {
    color: #1f2937 !important;
    font-size: 1.2rem;
    line-height: 1.8;
}

.card .text-muted {
    color: #6b7280 !important;
    opacity: 1;
}

/* Hero Section - Simplified */
.hero-section {
    position: relative;
    overflow: hidden;
    border-radius: 0 0 30px 30px;
}

/* Footer */
.footer, footer {
    background: var(--dark-color) !important;
    color: var(--light-color) !important;
}

footer .text-light {
    color: var(--light-color) !important;
}

footer .text-muted {
    color: #9ca3af !important;
}

footer h5 {
    font-size: 1.1rem !important;
}

footer p,
footer li,
footer a {
    font-size: 0.9rem !important;
}

footer a:hover {
    opacity: 0.8;
    text-decoration: underline !important;
}

/* Logo Cards */
.card img {
    transition: transform 0.3s ease;
}

.card:hover img {
    transform: scale(1.05);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Form Focus States */
.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(238, 79, 124, 0.25);
}

/* Section backgrounds */
section {
    background-color: var(--light-color);
    color: var(--dark-color);
    position: relative;
    overflow: hidden;
}

section:nth-child(even) {
    background: linear-gradient(135deg, rgba(26, 41, 128, 0.03) 0%, rgba(247, 37, 133, 0.03) 100%);
}

section.bg-light {
    background-color: var(--light-color) !important;
    color: var(--dark-color) !important;
}

/* Ensure proper contrast in all sections */
.bg-light {
    background-color: var(--light-color) !important;
    color: var(--dark-color) !important;
}

/* Carousel Caption Background */
.carousel-caption {
    background: rgba(0, 0, 0, 0.6);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.carousel-caption h1,
.carousel-caption p,
.carousel-caption .btn {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Hero Overlay Effect */
.carousel-item {
    position: relative;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 41, 128, 0.15) 0%, rgba(247, 37, 133, 0.05) 100%);
    transition: all 0.6s ease;
}

.carousel-item.active::before {
    background: linear-gradient(135deg, rgba(26, 41, 128, 0.1) 0%, rgba(247, 37, 133, 0.02) 100%);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-light {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

/* Responsive Typography */
@media (max-width: 768px) {
    body {
        font-size: 0.95rem !important;
    }

    h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.35rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    h4 {
        font-size: 1.15rem !important;
    }

    h5 {
        font-size: 1.1rem !important;
    }

    .display-4 {
        font-size: 1.75rem !important;
    }

    .display-2 {
        font-size: 2rem !important;
    }

    .navbar-brand {
        font-size: 0.9rem !important;
    }

    .navbar-dark .navbar-nav .nav-link {
        font-size: 0.85rem !important;
    }

    .card p {
        font-size: 1rem !important;
    }

    .card li {
        font-size: 1rem !important;
    }

    .lead {
        font-size: 1.1rem !important;
    }

    .carousel-caption {
        padding: 1rem;
    }

    .carousel-caption h1 {
        font-size: 1.3rem !important;
    }

    .carousel-caption p {
        font-size: 0.9rem !important;
    }

    .carousel-item img {
        height: 210px !important;
    }

    .countdown-item {
        min-width: 70px;
        padding: 1rem;
    }

    .countdown-value {
        font-size: 1.5rem !important;
    }

    footer h5 {
        font-size: 1rem !important;
    }

    footer p,
    footer li,
    footer a {
        font-size: 0.85rem !important;
    }
}
