/* InTouch Foundation Redesign
   Kai Askey - COMM1730 Interface Design
   Brand colours kept from original site (green / black / grey)
   Contrast adjusted to meet WCAG AA */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
    background-color: #ffffff;
    line-height: 1.6;
}

/* skip link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #1a1a1a;
    color: white;
    padding: 8px 16px;
    z-index: 100;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* header - black like the original */
.site-header {
    background-color: #1a1a1a;
    color: white;
    padding: 16px 0;
    border-bottom: 4px solid #2d6a3e;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.logo {
    color: white;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
}

.logo span {
    color: #6fb380;
}

/* main nav */
.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 14px;
    display: inline-block;
    font-weight: 500;
    border-radius: 4px;
}

.main-nav a:hover,
.main-nav a:focus {
    background-color: #2d6a3e;
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.main-nav a.current {
    background-color: #2d6a3e;
}

/* hero with image */
.hero {
    position: relative;
    background-color: #1a1a1a;
    color: white;
    overflow: hidden;
    min-height: 460px;
    display: flex;
    align-items: center;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(26,26,26,0.7) 0%, rgba(26,26,26,0.5) 100%);
    z-index: 2;
}

.hero-inner {
    position: relative;
    z-index: 3;
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    line-height: 1.2;
    color: #ffffff;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 28px;
    color: #f0f0f0;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    border: 2px solid transparent;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background-color: #2d6a3e;
    color: white;
    border-color: #2d6a3e;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #1f4a2c;
    border-color: #ffffff;
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.btn-secondary {
    background-color: #ffffff;
    color: #1a1a1a;
    border-color: #1a1a1a;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #1a1a1a;
    color: #ffffff;
    outline: 2px solid #2d6a3e;
    outline-offset: 2px;
}

/* main content sections */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

section {
    margin-bottom: 48px;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 16px;
    color: #1a1a1a;
}

h2 {
    font-size: 1.7rem;
    margin-bottom: 16px;
    color: #1a1a1a;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    margin-top: 24px;
    color: #1a1a1a;
}

p {
    margin-bottom: 16px;
}

a {
    color: #1f4a2c;
    font-weight: 500;
}

a:hover,
a:focus {
    color: #1a1a1a;
}

/* mission box */
.mission-box {
    background-color: #f0f5f1;
    border-left: 6px solid #2d6a3e;
    padding: 24px 28px;
    margin-bottom: 40px;
    border-radius: 4px;
}

.mission-box h2 {
    margin-bottom: 12px;
}

.mission-box p {
    margin-bottom: 0;
}

/* info card grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 32px;
}

@media (min-width: 700px) {
    .info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.info-card {
    border: 2px solid #1a1a1a;
    padding: 24px;
    border-radius: 4px;
    background-color: #ffffff;
}

.info-card h3 {
    margin-top: 0;
}

.info-card .icon-text {
    display: inline-block;
    background-color: #2d6a3e;
    color: white;
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 3px;
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* kitchen times table */
.times-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    background: white;
}

.times-table th,
.times-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #c8ccc8;
}

.times-table th {
    background-color: #1a1a1a;
    color: white;
    font-weight: 600;
}

.times-table tr:nth-child(even) td {
    background-color: #f4f5f3;
}

/* two column */
.two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

@media (min-width: 800px) {
    .two-col {
        grid-template-columns: 2fr 1fr;
    }
}

.aside-box {
    background-color: #f4f5f3;
    padding: 24px;
    border-radius: 4px;
    border-top: 4px solid #2d6a3e;
}

.aside-box h3 {
    margin-top: 0;
}

.aside-box ul {
    margin-left: 20px;
    margin-bottom: 12px;
}

.aside-box li {
    margin-bottom: 8px;
}

/* page images on inner pages */
.page-image {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 24px;
    background-color: #c8ccc8;
}

/* form */
form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1a1a1a;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #1a1a1a;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background-color: white;
}

input:focus,
textarea:focus,
select:focus {
    outline: 3px solid #2d6a3e;
    outline-offset: 1px;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.required {
    color: #b54025;
}

/* contact details list */
.contact-details {
    list-style: none;
    margin-bottom: 24px;
}

.contact-details li {
    margin-bottom: 16px;
}

.contact-details strong {
    display: block;
    color: #1a1a1a;
    margin-bottom: 2px;
}

/* footer */
.site-footer {
    background-color: #1a1a1a;
    color: #d4d4d4;
    padding: 32px 20px;
    margin-top: 60px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 700px) {
    .footer-inner {
        grid-template-columns: repeat(3, 1fr);
    }
}

.site-footer h4 {
    color: white;
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.site-footer a {
    color: #6fb380;
}

.site-footer a:hover,
.site-footer a:focus {
    color: white;
}

.site-footer ul {
    list-style: none;
}

.site-footer li {
    margin-bottom: 6px;
}

.footer-bottom {
    max-width: 1100px;
    margin: 24px auto 0;
    padding-top: 20px;
    border-top: 1px solid #3a3a3a;
    font-size: 0.9rem;
    text-align: center;
}

/* responsive nav for narrow screens */
@media (max-width: 600px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .main-nav ul {
        width: 100%;
    }
    .main-nav a {
        padding: 8px 12px;
        font-size: 0.95rem;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .hero {
        min-height: 380px;
    }
    .hero-inner {
        padding: 40px 16px;
    }
}

/* back to top button */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: #2d6a3e;
    color: white;
    border: 2px solid white;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    display: none;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.back-to-top:hover,
.back-to-top:focus {
    background-color: #1f4a2c;
    outline: 2px solid #1a1a1a;
    outline-offset: 2px;
}

/* social links in footer */
.social-links {
    list-style: none;
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.social-links a {
    display: inline-block;
    padding: 6px 10px;
    background-color: #2d6a3e;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 600;
}

.social-links a:hover,
.social-links a:focus {
    background-color: #6fb380;
    color: #1a1a1a;
}

/* back to top button - smaller on mobile */
@media (max-width: 600px) {
    .back-to-top {
        padding: 8px 12px;
        font-size: 0.8rem;
        bottom: 16px;
        right: 16px;
    }
}

/* footer heading - styled to look like the old h4 since they're h2 for accessibility */
.site-footer .footer-heading {
    color: white;
    margin-bottom: 12px;
    font-size: 1.05rem;
    font-weight: 700;
}

/* sponsor list (replacement for inline style on donate page) */
.sponsor-list {
    margin-left: 20px;
    margin-bottom: 16px;
}

.sponsor-list li {
    margin-bottom: 6px;
}
