/* 
 * Miksu's Website Styles
 * Optimized for performance and accessibility
 * Last updated: September 2025
 */

/* Base Styles */
body {
    background: url('../images/bg.png') repeat;
    font-family: Arial, sans-serif;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin: 0;
    line-height: 1.6;
}

/* Layout Components */
.menu {
    max-width: 970px;
    margin: 20px auto;
    padding: 15px;
    border-radius: 10px;
    position: relative;
    background-image: url('../images/bg2.png');
}

.menu a {
    color: #fff;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    font-size: 1.15em;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    text-shadow: 1px 2px 6px #000, 0 0 2px #014421;
}

.menu a:hover {
    background: rgba(34,139,34,0.4);
    text-decoration: underline;
}

.intro {
    max-width: 900px;
    margin: 10px auto;
    padding: 20px;
    border-radius: 10px;
    position: relative;
    border: 30px solid transparent;
    border-image: url('../images/floral.png') 30 30 round;
    background: radial-gradient(circle, #228B22b3 0%, #4F7942b3 50%, #014421b3 100%);
    background-size: 200% 200%;
    animation: forestGradientMove 24s linear infinite;
}

.intro h1, .intro h2 {
    text-shadow: 2px 3px 8px #000, 0 0 4px #014421;
    margin-bottom: 5px;
    margin-top: 5px;
}

.intro p {
    text-shadow: 1px 2px 6px #000, 0 0 2px #014421;
    line-height: 1.6;
}

.intro a {
    color: #90EE90;
    transition: color 0.2s;
}

.intro a:hover {
    color: #98FB98;
}

.footer {
    max-width: 970px;
    margin: 20px auto;
    padding: 15px;
    border-radius: 10px;
    position: relative;
    background-image: url('../images/bg2.png');
}

.footer p {
    text-shadow: 1px 2px 6px #000, 0 0 2px #014421;
    line-height: 1.6;
    margin: 0;
}

.footer a {
    color: #90EE90;
    transition: color 0.2s;
    text-decoration: none;
}

.footer a:hover {
    color: #98FB98;
    text-decoration: underline;
}

@keyframes forestGradientMove {
    0% { background-position: 50% 0%; }
    25% { background-position: 50% 100%; }
    50% { background-position: 50% 200%; }
    75% { background-position: 50% 100%; }
    100% { background-position: 50% 0%; }
}

/* Typography */
/* All typography styles are now consolidated within their respective component rules */

/* Links */
/* All link styles are now consolidated within their respective component rules */

/* Images and Media */
.gif {
    margin: 10px;
}

/* Performance Optimizations */
img, video {
    will-change: transform;
}

/* Simple Photo Gallery */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
    max-width: 100%;
}

.photo-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    aspect-ratio: 2/3;
}

.photo-item:hover {
    transform: scale(1.02);
}

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

/* Photo Overlay */
.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-overlay {
    transform: translateY(0);
}

.photo-overlay h3 {
    margin: 0 0 5px 0;
    font-size: 1.2em;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.photo-overlay p {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    margin: 5% auto;
    max-width: 90%;
    max-height: 90%;
    background: rgba(20,68,33,0.95);
    border-radius: 15px;
    border: 3px solid #228B22;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

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

.modal-image {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    background: #000;
    display: block;
}

.modal-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-info {
    padding: 20px;
    text-align: left;
}

.modal-info h2 {
    margin: 0 0 10px 0;
    color: #90EE90;
    font-size: 1.5em;
}

.modal-info p {
    margin: 0;
    color: #fff;
    line-height: 1.6;
}

/* Modal Controls */
.close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0,0,0,0.7);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close:hover {
    background: rgba(255,0,0,0.8);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    font-size: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.modal-nav:hover {
    background: rgba(34,139,34,0.9);
}

.modal-nav.prev { left: 10px; }
.modal-nav.next { right: 10px; }

.modal-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(0,0,0,0.5);
}

/* Video Container */
.video-container {
    margin: 20px 0;
}

.video-container iframe {
    max-width: 100%;
    width: 560px;
    height: 315px;
    border-radius: 10px;
    margin: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        max-width: 95vw;
        padding: 12px;
        margin: 10px auto;
    }
    
    .menu a {
        margin: 0;
        padding: 12px;
        text-align: center;
        font-size: 1rem;
    }
    
    .intro {
        max-width: 95vw;
        padding: 15px;
        margin: 10px auto;
    }
    
    .footer {
        max-width: 95vw;
        padding: 12px;
        margin: 10px auto;
    }
    
    .photo-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .photo-item {
        max-width: 300px;
        margin: 0 auto;
        aspect-ratio: 3/4;
    }
    
    .photo-item img {
        object-fit: cover;
    }
    
    .modal-content {
        margin: 5% auto;
        max-width: 95%;
        max-height: 90vh;
        min-height: auto;
        overflow-y: auto;
    }
    
    .modal-image {
        max-height: 60vh;
    }
    
    #modalVideo {
        max-height: 60vh !important;
        width: 100% !important;
    }
    
    .modal-info {
        padding: 15px;
        flex-shrink: 0;
    }
    
    .modal-info h2 {
        font-size: 1.2em;
    }
    
    .close {
        top: 10px;
        right: 15px;
        font-size: 24px;
        width: 35px;
        height: 35px;
    }
    
    .modal-nav {
        font-size: 16px;
        width: 35px;
        height: 35px;
    }
    
    .modal-nav.prev { left: 5px; }
    .modal-nav.next { right: 5px; }
    
    .video-container iframe {
        width: 100%;
        height: calc(100vw * 9/16);
        max-height: 315px;
        margin: 5px 0;
    }
    
    .gif {
        width: 90vw;
        max-width: 200px;
    }
}