/* Zia Portfolio - Native PHP Version */
/* Modern Southern Design with Bilingual Support */

* {
    box-sizing: border-box;
}

body {
    font-family: "Vazirmatn", sans-serif;
    background-color: #fdfdfd;
    color: #222;
    margin: 0;
    padding: 0;
    line-height: 1.8;
    transition: background-color 0.3s, color 0.3s;
}

/* Language Switch */
.lang-switch {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    display: flex;
    gap: 0.5rem;
}

.lang-switch button {
    padding: 0.5rem 1rem;
    border: 2px solid #0e3c4f;
    background-color: transparent;
    color: #0e3c4f;
    border-radius: 25px;
    cursor: pointer;
    font-family: "Vazirmatn", sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-switch button:hover {
    background-color: #0e3c4f;
    color: white;
}

.lang-switch button.active {
    background-color: #0e3c4f;
    color: white;
}

/* Header */
header {
    background: linear-gradient(135deg, #0e3c4f 0%, #1a5f7a 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

header h1 {
    margin: 0;
    font-size: 3rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

header p {
    margin-top: 1rem;
    font-size: 1.3rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Main Content */
main {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    margin-bottom: 4rem;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

h2 {
    color: #0e3c4f;
    border-bottom: 3px solid #0e3c4f;
    padding-bottom: 0.8rem;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 600;
}

/* Links */
a {
    color: #0e3c4f;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

a:hover {
    color: #1a5f7a;
    text-decoration: underline;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.4s ease;
}

.gallery img:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

/* Lightbox */
#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

#lightbox.show {
    visibility: visible;
    opacity: 1;
}

#lightbox.show img {
    transform: scale(1);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 3px solid #0e3c4f;
}

footer p {
    margin: 0;
    font-size: 1rem;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lang-switch {
        top: 0.5rem;
        left: 0.5rem;
    }
    
    .lang-switch button {
        padding: 0.3rem 0.8rem;
        font-size: 0.9rem;
    }
    
    header {
        padding: 3rem 1rem;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    header p {
        font-size: 1.1rem;
    }
    
    main {
        padding: 2rem 1rem;
    }
    
    section {
        padding: 1.5rem;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .gallery img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

/* Language-specific display */
.fa, .en {
    display: none;
}

html[lang="fa"] .fa {
    display: block;
}

html[lang="en"] .en {
    display: block;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
button:focus,
a:focus {
    outline: 2px solid #0e3c4f;
    outline-offset: 2px;
}
