/**
 * GeoPortfolio Pro - Main Stylesheet
 * Enhanced with Theme Integration
 */

/* Import theme variables */
@import url('theme-custom.css');

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-primary, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: var(--font-size-base, 1rem);
    line-height: var(--line-height-base, 1.6);
    color: var(--dark-color, #0F172A);
    background: var(--page-background, linear-gradient(135deg, #EBF8FF 0%, #DBEAFE 50%, #BFDBFE 100%));
    background-attachment: fixed;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading, 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif);
    font-weight: 600;
    color: var(--dark-color, #0F172A);
}

/* Navigation */
.navbar {
    background: rgba(5, 150, 105, 0.95) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0 !important; /* Reduced from default */
    transition: all 0.3s ease;
}
}

.navbar {
    padding: 0.25rem 0 !important; /* Reduced from default */
}

.navbar-brand {
    color: white !important;
    font-weight: 700;
    font-size: 1.2rem; /* Slightly smaller */
    padding: 0.5rem 0 !important;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 0.8rem !important; /* Reduced padding */
    border-radius: 6px;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: white !important;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color, #059669) 0%, var(--secondary-color, #0EA5E9) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    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="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

/* Modern hero enhancements */
.backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero-image {
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: pulse 3s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.5; }
    100% { transform: scale(1.05); opacity: 0.8; }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-buttons .btn {
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Cards */
.card {
    background: var(--content-background, rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(5, 150, 105, 0.1);
    border-radius: 15px;
    box-shadow: var(--content-shadow, 0 8px 25px rgba(5, 150, 105, 0.08));
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 15px 35px rgba(5, 150, 105, 0.15);
    transform: translateY(-5px);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color, #059669), var(--primary-light, #06a574));
    color: white;
    border-bottom: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color, #059669), var(--primary-light, #06a574));
    color: white;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark, #047857), var(--primary-color, #059669));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color, #059669);
    color: var(--primary-color, #059669);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color, #059669);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color, #0EA5E9), var(--secondary-light, #0fb5f5));
    color: white;
}

/* Working Auto-Scrolling Carousel Styles */
.auto-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: auto;
    background: transparent;
    padding: 1rem 0;
}

.carousel-track {
    display: flex;
    gap: 1rem;
    animation: slideCarouselLeft 20s linear infinite;
    width: fit-content;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.carousel-item {
    flex: 0 0 320px;
    width: 320px;
    min-width: 320px;
}

.carousel-item.duplicate {
    flex: 0 0 320px;
    width: 320px;
    min-width: 320px;
}

/* Working animation keyframes - based on test that worked */
@keyframes slideCarouselLeft {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .carousel-item,
    .carousel-item.duplicate {
        flex: 0 0 280px;
        width: 280px;
        min-width: 280px;
    }
    
    .carousel-track {
        animation-duration: 18s;
    }
}

@media (max-width: 768px) {
    .carousel-item,
    .carousel-item.duplicate {
        flex: 0 0 250px;
        width: 250px;
        min-width: 250px;
    }
    
    .carousel-track {
        animation-duration: 15s;
    }
}

/* Simple fade edges */
.auto-carousel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));
    z-index: 10;
    pointer-events: none;
}

.auto-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 100%;
    background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));
    z-index: 10;
    pointer-events: none;
}

