/* Modern Presentation Styles */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazir', sans-serif;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    direction: rtl;
}

.presentation-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

/* Header Styles */
header {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
}

.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.special-buttons {
    display: flex;
    gap: 10px;
}

.special-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.special-btn:hover {
    background-color: #2980b9;
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin-right: 20px;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

nav li:hover {
    background-color: #e0e0e0;
}

nav li.active {
    background-color: #2c3e50;
    color: white;
}

/* Slide Controls */
.slide-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.slide-controls button {
    background: none;
    border: 1px solid #ddd;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.slide-controls button:hover {
    background-color: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

.slide-counter {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
}

/* Main Content Styles */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

section {
    display: none;
    height: 100%;
    overflow: hidden;
}

section.active {
    display: flex;
    flex-direction: column;
}

#gallery.active {
    overflow-y: auto;
}

/* Introduction Section */
.intro-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.intro-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.intro-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.featured-item {
    margin-top: 40px;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.featured-item img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.featured-item:hover img {
    transform: scale(1.05);
}

.featured-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 1.1rem;
}

/* Slides Section */
#slides {
    position: relative;
    height: 100%;
}

.slide-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease, transform 1s ease;
    transform: scale(0.9);
}

.slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.slide.prev {
    transform: translateX(-100%);
    opacity: 0;
}

.slide.next {
    transform: translateX(100%);
    opacity: 0;
}

.slide img, .slide video {
    max-width: 100%;
    max-height: 80%;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.slide .caption {
    margin-top: 20px;
    padding: 10px;
    background: rgba(44, 62, 80, 0.8);
    color: white;
    border-radius: 5px;
    font-size: 1.1rem;
    text-align: center;
    max-width: 80%;
}

/* Video indicator */
.video-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
}

/* Fullscreen Presentation Styles */
#fullscreen-presentation {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    overflow: hidden;
}

.presentation-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.media-container {
    max-width: 90%;
    max-height: 80%;
    position: relative;
}

.media-container img, .media-container video {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 5px;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 1010;
}

.caption-container {
    margin-top: 20px;
    width: 80%;
    text-align: center;
    color: white;
}

#caption {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.navigation {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
}

.navigation button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    padding: 15px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.navigation button:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 80%;
    max-width: 700px;
    position: relative;
    animation: modalFadeIn 0.4s;
}

/* Modal Image Styles */
.modal-image {
    margin-top: 20px;
    text-align: center;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.modal-image img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.5s ease;
}

.modal-image:hover img {
    transform: scale(1.02);
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.modal-content h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.modal-content p {
    margin-bottom: 15px;
    line-height: 1.8;
    font-size: 1.1rem;
}

.modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

/* Slide Transition Effects */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(1.1); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100%); opacity: 0; }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.slide-transition-in {
    animation: fadeIn 0.8s forwards;
}

.slide-transition-out {
    animation: fadeOut 0.8s forwards;
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 15px;
    border-top: 1px solid #eee;
    color: #777;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 20px;
    }
    
    .header-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .special-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .slide-controls {
        width: 100%;
    }
    
    .navigation {
        padding: 0 20px;
    }
    
    .slide .caption {
        font-size: 0.9rem;
        max-width: 90%;
    }
    
    .modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 20px;
    }
    
    .modal-image img {
        max-height: 300px;
    }
}

/* Header Styles */
header {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.header-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header-left {
    flex: 0 0 auto;
}

.header-center {
    flex: 0 0 auto;
    margin: 0 15px;
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin: 0;
    white-space: nowrap;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav li {
    margin-right: 10px;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

nav li:hover {
    background-color: #e0e0e0;
}

nav li.active {
    background-color: #2c3e50;
    color: white;
}

.special-buttons {
    display: flex;
    gap: 10px;
}

.special-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.special-btn:hover {
    background-color: #2980b9;
}

.slide-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slide-controls button {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.slide-controls button:hover {
    background-color: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

.slide-counter {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
}

/* Responsive adjustments */
@media (max-width: 1100px) {
    .header-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .header-left, .header-center, .header-right {
        flex: 0 0 100%;
        text-align: center;
        justify-content: center;
    }
    
    .header-right {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .special-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .slide-controls {
        width: 100%;
        justify-content: center;
    }
}

/* Gallery Section Styles */
#gallery {
    padding: 20px 0;
}

.gallery-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.gallery-controls button {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 15px;
    margin-right: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.gallery-controls button.active {
    background-color: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

.gallery-container {
    transition: all 0.5s ease;
}

.gallery-container.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-container.list-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.gallery-item img, .gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-container.grid-view .gallery-item {
    height: 200px;
}

.gallery-container.list-view .gallery-item {
    display: flex;
    height: 150px;
}

.gallery-container.list-view .gallery-item img,
.gallery-container.list-view .gallery-item video {
    width: 200px;
}

.gallery-container.list-view .item-info {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.9rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .caption {
    transform: translateY(0);
}

.gallery-container.list-view .gallery-item .caption {
    position: static;
    background: none;
    color: #333;
    transform: none;
    padding: 0;
}

/* Video indicator */
.video-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
}