/*
Theme Name: KS Build
Description: Custom dynamic multipage theme
Version: 1.0
*/

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html, body { 
    height: 100%; 
    font-family: Arial, sans-serif; 
}

body {
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

main, .site-main, .page-content, .content {
    flex: 1;
}

/* HEADER */
.site-header {
    width: 100vw;
    position: absolute;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15) !important;
    background: transparent !important;
    z-index: 1000;
}

.header-grid {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    align-items: center;
    justify-content: space-between;
}

.header-logo img {
    height: 120px;
    width: auto;
    margin-top: -20px;
    margin-bottom: -80px;
}

.header-logo a {
    display: block;
}

.header-nav ul {
    display: flex !important;
    justify-content: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 2rem;
}

.header-nav a {
    color: #e82727;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: block;
    white-space: nowrap;
}

.header-button {
    text-align: right;
}

.cta-button {
    background: #e82727;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
}

/* Hamburger - HIDDEN ON DESKTOP, VISIBLE ON MOBILE */
.hamburger-btn {
    display: none; /* Hidden by default (desktop) */
}

/* PAGE CONTENT & TEXT SECTIONS */
.text-section {
    padding: 4rem 0;
}

.text-section.alternate {
    background: #f8f9fa;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-section h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
}

.text-section h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.section-text {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
    font-size: 1.1rem;
    color: #555;
}

.section-text p {
    margin-bottom: 1rem;
}

.section-text .message-center {
    text-align: center;
}

.section-text p strong {
    color: #333;
}

/* FOOTER */
.site-footer {
    background: linear-gradient(to bottom, #b93f3f, #000);
    color: #ccc;
    margin-top: auto;
    flex-shrink: 0;
}

.footer-upper {
    padding: 3rem 2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.footer-links h4,
.footer-contact h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 1rem;
}

.footer-links a:hover,
.webmail-link {
    color: #ef3123;
}

.footer-contact p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.footer-contact a {
    color: #ef3123;
}

.mini-map {
    margin-top: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.mini-map iframe {
    border-radius: 10px;
    display: block;
    width: 100% !important;
    height: 200px !important;
}

.footer-copyright {
    background: #111;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
}

/* HERO SECTIONS */
.home-hero {
    position: relative;
    height: 80vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 0;
}

.about-hero,
.gallery-hero,
.projects-hero {
    position: relative;
    height: 60vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 0;
}

.about-hero {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -100;
}

.gallery-hero,
.projects-hero {
    /* Inherits height/display from above */
}

.hero-overlay {
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 1000px;
    width: 100%;
    padding: 0 2rem;
}

.home-hero .hero-content {
    /* Specific overrides preserved */
}

.hero-box {
    margin-bottom: 3rem;
}

.hero-box h1 {
    font-size: 4rem;
    color: white;
    margin: 0 0 1rem 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.hero-box p {
    font-size: 1.5rem;
    color: white;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.about-hero h1,
.gallery-hero .hero-content h1,
.projects-hero h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.about-hero h1 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 2px;
}

.gallery-hero .hero-content p {
    font-size: 1.3rem;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* SEARCH FORM */
.hero-search {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.search-form {
    display: flex;
    gap: 1rem;
    background: rgba(255,255,255,0.95);
    border-radius: 50px;
    padding: 0.5rem;
    backdrop-filter: blur(10px);
}

.search-input {
    flex: 1;
    padding: 1.2rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    outline: none;
}

.search-btn {
    background: #e82727;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    font-size: 1.2rem;
}

/* CONTACT PAGE */
.contact-hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: white;
    text-align: center;
    padding: 6rem 0;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.form-grid textarea { 
    grid-column: 1 / -1; 
}

.form-submit {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.contact-item h3 { 
    font-size: 1.5rem; 
    margin-bottom: 0.5rem; 
    color: #ed2323;
}

.contact-item {
    position: relative;
    text-align: center;
}

.contact-icon {
    width: 80px;
    height: 80px;
    display: block;
    margin: 0 auto 1rem;
}

/* FEATURED PLOTS */
.featured-plots {
    padding: 6rem 0;
    background: #f8f9fa;
}

.plots-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.plots-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.plots-title h2 {
    font-size: 2.5rem;
    color: #333;
    margin: 0 0 0.25rem 0;
}

.plots-title p {
    color: #e82727;
    font-size: 1.2rem;
    margin: 0;
    font-weight: 500;
}

.view-all-btn {
    background: #e82727;
    color: white;
    padding: 0.75rem 2rem;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1rem;
    white-space: nowrap;
    transition: all 0.3s;
}

.view-all-btn:hover {
    background: #d14444;
    transform: translateY(-2px);
}

.plots-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
    max-width: 1200px;
    margin: 0 auto;
}

.plot-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.plot-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.plot-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.plot-info {
    padding: 1.5rem;
}

.plot-info h3 {
    color: #e82727;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.plot-info p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.plot-btn {
    width: 100%;
    padding: 0.8rem;
    font-size: 0.95rem;
}

/* GALLERY */
.gallery-filters {
    padding: 3rem 0;
    background: #f8f9fa;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.filter-btn {
    background: white;
    border: 2px solid #e85656;
    color: #e85656;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn.active,
.filter-btn:hover {
    background: #e85656;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(232,86,86,0.3);
}

.gallery-grid-section {
    padding: 6rem 0;
    background: white;
}

.gallery-grid-section .container {
    max-width: 1400px;
}

.gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem !important;
    grid-auto-rows: 250px;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    opacity: 1;
    transform: scale(1);
    transition: all 0.4s ease;
    cursor: pointer;
    align-self: stretch;
}

.gallery-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

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

/* PROJECTS */
.projects-listing { 
    padding: 6rem 0; 
    background: #f8f9fa; 
}

.projects-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 3rem; 
}

.projects-sort h2 { 
    margin: 0; 
    color: #333; 
}

.sort-select { 
    padding: 0.5rem 1rem; 
    border: 2px solid #e85656; 
    border-radius: 25px; 
    background: white; 
}

.projects-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
    gap: 2rem; 
}

.project-card { 
    background: white; 
    border-radius: 20px; 
    overflow: hidden; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.1); 
    transition: all 0.3s; 
}

.project-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 60px rgba(0,0,0,0.15); 
}

.project-image { 
    height: 250px; 
    background-size: cover; 
    background-position: center; 
}

.project-info { 
    padding: 2rem; 
}

.project-tags .tag { 
    background: #e85656; 
    color: white; 
    padding: 0.3rem 0.8rem; 
    border-radius: 15px; 
    font-size: 0.8rem; 
}

.project-info h3 { 
    color: #333; 
    margin: 1rem 0 0.5rem 0; 
}

.project-location { 
    color: #666; 
    margin-bottom: 1rem; 
}

.project-year { 
    font-size: 1rem; 
    font-weight: bold; 
    color: #e85656; 
    margin-bottom: 2rem; 
}

.project-features { 
    display: flex; 
    gap: 1rem; 
    margin-bottom: 1.5rem; 
}

.project-features span { 
    background: #f8f9fa; 
    padding: 0.3rem 0.8rem; 
    border-radius: 15px; 
    font-size: 0.85rem; 
}

.project-btn { 
    width: 100%; 
    padding: 1rem; 
}

/* MEDIA QUERIES - MOBILE & RESPONSIVE */
@media (max-width: 1100px) {
    .plots-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    
    .header-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
        padding: 0.75rem 1rem;
    }
    
    .header-nav ul {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form-grid { 
        grid-template-columns: 1fr; 
    }
    
    .contact-hero h1 { 
        font-size: 2.2rem; 
    }
    
    .about-hero {
        height: 50vh;
        background-attachment: scroll;
    }
    
    .about-hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-box h1 { 
        font-size: 2.5rem; 
    }
    
    .hero-box p { 
        font-size: 1.2rem; 
    }
    
    .search-form { 
        flex-direction: column; 
    }
    
    .plots-grid { 
        grid-template-columns: 1fr !important; 
    }
    
    .plots-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left;
    }
    
    .gallery-hero .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .gallery-hero .hero-content p {
        font-size: 1.1rem;
    }
    
    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
    }
    
    .filter-btn {
        flex-shrink: 0;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }
    
    .projects-grid { 
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid-section {
        padding: 3rem 0;
    }
}

