/* --- Reusable Components (Buttons, Cards, Forms, Modals) --- */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(229, 70, 70, 0.849);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 70, 70, 0.849);
    color: var(--white);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.title-underline {
    width: 80px;
    height: 4px;
    background-color: var(--primary);
    margin: 0 auto;
    border-radius: 2px;
}

.title-underline.light {
    background-color: var(--white);
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 900px;
    position: relative;
    padding-bottom: 50.625%;
    height: 0;
}

.modal-content iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: var(--white);
    z-index: 2001;
}

/* Form Controls */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

body[dir="rtl"] .back-to-top {
    right: auto;
    left: 30px;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-5px);
    color: var(--white);
}

/* Animations (Fade and Underline) */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-right {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

body[dir="rtl"] .fade-right {
    transform: translateX(30px);
}

.fade-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-left {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

body[dir="rtl"] .fade-left {
    transform: translateX(-30px);
}

.fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

.delay-3 {
    transition-delay: 0.6s;
}

.hand-drawn-underline .path {
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
}

.hand-drawn-underline.animate .path {
    animation: drawUnderline 1.5s ease forwards 1s;
}

@keyframes drawUnderline {
    to {
        stroke-dashoffset: 0;
    }
}

/* Social Icons component */
.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.social-icon:hover {
    transform: translateY(-3px);
}

.social-icon.facebook:hover {
    background: #1877F2;
}

.social-icon.instagram:hover {
    background: #E4405F;
}

.social-icon.youtube:hover {
    background: #FF0000;
}

.social-icon.tiktok:hover {
    background: #000000;
}

.social-icon.linkedin:hover {
    background: #0A66C2;
}