/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0A5C36;
    --secondary-color: #D4AF37;
    --accent-color: #1a936f;
    --light-green: #f0f9f3;
    --dark-green: #084629;
    --text-dark: #333;
    --text-medium: #555;
    --text-light: #666;
    --gray-light: #f9f9f9;
    --gray-medium: #ddd;
    --white: #fff;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--gray-light);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== SKIP TO MAIN CONTENT ===== */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 0 0 5px 5px;
    z-index: 1001;
    transition: top 0.3s;
}

.skip-to-main:focus {
    top: 0;
    outline: 3px solid var(--secondary-color);
}

/* ===== HEADER ===== */
.main-header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.logo:hover img {
    transform: scale(1.05);
}

.logo h1 {
    font-family: 'Amiri', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo span {
    color: var(--secondary-color);
}

/* ===== NAVIGATION ===== */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-medium);
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 12px;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.main-nav a:hover {
    color: var(--primary-color);
    background-color: var(--light-green);
}

.main-nav a.active {
    color: var(--white);
    background-color: var(--primary-color);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
}

.admin-btn {
    background-color: var(--secondary-color) !important;
    color: var(--white) !important;
}

.admin-btn:hover {
    background-color: #c19b2a !important;
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: var(--transition);
}

.menu-toggle:hover {
    background-color: var(--light-green);
}

.menu-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background-color: var(--dark-green);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(10, 92, 54, 0.2);
}

.btn:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.btn:active {
    transform: translateY(-1px);
}

.btn.secondary {
    background-color: var(--secondary-color);
}

.btn.secondary:hover {
    background-color: #c19b2a;
}

.btn.large {
    padding: 15px 35px;
    font-size: 1.1rem;
}

.btn.outline-btn {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn.outline-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn.update-btn {
    background-color: var(--accent-color);
}

.btn.update-btn:hover {
    background-color: #168a6b;
}

.btn.secondary-btn {
    background-color: #6c757d;
    border: none;
}

.btn.secondary-btn:hover {
    background-color: #5a6268;
}

/* ===== LOADING STATES ===== */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 5px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 300px;
}

.toast-error {
    background: #f44336;
}

.toast-success {
    background: #4CAF50;
}

.toast-info {
    background: #2196F3;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-medium);
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--gray-medium);
    border-radius: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10, 92, 54, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #f44336;
}

.error-message {
    color: #f44336;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

/* ===== FOOTER ===== */
.main-footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #ddd;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-col ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-col p {
    color: #ddd;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col .logo {
    margin-bottom: 15px;
}

.footer-col .logo h3 {
    color: var(--white);
    font-size: 1.5rem;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.social-icons a:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.main-footer hr {
    border: none;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 30px 0;
}

.footer-bottom {
    text-align: center;
    color: #aaa;
    font-size: 0.9rem;
    padding-top: 20px;
}

/* ===== PROGRESS BAR COMMON ===== */
.progress-bar {
    height: 25px;
    background-color: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 12px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 50px 50px;
    animation: move 2s linear infinite;
}

@keyframes move {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 50px 50px;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .container {
        max-width: 960px;
    }
}

@media (max-width: 768px) {
    .main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        padding: 20px;
        border-top: 2px solid var(--primary-color);
        z-index: 999;
    }

    .main-nav.active ul {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .logo img {
        height: 40px;
    }
    
    .progress-bar {
        height: 20px;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-col ul li a:hover {
        padding-left: 0;
    }

    .container {
        padding: 0 15px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    .btn.large {
        padding: 12px 25px;
    }
}