@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 1100px) {
    .header-button {
        display: none !important;
    }
    
}

@media (max-width: 1024px) {
    .header-logo img {
        height: 72px !important;
        margin-top: -12px !important;
        margin-bottom: -48px !important;
    }
    
    .header-logo {
        position: relative;
        z-index: 1003;
    }
    
    /* Show hamburger ONLY below 1024px */
    .hamburger-btn {
        display: block;
        width: 30px;
        height: 30px;
        background: none;
        border: none;
        cursor: pointer;
        position: relative;
        z-index: 1002;
        padding: 0;
        grid-column: 1 / -1; /* Full width in grid */
        justify-self: center;
    }
    
    .hamburger-btn span {
        display: block;
        height: 3px;
        width: 25px;
        background: #e82727;
        margin: 5px 0;
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    
    /* Hide nav by default on mobile */
    .header-nav {
        display: none;
    }
    
    /* Mobile menu overlay */
    .header-nav.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(10px);
        box-shadow: 0 10px 40px rgba(0,0,0,0.2);
        z-index: 1001;
    }
    
    .header-nav.active ul {
        flex-direction: column !important;
        gap: 0rem;
        text-align: center;
        padding: 0;
    }

    .header-nav.active a {
        padding: 1rem;
        font-size: 1.2rem;
        border-top: 1px solid #e82727; /* Red top border */
    }
    
    .header-nav.active ul li:first-child a {
        border-top: none;
    }

    .header-nav.active a:hover {
        background: #e82727 !important;
        color: white !important;
        transition: all 0.3s ease;
    }
}
