/* ==================== GENERAL STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8B7355;
    --secondary-color: #D4A574;
    --accent-color: #C19A6B;
    --dark-color: #5C4033;
    --light-color: #F5E6D3;
    --text-color: #333;
    --border-color: #D4A574;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Garamond', serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #FDFAF5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== HEADER ==================== */
.header {
    background: linear-gradient(135deg, #8B6F47 0%, #A0826D 100%);
    color: white;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(0,0,0,.03) 2px,
            rgba(0,0,0,.03) 4px
        );
    z-index: 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.header-text {
    flex: 1;
    animation: slideInLeft 1s ease;
}

.header-title {
    font-size: 4em;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-style: italic;
}

.header-subtitle {
    font-size: 1.5em;
    font-weight: normal;
    opacity: 0.95;
}

.header-image {
    flex: 0 0 300px;
    margin-left: 40px;
}

.header-img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border: 8px solid var(--light-color);
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    .header-title {
        font-size: 2.5em;
    }
    .header-image {
        margin-left: 0;
        margin-top: 20px;
    }
}

/* ==================== NAVIGATION ==================== */
.navbar {
    background-color: var(--primary-color);
    border-bottom: 3px solid var(--accent-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.nav-link:hover {
    background-color: var(--secondary-color);
    color: var(--dark-color);
    transform: translateY(-2px);
}

/* ==================== WELCOME SECTION ==================== */
.welcome-section {
    background: linear-gradient(to bottom, var(--light-color), white);
    padding: 40px 20px;
    border-bottom: 2px dashed var(--border-color);
}

.welcome-box {
    background: white;
    border: 3px solid var(--secondary-color);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.welcome-box h2 {
    color: var(--primary-color);
    font-size: 2em;
    margin-bottom: 20px;
}

.welcome-box p {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--text-color);
}

/* ==================== BUTTONS ==================== */
.btn-primary, .btn-secondary, .btn-audio {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1em;
}

.btn-primary:hover, .btn-secondary:hover, .btn-audio:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: var(--accent-color);
}

/* ==================== SECTIONS ==================== */
.section-title {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 10px;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, var(--secondary-color), var(--primary-color), var(--secondary-color));
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

main {
    background: #FDFAF5;
}

/* ==================== WORKS SECTION ==================== */
.works-section {
    padding: 60px 20px;
    background: linear-gradient(to bottom, white, var(--light-color));
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.work-item {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.work-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.work-image {
    background: var(--light-color);
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.work-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-item h3 {
    color: var(--primary-color);
    padding: 20px 15px 10px;
    font-size: 1.5em;
}

.work-year {
    color: #888;
    padding: 0 15px 10px;
    font-size: 0.95em;
    font-style: italic;
}

.work-desc {
    color: #666;
    padding: 0 15px 15px;
    font-size: 0.9em;
    line-height: 1.4;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== BIOGRAPHY SECTION ==================== */
.biography-section {
    padding: 60px 20px;
    background: white;
}

.bio-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.bio-left h2 {
    color: var(--primary-color);
    font-size: 2em;
    margin-bottom: 20px;
}

.bio-left p {
    font-size: 1.05em;
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
    text-align: justify;
}

.bio-right {
    background: linear-gradient(135deg, var(--light-color), white);
    padding: 30px;
    border-left: 4px solid var(--secondary-color);
}

.timeline-brief h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.timeline-list {
    list-style: none;
}

.timeline-list li {
    padding: 12px 0;
    padding-left: 20px;
    border-left: 3px solid var(--accent-color);
    margin-left: 10px;
    position: relative;
}

.timeline-list li::before {
    content: '●';
    position: absolute;
    left: -10px;
    color: var(--secondary-color);
    font-size: 1.2em;
}

@media (max-width: 768px) {
    .bio-content {
        grid-template-columns: 1fr;
    }
}

/* ==================== QUOTES SECTION ==================== */
.quotes-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--light-color), white);
}

.quotes-carousel {
    background: white;
    border: 3px dashed var(--secondary-color);
    border-radius: 8px;
    padding: 40px;
    max-width: 900px;
    margin: 40px auto;
    position: relative;
    text-align: center;
}

.quote-text {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-style: italic;
    line-height: 1.6;
}

.quote-author {
    color: #888;
    font-size: 1.1em;
    display: block;
}

.quote-nav {
    background: var(--secondary-color);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.quote-prev {
    left: 20px;
}

.quote-next {
    right: 20px;
}

.quote-nav:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

/* ==================== GALLERY SECTION ==================== */
.gallery-section {
    padding: 60px 20px;
    background: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    aspect-ratio: 1;
    background: var(--light-color);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

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

.gallery-overlay h3 {
    font-size: 1.2em;
}

/* ==================== VIDEO SECTION ==================== */
.video-section {
    padding: 60px 20px;
    background: linear-gradient(to bottom, var(--light-color), white);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.video-placeholder {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
}

.video-placeholder:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.video-placeholder i {
    font-size: 3em;
    margin-bottom: 10px;
}

.video-placeholder p {
    font-size: 1.2em;
}

/* ==================== TEST SECTION ==================== */
.test-section {
    padding: 60px 20px;
    background: white;
}

.test-content {
    max-width: 700px;
    margin: 40px auto;
    background: var(--light-color);
    padding: 30px;
    border-radius: 8px;
    border: 2px solid var(--secondary-color);
}

.test-question {
    margin-bottom: 30px;
}

.test-question p {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.test-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.test-options label {
    display: flex;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.test-options label:hover {
    background: var(--secondary-color);
    color: white;
}

.test-options input[type="radio"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ==================== RESOURCES SECTION ==================== */
.resources-section {
    padding: 60px 20px;
    background: linear-gradient(to bottom, white, var(--light-color));
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.resource-item {
    background: white;
    padding: 30px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.resource-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.resource-item i {
    font-size: 2.5em;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.resource-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.resource-item p {
    color: #666;
}

.resource-list {
    list-style: none;
    margin-top: 15px;
    text-align: left;
}

.resource-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.resource-list li:last-child {
    border-bottom: none;
}

.resource-list a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.resource-list a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* ==================== AUDIO SECTION ==================== */
.audio-section {
    padding: 60px 20px;
    background: white;
}

.audio-content {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.audio-item {
    background: linear-gradient(135deg, var(--light-color), white);
    border: 3px solid var(--secondary-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
}

.audio-icon {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.audio-item h3 {
    color: var(--primary-color);
    font-size: 1.5em;
    margin-bottom: 10px;
}

.audio-item p {
    color: #666;
    margin-bottom: 20px;
}

/* ==================== MAP SECTION ==================== */
.map-section {
    padding: 60px 20px;
    background: linear-gradient(to bottom, var(--light-color), white);
}

.map-container {
    margin-top: 40px;
}

.map-placeholder {
    background: linear-gradient(135deg, #E8DCC4, #D4C5B0);
    border: 3px solid var(--secondary-color);
    border-radius: 8px;
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2em;
}

.map-placeholder i {
    font-size: 3em;
    margin-bottom: 15px;
}

/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 50px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.footer-section p {
    margin-bottom: 15px;
}

.contact-list {
    list-style: none;
}

.contact-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-list a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-list a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.social-link:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-menu {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-menu a:hover {
    color: white;
}

.footer-bottom {
    border-top: 2px solid var(--secondary-color);
    padding-top: 20px;
    text-align: center;
    color: #AAA;
}

/* ==================== CAROUSEL STYLES ==================== */
.welcome-carousel {
    position: relative;
}

.carousel-item {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.carousel-item.active {
    display: block;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 16px;
    font-size: 1.3em;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-nav:hover {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

.carousel-dots {
    text-align: center;
    padding-top: 20px;
}

.dot {
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: #D4A574;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot:hover {
    background-color: #8B7355;
}

/* ==================== WORK MODAL ==================== */
.work-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow-y: auto;
}

.work-modal-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
}

.work-modal .close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2em;
    cursor: pointer;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.work-modal .close:hover {
    color: red;
}

.work-modal h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.work-meta {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.work-description {
    line-height: 1.8;
    color: #333;
    margin-bottom: 25px;
    max-height: 400px;
    overflow-y: auto;
}

/* ==================== RESOURCE MODAL ==================== */
.resource-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.resource-modal-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.resource-modal .close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2em;
    cursor: pointer;
    color: var(--primary-color);
}

.resource-modal h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.resource-modal ul {
    list-style-position: inside;
    line-height: 2;
    color: #333;
}

.resource-modal li {
    margin-bottom: 10px;
    padding-left: 10px;
}

/* ==================== AUDIO MODAL ==================== */
.audio-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.audio-modal-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
}

.audio-modal .close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2em;
    cursor: pointer;
    color: var(--primary-color);
}

.audio-modal h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* ==================== BUTTON STYLES ==================== */
.btn-read {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    margin-top: auto;
    margin-bottom: 20px;
    align-self: center;
}

.btn-read:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

.btn-resource {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.btn-resource:hover {
    background-color: var(--primary-color);
}

.btn-audio {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin: 8px;
    transition: all 0.3s ease;
}

.btn-audio:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

.audio-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin: 8px;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    text-align: left;
}

.audio-btn:hover {
    background-color: var(--primary-color);
}

.audio-player {
    margin-top: 20px;
}

.test-submit {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    margin-top: 20px;
}

.map-info {
    margin-top: 30px;
    padding: 20px;
    background: var(--light-color);
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.map-info h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* ==================== ANIMATIONS ==================== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-title {
        font-size: 2.5em;
    }

    .header-image {
        margin-left: 0;
        margin-top: 20px;
    }

    .nav-menu {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .section-title {
        font-size: 1.8em;
    }

    .quote-nav {
        display: none;
    }

    .works-grid,
    .gallery-grid,
    .video-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 1.8em;
    }

    .welcome-box {
        padding: 20px;
    }

    .section-title {
        font-size: 1.5em;
    }
}
