:root {
    --primary-color: #d4af37;
    --secondary-color: #b8941f;
    --warning-color: #ffc107;
    --accent-color: #f4e5c2;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --font-primary: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    padding-top: 70px;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

#preloader.hide {
    opacity: 0;
    pointer-events: none;
}

/* Navigation */
.navbar {
    background: rgba(33, 37, 41, 0.95) !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

.navbar.scrolled {
    padding: 0.75rem 0;
    background: rgba(33, 37, 41, 0.98) !important;
}

.navbar-brand {
    padding: 0;
    margin-right: 1rem;
}

.navbar-logo {
    height: 45px;
    width: auto;
    max-width: 180px;
    transition: all 0.3s ease;
}

.navbar.scrolled .navbar-logo {
    height: 35px;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--warning-color) !important;
}

.navbar-nav .nav-link.active {
    color: var(--warning-color) !important;
}

.navbar-nav .nav-link:not(.dropdown-toggle)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--warning-color);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:not(.dropdown-toggle):hover::after,
.navbar-nav .nav-link:not(.dropdown-toggle).active::after {
    width: 80%;
}

/* Fix dropdown arrow styling */
.navbar-nav .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8rem;
    vertical-align: middle;
    margin-left: 0.3rem;
    transition: transform 0.3s ease;
}

.navbar-nav .dropdown-toggle.show::after {
    transform: rotate(180deg);
}

/* Align Teklif Al button with nav items */
.navbar-nav .nav-item .btn {
    margin-top: 2px;
    vertical-align: middle;
}

/* Override Bootstrap btn-sm padding */
.btn-sm, .btn-group-sm > .btn {
    --bs-btn-padding-y: 0.5rem !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* Hero Section */
.hero-section {
    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 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,112C1248,107,1344,117,1392,122.7L1440,128L1440,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;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.floating-card {
    animation: float 3s ease-in-out infinite;
}

/* Icon and Feature Styles */
.icon-wrapper,
.feature-icon {
    background-color: var(--accent-color) !important;
}

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

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

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

.text-secondary {
    color: var(--secondary-color) !important;
}

.bg-primary.bg-opacity-10 {
    background-color: rgba(212, 175, 55, 0.15) !important;
}

.bg-success.bg-opacity-10 {
    background-color: rgba(40, 167, 69, 0.15) !important;
}

.bg-warning.bg-opacity-10 {
    background-color: rgba(255, 193, 7, 0.15) !important;
}

.bg-info.bg-opacity-10 {
    background-color: rgba(23, 162, 184, 0.15) !important;
}

.bg-danger.bg-opacity-10 {
    background-color: rgba(220, 53, 69, 0.15) !important;
}

.bg-secondary.bg-opacity-10 {
    background-color: rgba(108, 117, 125, 0.15) !important;
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent !important;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--warning-color) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

.service-card.featured {
    position: relative;
    border-color: var(--warning-color) !important;
}

.featured-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--warning-color);
    color: var(--dark-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Badge Styles */
.badge.bg-primary {
    background-color: var(--primary-color) !important;
    color: white;
}

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

/* Counter Animation */
.counter {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--warning-color);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    top: 30px;
    width: 20px;
    height: 20px;
    background: var(--warning-color);
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 3px var(--warning-color);
}

.timeline-item.left::after {
    right: -10px;
}

.timeline-item.right::after {
    left: -10px;
}

/* Tech Slider */
.tech-track {
    animation: scroll 20s linear infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    z-index: 999;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.back-to-top.show {
    opacity: 1;
    pointer-events: all;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* WhatsApp Button */
.whatsapp-button {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    z-index: 998;
    text-decoration: none !important;
    border: none !important;
}

.whatsapp-button:hover {
    background: #20ba5a;
    transform: scale(1.1);
    color: white;
    text-decoration: none !important;
}

/* Button Styles */
.btn-warning {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    border: none !important;
    color: white !important;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color)) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3) !important;
}

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

.btn-primary:hover {
    background: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
}

/* Social Media Buttons */
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
    color: white;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

/* Service Item Icons */
.service-item-icon {
    width: 35px;
    height: 35px;
    min-width: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.service-item-icon i {
    font-size: 0.9rem;
}

/* Form Styles */
.form-floating > .form-control,
.form-floating > .form-select {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    border-color: var(--warning-color);
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25);
}

/* Portfolio Filter */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--warning-color);
    border-color: var(--warning-color);
    color: white;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Portfolio Item Fix */
.portfolio-item {
    position: relative;
    min-height: 100%;
}

.portfolio-item .project-card {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    border: 2px solid #e0e0e0;
    background: #ffffff;
}

.portfolio-item .project-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-item .results {
    margin-top: auto;
    border: 1px solid #28a74530;
    background: #28a74510 !important;
}

.portfolio-item .badge {
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

.portfolio-item .project-header {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
}

.portfolio-item .tags .badge {
    border: 1px solid #dee2e6;
}

.portfolio-item h4 {
    font-size: 1.1rem;
    line-height: 1.4;
}

/* Portfolio card hover effect */
.portfolio-item .project-card {
    transition: all 0.3s ease;
}

.portfolio-item .project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    border-color: var(--warning-color);
}

/* Custom Section Spacing - Override Bootstrap */
section {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

section:first-of-type {
    padding-top: 2rem !important;
}

/* Fix row margins */
.row {
    margin-left: 0;
    margin-right: 0;
}

.container .row {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

/* Override Bootstrap's py-5 class with higher specificity */
html body .py-5,
html body section.py-5,
html body div.py-5,
html body .container .py-5,
html body main .py-5,
html body main section.py-5,
.py-5.py-5,
section.py-5.py-5,
div.py-5.py-5 {
    padding-top: 5rem !important;
    padding-bottom: 3rem !important;
}

/* Ensure all sections have proper spacing */
html body section[class*="py-"],
html body div[class*="py-"] {
    padding-top: 5rem !important;
    padding-bottom: 3rem !important;
}

section[class*="py-"]:first-of-type {
    padding-top: 4rem !important;
}

/* Testimonial Cards */
.testimonial-card {
    transition: all 0.3s ease;
}

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

.stars i {
    font-size: 1.2rem;
}

/* Footer */
.footer-area {
    position: relative;
    overflow: hidden;
}

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

/* Footer link hover effect */
.footer-area a.text-white-50:hover {
    color: var(--warning-color) !important;
    transition: color 0.3s ease;
}

/* Footer logo */
.footer-logo {
    height: 60px;
    width: auto;
    max-width: 220px;
    opacity: 0.95;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
}

/* Responsive Portfolio */
@media (max-width: 768px) {
    .portfolio-item .project-card {
        min-height: auto;
    }
    
    .portfolio-filters {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
    }
}

/* Responsive */
@media (max-width: 991px) {
    .navbar-nav {
        text-align: center;
        padding: 20px 0;
    }
    
    .navbar-nav .nav-link {
        margin: 10px 0;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 20px;
        text-align: left !important;
    }
    
    .timeline-item.right {
        left: 0;
    }
    
    .timeline-item::after {
        left: 20px !important;
    }
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .display-3 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.8rem;
    }
    
    .back-to-top,
    .whatsapp-button {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--warning-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e0a800;
}

/* Page Transitions */
.page-transition {
    animation: pageLoad 0.5s ease;
}

@keyframes pageLoad {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}