/* Custom CSS for CodeNext ERP Landing Page */

/* Root Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #f39c12;
    --success-color: #27ae60;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
}

/* Prevent horizontal scrolling and white spaces */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

.container, .container-fluid {
    max-width: 100%;
    overflow-x: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Bootstrap Overrides */
.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

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

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

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

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    width: 100%;
    max-width: 100%;
}

.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 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-overlay {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--bg-light), transparent);
}

.hero-image img {
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.hero-image img:hover {
    transform: scale(1.05);
}

/* Feature Cards */
.feature-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.1),
        0 1px 8px rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.8);
    height: 100%;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.15),
        0 10px 25px rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: white;
    font-size: 2rem;
    position: relative;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: rotateY(180deg);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.feature-card h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.3rem;
    transition: color 0.3s ease;
}

.feature-card:hover h4 {
    color: #667eea;
}

.feature-card p {
    color: #6c757d;
    line-height: 1.6;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.feature-card:hover p {
    color: #495057;
}

/* Module Cards */
.module-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 123, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.module-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 123, 255, 0.2);
}

.module-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    position: relative;
}

.module-icon i {
    font-size: 2rem;
    color: white;
}

.module-card h4 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
}

.module-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.module-features li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.module-features li:last-child {
    border-bottom: none;
}

.module-features li i {
    margin-left: 0.75rem;
    font-size: 0.9rem;
}

/* Screenshot Cards Styles */
.screenshot-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.screenshot-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.screenshot-placeholder {
    height: 250px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 3px solid #667eea;
    position: relative;
    overflow: hidden;
}

/* Added: ensure images fit nicely in placeholders */
.screenshot-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
    border-bottom: 0;
}

.screenshot-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(102, 126, 234, 0.1) 50%, transparent 70%);
    animation: shimmer 2s infinite;
}

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

.screenshot-title {
    padding: 1.5rem;
    text-align: center;
}

.screenshot-title h5 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.screenshot-title p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Real Estate Features */
.real-estate-feature {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
    border-right: 4px solid var(--accent-color);
}

.real-estate-feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.feature-icon-large {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    font-size: 1.5rem;
    color: white;
}

.feature-header h3 {
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    color: var(--text-dark);
}

.feature-list li i {
    margin-left: 0.75rem;
    font-size: 0.9rem;
}

/* Enhanced Features */
.enhanced-feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
    border-top: 4px solid var(--success-color);
}

.enhanced-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.enhanced-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--success-color), #2ecc71);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
    color: white;
}

.enhanced-feature-card h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.enhanced-feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Workflow Cards */
.workflow-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.workflow-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), #e67e22);
}

.workflow-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.workflow-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color), #e67e22);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: white;
}

.workflow-card h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.workflow-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
    overflow: hidden;
}

.cta-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 1000 1000"><circle fill="rgba(255,255,255,0.03)" cx="200" cy="200" r="100"/><circle fill="rgba(255,255,255,0.03)" cx="800" cy="800" r="150"/></svg>');
}

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

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

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Prevent horizontal overflow */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
    }
    
    .col, [class*="col-"] {
        padding-left: 10px !important;
        padding-right: 10px !important;
        max-width: 100% !important;
    }
    
    .hero-section {
        padding-top: 100px;
        padding-bottom: 50px;
        text-align: center;
        margin: 0;
        width: 100%;
        overflow-x: hidden;
    }
    
    .display-4 {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .lead {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .feature-header {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-icon-large {
        margin: 0 0 1rem 0;
    }
    
    .btn-lg {
        padding: 0.75rem 2rem;
        font-size: 1rem;
        margin: 0.5rem;
        width: auto;
    }
    
    /* Card adjustments for mobile */
    .feature-card,
    .module-card,
    .real-estate-feature,
    .enhanced-feature-card,
    .workflow-card {
        margin-bottom: 1.5rem;
        padding: 1.5rem 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    /* Navigation adjustments */
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    /* Section padding adjustments */
    section {
        padding: 3rem 0 !important;
    }
    
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
}

@media (max-width: 576px) {
    /* Extra small devices */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
        max-width: 100% !important;
    }
    
    .display-4 {
        font-size: 2rem;
        line-height: 1.1;
    }
    
    .lead {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .feature-card,
    .module-card,
    .real-estate-feature,
    .enhanced-feature-card,
    .workflow-card {
        margin-bottom: 1.5rem;
        padding: 1.25rem 0.75rem;
        width: 100%;
        max-width: 100%;
    }
    
    /* Button adjustments */
    .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1.5rem;
        margin: 0.25rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 2rem;
    }
    
    /* Typography adjustments */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    h5 { font-size: 1.1rem; }
    
    /* Icon adjustments */
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .module-icon {
        width: 60px;
        height: 60px;
    }
    
    .module-icon i {
        font-size: 1.5rem;
    }
    
    /* Remove excessive margins */
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    .mb-3 {
        margin-bottom: 1rem !important;
    }
}

/* Extra responsive fixes */
@media (max-width: 480px) {
    .container {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    
    .display-4 {
        font-size: 1.8rem;
    }
    
    .hero-section {
        padding-top: 80px;
        padding-bottom: 40px;
    }
    
    section {
        padding: 2rem 0 !important;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Loading Animation */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease;
}

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

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section Spacing */
section {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Prevent any element from causing horizontal scroll */
* {
    max-width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

/* Fix for any Bootstrap grid issues */
.row {
    max-width: 100%;
    overflow-x: hidden;
}

.col, [class*="col-"] {
    max-width: 100%;
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--text-light), transparent);
    margin: 3rem 0;
}

/* Print Styles */
@media print {
    .navbar,
    .cta-section,
    footer {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
    }
}