/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-text: #1f2937;
    --color-text-light: #6b7280;
    --color-bg: #ffffff;
    --color-bg-alt: #f9fafb;
    --color-border: #e5e7eb;
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --max-width: 1200px;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-dark);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

header.home-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
}

header.home-header .nav-container {
    position: relative;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}

.logo:hover {
    color: var(--color-primary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--color-text-light);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    min-width: 180px;
    z-index: 200;
}

.nav-dropdown:hover > .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    padding: 0;
    border-bottom: none;
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1.25rem;
    color: var(--color-text-light);
    font-weight: 400;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: var(--color-bg-alt);
    color: var(--color-primary);
}

.dropdown-menu a::after {
    display: none;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition);
}

/* Button */
.btn {
    display: inline-block;
    background: #e5e7eb;
    color: var(--color-text);
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background var(--transition), transform var(--transition);
}

.btn:hover {
    background: #d1d5db;
    color: var(--color-text);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

/* Hero */
.hero {
    padding: 0;
    text-align: center;
}

.hero-img {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
    display: block;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero .btn {
    background: #fff;
    color: var(--color-primary);
}

.hero .btn:hover {
    background: #f0f0f0;
    color: var(--color-primary-dark);
}

/* Features */
.features {
    padding: 5rem 0;
    background: var(--color-bg-alt);
}

/* Welcome Section */
.welcome-section {
    padding: 4rem 0;
}

.welcome-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: center;
}

.welcome-image img {
    width: 100%;
    border-radius: var(--radius);
    display: block;
}

.welcome-text h1 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
    white-space: nowrap;
}

.welcome-text p {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

@media (max-width: 768px) {
    .welcome-grid {
        grid-template-columns: 1fr;
    }
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--color-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: box-shadow var(--transition), transform var(--transition);
}

.feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--color-text-light);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: #fff;
    padding: 4rem 1.5rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* About */
.about-content {
    padding: 4rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.about-text p {
    color: var(--color-text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.bio-quote {
    font-style: italic;
    color: var(--color-text) !important;
    font-size: 1.1rem;
    border-left: 3px solid var(--color-primary);
    padding-left: 1rem;
    margin-bottom: 1.5rem !important;
}

.bio-photo {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: var(--radius);
    display: block;
}

.placeholder-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius);
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
}

.values {
    padding: 3rem 0;
}

.values h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.value-card {
    padding: 2rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-align: center;
}

.value-card h3 {
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

.value-card p {
    color: var(--color-text-light);
}

/* Gallery */
.gallery-section {
    padding: 4rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: contain;
    display: block;
    background: #f3f4f6;
    padding: 0.5rem;
}

.gallery-caption {
    padding: 1rem;
    background: var(--color-bg);
}

.gallery-caption h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    text-transform: capitalize;
}

.gallery-caption p {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* Gallery List (index page) */
.gallery-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.gallery-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    color: var(--color-text);
    text-decoration: none;
    display: block;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    color: var(--color-text);
}

.gallery-card-cover {
    height: 200px;
    overflow: hidden;
    background: var(--color-bg-alt);
}

.gallery-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
    background: #f3f4f6;
}

.gallery-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 3rem;
    font-weight: 700;
}

.gallery-card-info {
    padding: 1.25rem;
}

.gallery-card-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.gallery-card-info p {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.gallery-card-desc {
    margin-top: 0.5rem;
}

.loading-message,
.empty-message {
    text-align: center;
    color: var(--color-text-light);
    padding: 3rem 1rem;
    grid-column: 1 / -1;
}

.empty-message code {
    background: var(--color-bg-alt);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.5rem;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    transition: background var(--transition);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-caption {
    color: #fff;
    margin-top: 1rem;
    font-size: 0.95rem;
    opacity: 0.8;
    text-transform: capitalize;
}

/* Contact */
.contact-section {
    padding: 4rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input.error,
.form-group textarea.error {
    border-color: #dc2626;
}

.error-message {
    color: #dc2626;
    font-size: 0.8rem;
    min-height: 1rem;
}

.form-status {
    padding: 0.75rem;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-status.success {
    display: block;
    background: #dcfce7;
    color: #166534;
}

.form-status.error {
    display: block;
    background: #fef2f2;
    color: #991b1b;
}

.contact-info h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-item {
    margin-bottom: 1.5rem;
}

.info-item h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.info-item p {
    color: var(--color-text-light);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--color-primary);
    font-weight: 500;
}

/* Design Page */
.design-content {
    padding: 4rem 0;
}

.design-content h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--color-text);
    line-height: 1.3;
    text-align: center;
}

.design-content p {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
footer {
    background: var(--color-text);
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}

footer p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(4px);
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 0;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .logo {
        font-size: 1.1rem;
    }

    .hero-img {
        max-height: 300px;
    }

    .welcome-grid {
        grid-template-columns: 1fr;
    }

    .welcome-text h1 {
        font-size: 1.3rem;
        white-space: normal;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-image {
        text-align: center;
    }

    .bio-photo {
        max-width: 300px;
        margin: 0 auto;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .gallery-list {
        grid-template-columns: 1fr;
    }

    .nav-container {
        position: relative;
    }

    .dropdown-menu {
        position: static;
        background: transparent;
        backdrop-filter: none;
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
        min-width: auto;
        display: block;
        list-style: none;
    }

    .dropdown-menu li {
        padding-left: 1rem;
        list-style: none;
        border-bottom: none;
    }

    .dropdown-menu a {
        padding: 0.5rem 0;
    }

    .nav-dropdown:hover .dropdown-menu {
        display: block;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 0.95rem;
    }

    .hero-img {
        max-height: 200px;
    }

    .welcome-text h1 {
        font-size: 1.1rem;
    }

    .welcome-text p {
        font-size: 0.95rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-list {
        grid-template-columns: 1fr;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 0.75rem 1rem;
        font-size: 1.5rem;
    }
}
