/* Zihua Roofs Society - Warm & Practical Hope Theme */
:root {
    /* Color Palette */
    --primary: #C84C09; /* Terra Cotta / Rust - representing clay roofs */
    --primary-dark: #9A3A05;
    --primary-light: #FCE8E0;
    
    --secondary: #4DA8DA; /* Sky Blue - representing hope & clear horizons */
    --secondary-dark: #2B87B8;
    
    --neutral-bg: #F5E6CA; /* Warm Beige / Sand - representing the ground */
    --white: #FFFFFF;
    --off-white: #FAF9F6;
    --text-dark: #2C3E50;
    --text-light: #546E7A;
    --border-color: #E0D4C3;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;
    
    /* Typography */
    --font-heading: 'Nunito', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

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

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--off-white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    line-height: 1.3;
}

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

a:hover {
    color: var(--primary-dark);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.top-bar {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 10px 0;
    font-size: 0.9em;
}

.top-bar .container {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.top-link {
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 5px;
}

.main-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--secondary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 5px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-color: var(--secondary); /* Fallback */
    color: var(--white);
    text-align: center;
    padding: 100px 20px;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.2s, background-color 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
}

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

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

/* Section Styles */
.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--neutral-bg);
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--secondary);
    margin: 15px auto 0;
}

/* Cards */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
}

.card-img {
    height: 200px;
    background-color: #ddd;
    overflow: hidden;
}

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

.card-content {
    padding: 25px;
}

.card-title {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

/* About Preview */
.about-preview {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-img {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-img img {
    width: 100%;
    display: block;
}

.about-text {
    flex: 1;
}

/* Footer */
.main-footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: auto;
}

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

.footer-col h3 {
    color: var(--secondary);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-col p, .footer-col li {
    color: #ccc;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

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

.footer-links a {
    color: #ccc;
}

.footer-links a:hover {
    color: var(--secondary);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #888;
    font-size: 0.85rem;
}

/* Contact Form */
.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
        color: var(--primary);
    }

    .about-preview {
        flex-direction: column;
    }

    .hero h1 {
        font-size: 2.2rem;
    }
}
