/* Main Content Section */
.conferences-main {
    padding: 80px 0;
    background: linear-gradient(135deg, #f7faff 60%, #e3e9f7 100%);
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 2.4rem;
    color: #0d47a1;
    margin-bottom: 50px;
    font-weight: 800;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #1976d2, #64b5f6);
    margin: 16px auto 0;
    border-radius: 2px;
}

/* Upcoming Conferences */
.upcoming-conferences {
    margin-bottom: 80px;
}

.conference-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.conference-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(30,60,120,0.10);
    padding: 30px;
    display: flex;
    gap: 25px;
    max-width: 800px;
    width: 100%;
    transition: transform 0.3s, box-shadow 0.3s;
}

.conference-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(30,60,120,0.15);
}

.conference-date {
    background: linear-gradient(135deg, #1976d2, #64b5f6);
    color: #fff;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.conference-date .day {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.conference-date .month {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 5px 0;
}

.conference-date .year {
    font-size: 1rem;
    opacity: 0.9;
}

.conference-content {
    flex: 1;
}

.conference-content h3 {
    font-size: 1.5rem;
    color: #0d47a1;
    margin-bottom: 15px;
    font-weight: 700;
}

.conference-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: #666;
}

.conference-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.conference-meta i {
    color: #1976d2;
}

.conference-content p {
    color: #444;
    line-height: 1.6;
    margin-bottom: 20px;
}

.btn-register {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(90deg, #1976d2, #64b5f6);
    color: #fff;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(25,118,210,0.3);
    color: #fff;
}

/* Past Conferences */
.past-conferences {
    margin-bottom: 80px;
}

.conference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.conference-item {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(30,60,120,0.10);
    transition: transform 0.3s;
}

.conference-item:hover {
    transform: translateY(-5px);
}

.conference-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.conference-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.conference-item:hover .conference-image img {
    transform: scale(1.1);
}

.conference-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(25,118,210,0.9);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
}

.conference-info {
    padding: 25px;
}

.conference-info h3 {
    font-size: 1.3rem;
    color: #0d47a1;
    margin-bottom: 10px;
    font-weight: 700;
}

.conference-info p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.btn-view {
    display: inline-block;
    padding: 10px 25px;
    background: #f0f4f8;
    color: #1976d2;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-view:hover {
    background: #1976d2;
    color: #fff;
}

/* Registration Form */
.conference-registration {
    background: linear-gradient(135deg, #1976d2, #64b5f6);
    border-radius: 20px;
    padding: 50px;
    color: #fff;
    margin-top: 80px;
}

.registration-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.registration-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.registration-content p {
    margin-bottom: 30px;
    opacity: 0.9;
}

.registration-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1rem;
}

.form-group input::placeholder {
    color: rgba(255,255,255,0.7);
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: #1976d2;
    color: #fff;
}

.btn-subscribe {
    padding: 15px 30px;
    background: #fff;
    color: #1976d2;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-subscribe:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* RTL Support */
html[dir="rtl"] .conference-card {
    flex-direction: row-reverse;
}

html[dir="rtl"] .conference-meta {
    flex-direction: row-reverse;
}

html[dir="rtl"] .conference-overlay {
    right: auto;
    left: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .conferences-main {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .conference-card {
        flex-direction: column;
        text-align: center;
    }
    
    .conference-date {
        margin: 0 auto;
    }
    
    .conference-meta {
        justify-content: center;
    }
    
    .conference-registration {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
    }
    
    .conference-card {
        padding: 20px;
    }
    
    .conference-content h3 {
        font-size: 1.3rem;
    }
    
    .conference-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .registration-content h2 {
        font-size: 1.8rem;
    }
}

/* Two Images in a Card */
.conference-images {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: stretch;
    margin-bottom: 0;
}
.conference-images .conference-image {
    flex: 1 1 0;
    min-width: 0;
    height: 200px;
}
@media (max-width: 900px) {
    .conference-images {
        flex-direction: column;
        gap: 10px;
    }
    .conference-images .conference-image {
        height: 160px;
    }
}
html[dir="rtl"] .conference-images {
    flex-direction: row-reverse;
}

/* Conference Modal Styles */
.conference-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    align-items: center;
    justify-content: center;
}
.conference-modal.active {
    display: flex;
}
.modal-backdrop {
    position: absolute;
    left: 0; top: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30, 60, 120, 0.35);
    backdrop-filter: blur(2px);
    z-index: 1;
}
.modal-content {
    position: relative;
    z-index: 2;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 48px rgba(30,60,120,0.18);
    max-width: 600px;
    width: 95vw;
    padding: 40px 32px 32px 32px;
    animation: modalFadeIn 0.4s cubic-bezier(.77,0,.18,1);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(40px) scale(0.98); }
    to { opacity: 1; transform: none; }
}
.modal-close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #1976d2;
    cursor: pointer;
    z-index: 3;
    transition: color 0.2s;
}
.modal-close:hover {
    color: #0d47a1;
}
.modal-body {
    width: 100%;
    margin-top: 10px;
    text-align: left;
    color: #222;
}
.modal-body h2 {
    font-size: 2rem;
    color: #0d47a1;
    margin-bottom: 12px;
    font-weight: 800;
}
.modal-body .modal-images {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    justify-content: center;
}
.modal-body .modal-images img {
    border-radius: 12px;
    max-width: 48%;
    height: 180px;
    object-fit: cover;
    box-shadow: 0 4px 18px rgba(30,60,120,0.10);
}
.modal-body .modal-meta {
    color: #1976d2;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.05rem;
}
.modal-body p {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.7;
    margin-bottom: 0;
}
@media (max-width: 600px) {
    .modal-content {
        padding: 18px 6vw 18px 6vw;
        max-width: 98vw;
    }
    .modal-body .modal-images img {
        height: 110px;
        max-width: 100%;
    }
    .modal-body h2 {
        font-size: 1.3rem;
    }
}
