/*
 * /projects/ecoADDRESS/css/layout.css
 * Hero banner, main layout, map, search controls, loading spinner, footer
 */


/* ================================================================
   HERO BANNER
   ================================================================ */

#hero {
    position: relative;
    width: 100%;
}

#hero img {
    width: 100%;
    height: auto;
    display: block;
}


/* ================================================================
   MAIN LAYOUT
   ================================================================ */

#app {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.5rem 2rem 3rem;
}


/* ================================================================
   MAP — full width on top
   ================================================================ */

#map-container {
    position: relative;
    width: 100%;
    height: 480px;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
    border: 2px solid var(--panel-identity-border);
    border-top: none;
    margin-bottom: 1rem;
}

#map {
    width: 100%;
    height: 100%;
}


/* ================================================================
   SEARCH — full-width bar above map
   ================================================================ */

#search-container {
    position: relative;
    width: 100%;
}

#place-search {
    width: 100%;
    padding: 0.65rem 1rem;
    font-family: var(--font-data);
    font-size: 1rem;
    border: 2px solid var(--panel-identity-border);
    border-radius: 6px 6px 0 0;
    background: var(--card-bg);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

#place-search:focus {
    border-color: var(--panel-identity-accent);
}

#place-search::placeholder {
    color: var(--text-muted);
}

/* Search results dropdown */
#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 2px solid var(--panel-identity-border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    z-index: 100;
    max-height: 320px;
    overflow-y: auto;
    box-shadow: 0 4px 12px var(--card-shadow);
}

.search-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #EDE5D4;
    font-family: var(--font-data);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: background 0.15s;
}

.search-item:hover {
    background: #EDE5D4;
}

.search-item .search-source {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 0.5rem;
}


/* ================================================================
   COORDINATE CONTROLS — below map
   ================================================================ */

#search-controls-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Coordinate inputs */
#controls {
    margin-bottom: 0.5rem;
}

#coord-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

#coord-input label {
    font-family: var(--font-data);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#coord-input input[type="number"] {
    width: 110px;
    padding: 0.45rem 0.6rem;
    font-family: var(--font-data);
    font-size: 0.9rem;
    border: 2px solid var(--panel-identity-border);
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--text-primary);
    outline: none;
}

#coord-input input[type="number"]:focus {
    border-color: var(--panel-identity-accent);
}

#coord-input button {
    padding: 0.45rem 0.9rem;
    font-family: var(--font-data);
    font-size: 0.85rem;
    font-weight: 600;
    border: 2px solid var(--panel-living-accent);
    background: var(--panel-living-accent);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

#coord-input button:hover {
    background: #3A6A3A;
}

#instructions {
    font-family: var(--font-data);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}


/* ================================================================
   LOADING
   ================================================================ */

#loading {
    text-align: center;
    padding: 3rem 1rem;
}

#loading p {
    font-family: var(--font-data);
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #DDD6C8;
    border-top-color: var(--panel-living-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ================================================================
   NAVIGATION BAR — below hero
   ================================================================ */

#site-nav {
    background: var(--text-primary);
}

.nav-container {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 2rem;
}

.nav-link {
    font-family: var(--font-data);
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.7rem 1.2rem;
    transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: #fff;
    border-bottom: 2px solid var(--panel-living-accent);
}


/* ================================================================
   FOOTER — project grid + copyright
   ================================================================ */

#site-footer {
    background: var(--text-primary);
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2rem;
}

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

.footer-mark {
    text-align: center;
    margin-bottom: 1.5rem;
}

.footer-mark img {
    height: 80px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer-mark img:hover {
    opacity: 1;
}

.footer-projects {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.footer-project {
    display: block;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.footer-project:hover {
    background: rgba(255, 255, 255, 0.1);
}

.footer-project-name {
    font-family: var(--font-data);
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.15rem;
}

.footer-project-desc {
    font-family: var(--font-data);
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
}

.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin-bottom: 1.5rem;
}

.footer-copyright {
    text-align: center;
    margin-bottom: 1rem;
}

.footer-copyright p {
    font-family: var(--font-data);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.25rem;
}

.footer-copyright a {
    color: var(--panel-living-accent);
    text-decoration: none;
}

.footer-copyright a:hover {
    text-decoration: underline;
}

.footer-license {
    font-size: 0.6rem;
}

.footer-green {
    text-align: center;
}

.footer-green p {
    font-family: var(--font-data);
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.5;
}


/* ================================================================
   PAGE CONTENT — About, Contact, etc.
   ================================================================ */

.about-hero-image {
    max-width: 700px;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.about-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.page-content {
    margin-bottom: 1.5rem;
}

.page-heading {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.page-content p {
    font-family: var(--font-data);
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 0.75rem;
    max-width: 700px;
}

.page-content strong {
    color: var(--text-primary);
}

.about-content a {
    color: var(--panel-living-accent);
    text-decoration: none;
}

.about-content a:hover {
    text-decoration: underline;
}

.about-content em {
    font-style: italic;
    color: var(--text-primary);
}

.about-cheer {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--panel-living-accent);
    margin-top: 0;
    margin-bottom: 0.25rem;
}

.about-signoff {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-top: 2rem;
}

.about-mark {
    height: 120px;
    width: auto;
}


/* ================================================================
   CONTACT FORM
   ================================================================ */

.contact-form {
    max-width: 600px;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-family: var(--font-data);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.3rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.9rem;
    font-family: var(--font-data);
    font-size: 0.88rem;
    color: var(--text-primary);
    background: var(--card-bg);
    border: 2px solid var(--panel-identity-border);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--panel-identity-accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}

.form-submit {
    font-family: var(--font-data);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    background: var(--panel-living-accent);
    color: #fff;
    border: 2px solid var(--panel-living-accent);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.form-submit:hover {
    background: #3A6A3A;
}

.form-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Success / Error messages */
.form-message {
    max-width: 600px;
    padding: 0.8rem 1.2rem;
    border-radius: 6px;
    font-family: var(--font-data);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.form-success {
    background: #E8F5E9;
    border: 2px solid var(--panel-living-border);
    color: #2E5A2E;
}

.form-error {
    background: #FFF3E0;
    border: 2px solid #D4A76A;
    color: #8B4513;
}