/* Custom styles for BuySanpete */

:root {
    --bs-primary: #2c5282;
    --bs-primary-rgb: 44, 82, 130;
    --bs-secondary: #718096;
    --bs-success: #38a169;
    --bs-warning: #d69e2e;
    --bs-danger: #e53e3e;
    --bs-info: #3182ce;
}

/* Typography */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: relative;
    z-index: 1030;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand img {
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.navbar-brand:hover img {
    transform: rotate(5deg);
}

.navbar-nav .nav-link {
    position: relative;
    transition: all 0.3s ease;
    font-weight: 500;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--bs-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* Dropdown Menu */
.dropdown-menu {
    z-index: 1040 !important;
    border: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
}

.dropdown-item {
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 2px 4px;
}

.dropdown-item:hover {
    background: var(--bs-primary);
    color: white;
    transform: translateX(5px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #4a90e2 100%);
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

.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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.5;
    z-index: 1;
}

.hero-section > .container {
    position: relative;
    z-index: 2;
}

.hero-visual {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-icon-group .bg-white {
    animation: pulse 4s ease-in-out infinite;
}

.hero-icon-group .bg-white:nth-child(1) { animation-delay: 0s; }
.hero-icon-group .bg-white:nth-child(2) { animation-delay: 0.5s; }
.hero-icon-group .bg-white:nth-child(3) { animation-delay: 1s; }

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Hero Image Display */
.hero-image-background {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease-in-out;
    animation: float 6s ease-in-out infinite;
}

.hero-image-overlay {
    backdrop-filter: blur(1px);
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

/* Hero Parallax Effects */
.hero-mascot-logo {
    transition: transform 0.3s ease;
    animation: mascotFloat 8s ease-in-out infinite;
}

.hero-mascot-logo:hover {
    transform: scaleX(-1) scale(1.1) rotate(5deg);
}

@keyframes mascotFloat {
    0%, 100% { 
        transform: scaleX(-1) translateY(0px) rotate(0deg); 
    }
    25% { 
        transform: scaleX(-1) translateY(-5px) rotate(1deg); 
    }
    50% { 
        transform: scaleX(-1) translateY(-8px) rotate(0deg); 
    }
    75% { 
        transform: scaleX(-1) translateY(-3px) rotate(-1deg); 
    }
}

.hero-logo-parallax {
    transition: transform 0.1s ease-out;
}

.parallax-element {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.parallax-icons .parallax-element:nth-child(1) {
    animation-delay: 0s;
}

.parallax-icons .parallax-element:nth-child(2) {
    animation-delay: 0.5s;
}

.parallax-icons .parallax-element:nth-child(3) {
    animation-delay: 1s;
}

/* Mobile parallax animation */

@keyframes mascotFloatMobile {
    0%, 100% { 
        transform: scaleX(-1) translateY(0px) rotate(0deg); 
    }
    50% { 
        transform: scaleX(-1) translateY(-5px) rotate(1deg); 
    }
}

.min-vh-50 {
    min-height: 50vh;
}

.hero-image-placeholder {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Search Section */
.search-form {
    border: 1px solid #e2e8f0;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.search-form .form-control,
.search-form .form-select {
    border: 2px solid transparent;
    background: rgba(255,255,255,0.9);
    transition: all 0.3s ease;
}

.search-form .form-control:focus,
.search-form .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(44, 82, 130, 0.15);
    background: #ffffff;
    transform: translateY(-1px);
}

.search-form .btn {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #4a90e2 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(44, 82, 130, 0.3);
}

.search-form .btn:hover {
    box-shadow: 0 6px 20px rgba(44, 82, 130, 0.4);
    transform: translateY(-2px);
}

/* Category Cards */
.category-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e2e8f0 !important;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

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

.category-icon i {
    transition: transform 0.3s ease;
}

.category-card:hover .category-icon i {
    transform: scale(1.1);
}

/* Listing Cards */
.listing-card {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.listing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.listing-image {
    position: relative;
    overflow: hidden;
}

/* Business Cards */
.business-card {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.business-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.business-logo {
    transition: transform 0.3s ease;
}

.business-card:hover .business-logo {
    transform: scale(1.05);
}

/* Featured Business Cards Enhanced Styling */
.business-card .card-body {
    min-height: 280px;
}

.business-card .card-title {
    color: #2d3748;
    font-size: 1.25rem;
    line-height: 1.3;
}

.business-card .business-meta {
    background: rgba(var(--bs-primary-rgb), 0.05);
    border-radius: 8px;
    padding: 12px;
    margin: 0 -4px;
}

.business-card .business-meta p {
    margin-bottom: 0.25rem !important;
}

.business-card .business-meta i {
    width: 16px;
    text-align: center;
}

.business-card .card-text {
    font-size: 0.9rem;
    color: #4a5568;
}

.business-card .contact-icons {
    padding: 8px 0;
}

.business-card .contact-icons i {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.business-card .contact-icons i:hover {
    transform: scale(1.2);
}

.business-card .border-top {
    border-color: rgba(0,0,0,0.08) !important;
}

/* Enhanced hover effects for featured cards */
.business-card:hover .business-meta {
    background: rgba(var(--bs-primary-rgb), 0.08);
    transform: translateY(-1px);
}

.business-card:hover .card-title {
    color: var(--bs-primary);
}

/* Business Title Links */
.card-title a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.card-title a:hover {
    color: var(--bs-primary);
    text-decoration: underline;
}

/* Rating Stars */
.rating .fas.fa-star {
    font-size: 0.9rem;
}

/* Step Icons */
.step-icon {
    transition: transform 0.3s ease;
}

.step-icon:hover {
    transform: scale(1.1);
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #4a90e2 100%);
}

.stat-item h2 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Footer */
footer {
    background-color: #2d3748 !important;
}

footer a {
    transition: color 0.3s ease;
    text-decoration: none;
}

footer a:hover {
    color: var(--bs-primary) !important;
}

.social-links a {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    transition: all 0.3s ease;
    border-radius: 6px;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-primary:hover {
    background-color: #2a4d6b;
    border-color: #2a4d6b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-section .row {
        --bs-gutter-x: 1rem;
    }
    
    .hero-section .col-lg-6:first-child {
        margin-bottom: 2rem;
    }
    
    .hero-section .col-lg-6:last-child {
        margin-top: 1rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-section .d-flex {
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .hero-image-container {
        max-width: 90%;
        margin: 0 auto;
    }
    
    .min-vh-50 {
        min-height: auto !important;
    }
    
    .search-form {
        padding: 2rem 1rem;
    }
    
    .stat-item h2 {
        font-size: 2.5rem;
    }
    
    /* Sheep mascot mobile styles */
    .hero-mascot-logo {
        width: 70px !important;
        animation: mascotFloatMobile 6s ease-in-out infinite !important;
    }
    
    .hero-logo-parallax {
        top: 20px !important;
        right: 20px !important;
        z-index: 4 !important;
    }
    
    #hero-image-display {
        min-height: 250px !important;
        aspect-ratio: 4/3 !important;
    }
}

/* Form Placeholder Styling */
.form-control::placeholder,
.form-select::placeholder,
input::placeholder,
textarea::placeholder {
    color: #adb5bd !important;
    opacity: 0.8 !important;
}

/* For better browser compatibility */
.form-control::-webkit-input-placeholder,
.form-select::-webkit-input-placeholder,
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
    color: #adb5bd !important;
    opacity: 0.8 !important;
}

.form-control::-moz-placeholder,
.form-select::-moz-placeholder,
input::-moz-placeholder,
textarea::-moz-placeholder {
    color: #adb5bd !important;
    opacity: 0.8 !important;
}

.form-control:-ms-input-placeholder,
.form-select:-ms-input-placeholder,
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
    color: #adb5bd !important;
    opacity: 0.8 !important;
}

.form-control::-ms-input-placeholder,
.form-select::-ms-input-placeholder,
input::-ms-input-placeholder,
textarea::-ms-input-placeholder {
    color: #adb5bd !important;
    opacity: 0.8 !important;
}

/* Utility Classes */
.text-primary {
    color: var(--bs-primary) !important;
}

.bg-primary {
    background-color: var(--bs-primary) !important;
}

.border-primary {
    border-color: var(--bs-primary) !important;
}

/* Animation for loading */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--bs-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2a4d6b;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
    pointer-events: none;
}

.toast-notification {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    margin-bottom: 16px;
    overflow: hidden;
    pointer-events: auto;
    transform: translateX(100%);
    opacity: 0;
    animation: slideInToast 0.4s ease-out forwards;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast-notification.dismissing {
    animation: slideOutToast 0.3s ease-in forwards;
}

.toast-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    position: relative;
    border-left: 4px solid var(--toast-color, #3182ce);
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--toast-color, #3182ce);
    font-size: 18px;
}

.toast-message {
    flex: 1;
    color: #2d3748;
    font-weight: 500;
    line-height: 1.4;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 4px;
    margin-left: 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #4a5568;
}

/* Toast Types */
.toast-success {
    --toast-color: #38a169;
}

.toast-success .toast-content {
    border-left-color: #38a169;
}

.toast-error, .toast-danger {
    --toast-color: #e53e3e;
}

.toast-error .toast-content,
.toast-danger .toast-content {
    border-left-color: #e53e3e;
}

.toast-warning {
    --toast-color: #d69e2e;
}

.toast-warning .toast-content {
    border-left-color: #d69e2e;
}

.toast-info {
    --toast-color: #3182ce;
}

.toast-info .toast-content {
    border-left-color: #3182ce;
}

/* Toast Animations */
@keyframes slideInToast {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToast {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Progress Bar */
.toast-notification::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--toast-color, #3182ce);
    opacity: 0.3;
    animation: toastProgress 4s linear forwards;
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
        top: 70px;
    }
    
    .toast-notification {
        margin-bottom: 12px;
    }
    
    .toast-content {
        padding: 12px 16px;
    }
}

/* Image Gallery Styles */
.gallery-item {
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-overlay {
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 20px;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #f1f1f1;
    font-size: 30px;
    cursor: pointer;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.5);
    transition: background 0.2s;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Mobile adjustments for gallery */
@media (max-width: 576px) {
    .lightbox-nav {
        font-size: 20px;
        padding: 5px 10px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
}