/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --dark: #1f2937;
    --light: #f3f4f6;
    --white: #ffffff;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Offer Banner */
.offer-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 10px 0;
    text-align: center;
    font-size: 14px;
    animation: slideDown 0.5s ease;
}

.offer-banner i {
    margin-right: 8px;
    animation: pulse 2s infinite;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.btn-login {
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-login:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 100px 0;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::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="%23ffffff20" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,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-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 48px;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
}

.hero-title span {
    color: #fbbf24;
}

.hero-subtitle {
    font-size: 24px;
    margin-bottom: 50px;
    opacity: 0.9;
    animation: fadeInUp 1s ease;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    animation: fadeInUp 1.2s ease;
}

.stat-item i {
    font-size: 40px;
    margin-bottom: 10px;
    color: #fbbf24;
}

.stat-item h3 {
    font-size: 36px;
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 14px;
    opacity: 0.9;
}

/* Services Section */
.services {
    padding: 80px 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--dark);
    position: relative;
}

.section-title::after {
    content: '';
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background: var(--white);
    border: 2px solid;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 36px;
}

.category-card h3 {
    font-size: 20px;
    color: var(--dark);
}

/* Portfolio Section */
.portfolio {
    padding: 80px 0;
    background: var(--light);
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.ad-card {
    display: block;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.ad-image {
    height: 200px;
    overflow: hidden;
}

.ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ad-card:hover .ad-image img {
    transform: scale(1.1);
}

.ad-content {
    padding: 25px;
}

.ad-content h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--dark);
}

.ad-content p {
    color: #6b7280;
    margin-bottom: 20px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateX(5px);
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 600px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--light);
    border-radius: 10px;
}

.contact-item i {
    font-size: 30px;
    color: var(--primary-color);
}

.contact-item h4 {
    margin-bottom: 5px;
    color: var(--dark);
}

.contact-item p {
    color: #6b7280;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-info h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.footer-info p {
    margin: 5px 0;
    opacity: 0.8;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: var(--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(0,0,0,0.2);
    transition: all 0.3s;
    z-index: 999;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background: #128c7e;
}

/* AI Chat Button */
.ai-chat-btn {
    position: fixed;
    bottom: 30px;
    right: 110px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transition: all 0.3s;
    z-index: 999;
    border: none;
    cursor: pointer;
}

.ai-chat-btn:hover {
    transform: scale(1.1);
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    z-index: 1000;
}

.chat-widget.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

.chat-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: var(--white);
    padding: 15px 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--light);
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message .message-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 15px;
    background: var(--white);
}

.chat-message.user .message-bubble {
    background: var(--primary-color);
    color: var(--white);
}

.chat-message.bot .message-bubble {
    background: var(--white);
}

.chat-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid #e5e7eb;
}

.chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 25px;
    outline: none;
}

.chat-input button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.chat-input button:hover {
    background: var(--secondary-color);
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #667eea, #764ba2);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 50px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.login-header h2 {
    color: var(--dark);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 500;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.input-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s;
}

.input-group input:focus {
    border-color: var(--primary-color);
}

.btn-login-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login-submit:hover {
    background: var(--secondary-color);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Admin Page */
.admin-page {
    background: var(--light);
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: var(--dark);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 20px;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav .nav-item {
    display: block;
    padding: 15px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav .nav-item:hover,
.sidebar-nav .nav-item.active {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-left: 4px solid var(--primary-color);
}

.sidebar-nav .nav-item i {
    margin-right: 10px;
}

.sidebar-nav .nav-item.logout {
    color: #ef4444;
}

.admin-main {
    margin-left: 250px;
    flex: 1;
    padding: 30px;
}

.settings-section {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.settings-section h2 {
    margin-bottom: 25px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-section h3 {
    margin: 30px 0 20px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-form .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
}

.color-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-input input[type="color"] {
    width: 50px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
}

.color-input span {
    font-family: monospace;
    color: #6b7280;
}

.btn-save,
.btn-add {
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-save:hover,
.btn-add:hover {
    background: var(--secondary-color);
}

.btn-delete {
    background: var(--error);
    color: var(--white);
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-delete:hover {
    background: #dc2626;
}

.inline-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.inline-form input {
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
}

.data-table {
    overflow-x: auto;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    background: var(--light);
    font-weight: 600;
    color: var(--dark);
}

.color-badge {
    padding: 4px 12px;
    border-radius: 20px;
    color: var(--white);
    font-size: 12px;
    font-weight: 500;
}

.admin-ads {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.ad-item {
    background: var(--light);
    border-radius: 10px;
    padding: 15px;
    position: relative;
}

.ad-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.ad-info h4 {
    margin-bottom: 5px;
    color: var(--dark);
}

.ad-info p {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 5px;
}

.ad-info a {
    color: var(--primary-color);
    font-size: 12px;
    text-decoration: none;
}

.ad-delete {
    position: absolute;
    top: 10px;
    right: 10px;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 20px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-stats {
        gap: 30px;
    }
    
    .categories-grid,
    .ads-grid {
        grid-template-columns: 1fr;
    }

    .portfolio {
        padding-bottom: 140px;
    }
    
    .admin-sidebar {
        width: 200px;
    }
    
    .admin-main {
        margin-left: 200px;
    }
    
    .chat-widget {
        width: 90%;
        right: 5%;
        left: 5%;
    }
    
    .whatsapp-float,
    .ai-chat-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

@media (max-width: 576px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .settings-form .form-grid {
        grid-template-columns: 1fr;
    }
}