/* For light background sections */
.bg-light .auto-carousel::before {
    background: linear-gradient(to right, #f8f9fa, rgba(248,249,250,0));
}

.bg-light .auto-carousel::after {
    background: linear-gradient(to left, #f8f9fa, rgba(248,249,250,0));
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color, #059669), #06a574);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color, #D97706), #e5850a);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--error-color, #DC2626), #e53e3e);
    color: white;
}

/* Footer */
footer {
    margin-top: 50px;
    position: relative;
}

/* Default footer background - only applies when no custom colors are set */
footer:not(.custom-footer) {
    background: linear-gradient(135deg, var(--dark-color, #0F172A), #1e293b) !important;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color, #059669), transparent);
}

/* Enhanced Social Links Styling */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .social-links {
        justify-content: center;
    }
}

.social-links a,
.social-links .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.1rem;
}

.social-links a:hover,
.social-links .social-link:hover {
    background: var(--primary-color, #059669);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.3);
    border-color: var(--primary-color, #059669);
}

/* Platform-specific hover colors */
.social-links a[title="LinkedIn"]:hover { background: #0077b5 !important; border-color: #0077b5 !important; }
.social-links a[title="GitHub"]:hover { background: #333 !important; border-color: #333 !important; }
.social-links a[title="Twitter"]:hover { background: #1da1f2 !important; border-color: #1da1f2 !important; }
.social-links a[title="Facebook"]:hover { background: #1877f2 !important; border-color: #1877f2 !important; }
.social-links a[title="Instagram"]:hover { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important; border-color: #e6683c !important; }
.social-links a[title="YouTube"]:hover { background: #ff0000 !important; border-color: #ff0000 !important; }
.social-links a[title="WhatsApp"]:hover { background: #25d366 !important; border-color: #25d366 !important; }
.social-links a[title="Telegram"]:hover { background: #0088cc !important; border-color: #0088cc !important; }
.social-links a[title="Discord"]:hover { background: #5865f2 !important; border-color: #5865f2 !important; }
.social-links a[title="TikTok"]:hover { background: #000 !important; border-color: #000 !important; }
.social-links a[title="Pinterest"]:hover { background: #bd081c !important; border-color: #bd081c !important; }

/* Progress bars */
.progress {
    height: 8px;
    border-radius: 10px;
    background: rgba(5, 150, 105, 0.1);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(135deg, var(--primary-color, #059669), var(--accent-color, #2563EB));
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
    border-radius: 8px;
}

.badge.bg-primary {
    background: var(--primary-color, #059669) !important;
}

.badge.bg-secondary {
    background: var(--secondary-color, #0EA5E9) !important;
}

.badge.bg-info {
    background: var(--accent-color, #2563EB) !important;
}

/* Pagination */
.pagination .page-link {
    border: 1px solid var(--primary-color, #059669);
    color: var(--primary-color, #059669);
    border-radius: 8px;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.pagination .page-item.active .page-link {
    background: var(--primary-color, #059669);
    border-color: var(--primary-color, #059669);
}

.pagination .page-link:hover {
    background: var(--primary-color, #059669);
    border-color: var(--primary-color, #059669);
    color: white;
    transform: translateY(-2px);
}

/* Forms */
.form-control {
    border: 2px solid rgba(5, 150, 105, 0.1);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color, #059669);
    box-shadow: 0 0 0 0.2rem rgba(5, 150, 105, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color, #0F172A);
    margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(5, 150, 105, 0.05));
    color: var(--success-color, #059669);
    border-left: 4px solid var(--success-color, #059669);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(220, 38, 38, 0.05));
    color: var(--error-color, #DC2626);
    border-left: 4px solid var(--error-color, #DC2626);
}

.alert-info {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.05));
    color: var(--accent-color, #2563EB);
    border-left: 4px solid var(--accent-color, #2563EB);
}

/* Content containers */
.container {
    position: relative;
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
        text-align: center;
    }
    
    .hero-buttons {
        margin-top: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .navbar-nav {
        background: rgba(5, 150, 105, 0.95);
        border-radius: 10px;
        margin-top: 1rem;
        padding: 1rem;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color, #059669);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

::-webkit-scrollbar-track {
    background: rgba(5, 150, 105, 0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color, #059669);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark, #047857);
}

/* Admin Panel Specific Styles */
.admin-header {
    padding: 1.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--dark-color, #0F172A);
}

.admin-header p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Admin Card Improvements */
.admin-content .card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.admin-content .card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color, #059669);
}

/* Modal Improvements */
.modal-header {
    background: linear-gradient(135deg, var(--primary-color, #059669), var(--primary-light, #06a574));
    color: white;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Form Improvements */
.form-control:focus {
    border-color: var(--primary-color, #059669);
    box-shadow: 0 0 0 0.2rem rgba(5, 150, 105, 0.25);
}

/* Badge Improvements */
.badge.bg-secondary {
    background: #6b7280 !important;
}

/* Expertise Specific Styling */
.expertise-icon {
    color: var(--primary-color, #059669) !important;
    transition: transform 0.3s ease;
}

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

.expertise-card {
    transition: all 0.3s ease;
}

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

/* Page Spacing Optimization */
.container.py-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 2rem !important;
}

/* Better spacing for page headers */
.page-header {
    margin-bottom: 2rem;
}

/* Ensure consistent top margins */
.container.py-4:first-child,
main .container:first-child {
    margin-top: 0;
}
