/* Global Styles */
:root {
    --primary-color: #5d4037;  /* Rich brown */
    --secondary-color: #8d6e63;  /* Lighter brown */
    --accent-color: #a1887f;  /* Soft brown accent */
    --text-color: #333;
    --light-gray: #f9f5f2;  /* Warm off-white */
    --white: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--light-gray);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.8rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
}

.btn {
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
    padding: 12px 28px;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(93, 64, 55, 0.2);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 28px;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(93, 64, 55, 0.2);
}

/* Navigation */
.navbar {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
}

.logo-img {
    height: 50px;
    width: auto;
    margin-right: 12px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.logo-link:hover .logo-text {
    color: var(--secondary-color);
}

/* Responsive logo adjustments */
@media (max-width: 768px) {
    .logo-text {
        display: none;
    }
    
    .logo-img {
        height: 40px;
        margin-right: 0;
    }
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

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

.nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    position: relative;
}

/* User Profile Styles */
.user-profile {
    position: relative;
    margin-right: 10px;
    cursor: pointer;
}

.user-profile:hover .user-dropdown {
    display: block;
}

#userGreeting {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: #f0f0f0;
    border-radius: 20px;
    font-weight: 500;
}

#userGreeting::before {
    content: '👤';
    margin-right: 8px;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown a {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

.user-dropdown a:hover {
    background-color: #f5f5f5;
}

.user-dropdown a:not(:last-child) {
    border-bottom: 1px solid #eee;
}

/* Hide login button when user is logged in */
body.logged-in #loginBtn {
    display: none;
}

/* Show user profile when logged in */
body.logged-in #userProfile {
    display: block !important;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), 
                url('images/engraving-hero.jpg') no-repeat center center/cover;
    height: 90vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

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

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

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

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

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

/* Featured Goats */
.featured-items {
    padding: 100px 0;
    background-color: var(--light-gray);
}

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

.item-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.item-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
}

.item-card h3 {
    padding: 20px 20px 10px;
    font-size: 1.3rem;
    margin: 0;
}

.item-card p {
    padding: 0 20px;
    color: #666;
    flex-grow: 1;
    margin: 0 0 15px;
}

.price {
    display: block;
    padding: 0 20px 20px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.view-all:hover {
    color: var(--secondary-color);
    gap: 10px;
}

.featured-goats h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.2rem;
    color: var(--primary-color);
}

.goat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

/* Verification Badge */
.verification-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.document-badges {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.document-badge {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: help;
    position: relative;
    transition: all 0.2s;
}

.document-badge:hover {
    transform: scale(1.1);
    background: #4CAF50;
}

.document-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    margin-bottom: 5px;
}

.document-badge:hover::after {
    opacity: 1;
    visibility: visible;
}

.goat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
    position: relative;
}

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

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

.goat-info {
    padding: 20px;
}

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

.price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.location {
    color: #666;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Value Proposition */
.value-prop {
    padding: 100px 0;
    background-color: var(--white);
}

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

.value-card {
    background: var(--white);
    padding: 30px 25px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.value-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background-color: rgba(93, 64, 55, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--primary-color);
    transition: var(--transition);
}

.value-card:hover .value-icon {
    background-color: var(--primary-color);
    color: white;
    transform: rotateY(180deg);
}

.value-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.value-card p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

.value-prop h2 {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 50px;
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.value-card {
    background: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.value-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    transition: all 0.3s ease;
}

.value-card:hover .value-icon {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.value-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.value-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* CTA Section */
.cta {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 60px 20px;
}

.cta h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
footer {
    background-color: #222;
    color: var(--white);
    padding: 60px 0 20px;
}

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

.footer-section h3, 
.footer-section h4 {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-section p, 
.footer-section a {
    color: #bbb;
    text-decoration: none;
    margin-bottom: 10px;
    display: block;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-section i {
    margin-right: 10px;
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #bbb;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero {
        height: 70vh;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .goat-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-actions {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero {
        height: 60vh;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
    }
}
