/* Sahakari Co-operative Website Styles */

:root {
    --primary-color: #198754;
    --secondary-color: #146c43;
    --accent-color: #ffc107;
    --danger-color: #dc3545;
    --warning-color: #fd7e14;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gradient-primary: linear-gradient(135deg, #198754 0%, #0f5132 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #d4edda 0%, #b8dacc 100%);
    overflow-x: hidden;
}

/* Bootstrap Primary Overrides (Green Theme) */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #146c43;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.btn-outline-primary:hover {
    background: var(--primary-color) !important;
    color: white !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

/* Navigation - dark green */
.navbar {
    background: linear-gradient(135deg, #0f5132 0%, #063d1f 100%) !important;
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
}

.navbar-brand img {
    transition: var(--transition);
}

.navbar-brand:hover img {
    transform: scale(1.1);
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
}

.navbar .nav-link i {
    width: 18px;
    text-align: left;
}

.navbar .dropdown-item {
    display: flex;
    align-items: center;
    font-size: 0.92rem;
}

/* Ensure right-side menu alignment */
.navbar .d-flex.justify-content-between > .navbar-collapse {
    margin-left: 0;
}

.navbar .d-flex.justify-content-between > .navbar-brand {
    order: 0;
}

/* Mobile: left-align menu items when collapsed */
@media (max-width: 991.98px) {
    .navbar .d-flex.justify-content-between > .navbar-collapse {
        margin-left: 0;
        order: 2;
    }
    .navbar-nav {
        text-align: left;
    }
}

.navbar .dropdown-item i {
    width: 18px;
    text-align: left;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    transform: translateY(-2px);
}

/* Hero Section - override body background */
.hero-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%) !important;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-slider {
    padding: 0;
}

.hero-slide {
    position: relative;
    min-height: 380px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.45) 45%, rgba(0,0,0,0.15) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 4rem 0;
}

.hero-slider .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next {
    width: 8%;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-section h1 {
    color: #1565c0;
    font-weight: 700;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
}

.hero-section p {
    color: #1976d2;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-section .btn-light {
    background: rgba(255, 255, 255, 0.9);
    color: #1565c0;
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-section .btn-light:hover {
    background: #ffffff;
    color: #1565c0;
    transform: translateY(-2px);
}

.hero-section .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: #1565c0;
    background: transparent;
}

.hero-section .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #1565c0;
    border-color: rgba(255, 255, 255, 0.7);
}
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-card {
    text-align: center;
    padding: 2rem 1rem;
    height: 100%;
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 2rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Buttons */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--secondary-color);
    color: white;
}

.btn-success:hover {
    background: #157347;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Forms */
.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    animation: slideInDown 0.5s ease;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeeba);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 5rem;
}

footer h5 {
    color: white;
    margin-bottom: 1.5rem;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: white;
    transform: translateX(5px);
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Gallery Styles */
.gallery-item {
    margin-bottom: 2rem;
}

.home-gallery-item {
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.home-gallery-thumb {
    height: 220px;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.home-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-card {
    overflow: hidden;
}

.gallery-image-container {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    cursor: pointer;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-image-container:hover .gallery-overlay {
    opacity: 1;
}

.gallery-image-container:hover .gallery-image {
    transform: scale(1.1);
}

/* Notice Styles */
.notice-card {
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.notice-card.urgent {
    border-left-color: var(--danger-color);
}

.notice-card.important {
    border-left-color: var(--warning-color);
}

.notice-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
    border-radius: var(--border-radius);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
        text-align: center;
    }

    .hero-slider {
        text-align: left;
    }

    .hero-slide {
        min-height: 320px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .service-card {
        margin-bottom: 2rem;
    }
    
    .gallery-item {
        margin-bottom: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .navbar,
    .sidebar,
    .btn,
    .modal,
    footer {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
.form-select:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

/* Footer enhancements */
.social-links a {
    font-size: 1.2rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.social-links a:hover {
    transform: translateY(-2px);
}

/* Social media brand colors */
.social-links .fa-facebook-f {
    color: #1877f2 !important;
}

.social-links .fa-facebook-f:hover {
    color: #0d5cd0 !important;
}

.social-links .fa-instagram {
    color: #e4405f !important;
}

.social-links .fa-instagram:hover {
    color: #d12d4a !important;
}

.social-links .fa-tiktok {
    color: #000000 !important;
}

.social-links .fa-tiktok:hover {
    color: #333333 !important;
}

.social-links .fa-youtube {
    color: #ff0000 !important;
}

.social-links .fa-youtube:hover {
    color: #cc0000 !important;
}

.social-links .fa-twitter {
    color: #1da1f2 !important;
}

.social-links .fa-twitter:hover {
    color: #1a91da !important;
}

.map-container iframe {
    border-radius: 8px;
}

.footer .list-unstyled a:hover {
    color: #28a745 !important;
    padding-left: 4px;
    transition: all 0.2s ease;
}

/* Green footer theme - override body background */
footer {
    background: linear-gradient(135deg, #d4edda 0%, #b8dacc 100%) !important;
}

/* Dark green copyright section - full width */
footer .text-center {
    background: #063d1f;
    padding: 1rem;
    margin: 1rem -3rem -1rem;
    position: relative;
}

@media (min-width: 768px) {
    footer .text-center {
        margin: 1rem -4.5rem -1rem;
    }
}

@media (min-width: 992px) {
    footer .text-center {
        margin: 1rem -7.5rem -1rem;
    }
}

@media (min-width: 1200px) {
    footer .text-center {
        margin: 1rem -9rem -1rem;
    }
}

@media (min-width: 1400px) {
    footer .text-center {
        margin: 1rem -10.5rem -1rem;
    }
}

footer .text-center p {
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 0.25rem;
}

footer .text-center a {
    color: rgba(255, 255, 255, 0.85) !important;
}

footer .text-center a:hover {
    color: #ffffff !important;
}

/* Text colors for light green footer */
footer h5 {
    color: #0f5132 !important;
}

footer .text-muted {
    color: #155724 !important;
}

footer address p {
    color: #155724 !important;
}

footer .social-links a {
    color: rgba(15, 81, 50, 0.8) !important;
}

footer .social-links a:hover {
    color: #0f5132 !important;
}

footer .footer-links-horizontal a {
    color: #0f5132 !important;
}

footer .footer-links-horizontal a:hover {
    color: #063d1f !important;
}

/* Horizontal footer links */
.footer-links-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
}

.footer-links-horizontal a {
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.footer-links-horizontal a:hover {
    transform: translateY(-1px);
}
