/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    font-size: 16px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 60px 0;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background: #2c3e50;
    color: white;
}

.btn-primary:hover {
    background: #1a252f;
}

.btn-secondary {
    background: transparent;
    color: #2c3e50;
    border: 2px solid #2c3e50;
}

.btn-secondary:hover {
    background: #2c3e50;
    color: white;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #3498db;
}

.pay-btn {
    background: #3498db;
    color: white;
    padding: 8px 20px;
    border-radius: 5px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pay-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* Menu Toggle with Animation */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    position: relative;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 1002;
    background: #2c3e50;
    border-radius: 8px;
}

.menu-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 24px;
    background: white;
    border-radius: 3px;
    opacity: 1;
    left: 8px;
    transform: rotate(0deg);
    transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) {
    top: 13px;
}

.menu-toggle span:nth-child(2) {
    top: 19px;
}

.menu-toggle span:nth-child(3) {
    top: 25px;
}

.menu-toggle.active span:nth-child(1) {
    top: 19px;
    transform: rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.menu-toggle.active span:nth-child(3) {
    top: 19px;
    transform: rotate(-45deg);
}

/* MODERN SLIDE-IN MOBILE MENU */
@media (max-width: 767px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 25px 30px;
        gap: 0;
        transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        z-index: 1001;
        overflow-y: auto;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
        border-left: 1px solid #eee;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    /* Menu Header */
    .nav-links::before {
        content: 'RDC Infoline';
        position: absolute;
        top: 25px;
        left: 25px;
        font-size: 20px;
        font-weight: 700;
        color: #2c3e50;
    }
    
    /* Menu Items */
    .nav-links li {
        width: 100%;
        margin-bottom: 10px;
        opacity: 0;
        transform: translateX(20px);
        transition: all 0.4s ease;
    }
    
    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }
    
    /* Staggered animation for menu items */
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.25s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.3s; }
    
    /* Navigation Links */
    .nav-links a, .nav-links button {
        display: flex;
        align-items: center;
        padding: 18px 20px;
        width: 100%;
        text-align: left;
        border-radius: 10px;
        transition: all 0.3s ease;
        font-size: 16px;
        color: #333;
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        font-weight: 500;
        position: relative;
        overflow: hidden;
    }
    
    .nav-links a::before, .nav-links button::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 4px;
        background: #3498db;
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }
    
    .nav-links a:hover::before, .nav-links button:hover::before {
        transform: scaleY(1);
    }
    
    .nav-links a:hover, .nav-links button:hover {
        background: white;
        color: #3498db;
        transform: translateX(5px);
        border-color: #3498db;
        box-shadow: 0 5px 15px rgba(52, 152, 219, 0.1);
    }
    
    /* REMOVED: Number indicators for menu items */
    /* 
    .nav-links li:nth-child(1) a::after,
    .nav-links li:nth-child(2) a::after,
    .nav-links li:nth-child(3) a::after,
    .nav-links li:nth-child(4) a::after {
        content: '';
        position: absolute;
        right: 20px;
        font-size: 14px;
        color: #6c757d;
        font-weight: 600;
    }
    
    .nav-links li:nth-child(1) a::after { content: '01'; }
    .nav-links li:nth-child(2) a::after { content: '02'; }
    .nav-links li:nth-child(3) a::after { content: '03'; }
    .nav-links li:nth-child(4) a::after { content: '04'; }
    */
    
    .pay-btn {
        background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
        color: white;
        padding: 18px 20px;
        font-size: 16px;
        border: none;
        font-weight: 600;
        border-radius: 10px;
        margin-top: 10px;
        position: relative;
    }
    
    .pay-btn:hover {
        background: linear-gradient(135deg, #2980b9 0%, #1c6ea4 100%);
        transform: translateX(5px) translateY(-2px);
        box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
    }
    
    /* Pay button icon */
    .pay-btn::after {
        content: '→';
        position: absolute;
        right: 20px;
        font-size: 18px;
        transition: transform 0.3s ease;
    }
    
    .pay-btn:hover::after {
        transform: translateX(3px);
    }
    
    .menu-toggle {
        display: block;
        background: #2c3e50;
        border-radius: 10px;
        transition: all 0.3s ease;
    }
    
    .menu-toggle:hover {
        background: #1a252f;
        transform: scale(1.05);
    }
    
    /* Backdrop overlay */
    .nav-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(3px);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-backdrop.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Add close button */
    .close-menu-btn {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #f8f9fa;
        border: none;
        color: #2c3e50;
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        z-index: 1003;
    }
    
    .close-menu-btn:hover {
        background: #3498db;
        color: white;
        transform: rotate(90deg);
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
    
    /* Menu footer */
    .nav-links::after {
        content: '';
        display: block;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #e9ecef;
        color: #6c757d;
        font-size: 12px;
        text-align: center;
    }
}

/* Hero Section */
.hero {
    padding-top: 100px;
    background: #f8f9fa;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero .container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (min-width: 768px) {
    .hero .container {
        flex-direction: row;
        align-items: center;
        gap: 60px;
    }
}

.hero-content {
    flex: 1;
    text-align: center;
}

@media (min-width: 768px) {
    .hero-content {
        text-align: left;
    }
}

.hero-title {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
}

.title-line {
    display: block;
}

.changing-words-container {
    position: relative;
    height: 50px;
    margin: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (min-width: 768px) {
    .changing-words-container {
        justify-content: flex-start;
        height: 60px;
    }
}

.word {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.2rem;
    font-weight: 700;
    color: #3498db;
    opacity: 0;
    transition: all 0.5s ease;
    white-space: nowrap;
    text-align: center;
}

@media (min-width: 768px) {
    .word {
        font-size: 3rem;
        left: 0;
        transform: translateX(0);
        text-align: left;
    }
}

.word.active {
    opacity: 1;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin: 20px auto 30px;
    max-width: 600px;
}

@media (min-width: 768px) {
    .hero-subtitle {
        margin: 20px 0 30px;
    }
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

@media (min-width: 768px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: flex-start;
    }
}

@media (min-width: 768px) {
    .hero-buttons .btn {
        min-width: 180px;
    }
}

.hero-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Services Section */
.services {
    background: white;
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.section-subtitle {
    text-align: center;
    color: #666;
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 1rem;
}

/* Services Grid - FIXED LAYOUT for 5 cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

@media (min-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Make the 4th and 5th cards sit in a 2-column row at the bottom */
    .service-card:nth-child(4),
    .service-card:nth-child(5) {
        grid-column: span 1;
    }
    
    /* Center the last two cards */
    .service-card:nth-child(4) {
        grid-column: 1;
    }
    
    .service-card:nth-child(5) {
        grid-column: 2;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .services-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 40px auto 0;
    }
}

.service-card {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.service-icon {
    font-size: 50px;
    color: #3498db;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.service-card p {
    color: #666;
    font-size: 0.95rem;
}

/* About Section */
.about {
    background: #f5f7ff;
    padding: 80px 0;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.mission-box {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.mission-box h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mission-box h3 i {
    color: #3498db;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature {
    background: white;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    font-size: 40px;
    color: #3498db;
    margin-bottom: 15px;
}

.feature h4 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Contact Section */
.contact {
    background: white;
    padding: 80px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 40px;
}

@media (min-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-info, .contact-form {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-info h3, .contact-form h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-item i {
    font-size: 20px;
    color: #3498db;
    margin-top: 3px;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: #2c3e50;
}

.contact-item p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.business-hours {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.business-hours h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.business-hours p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form button {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 30px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer p {
    margin-bottom: 5px;
}

.made-by {
    color: #3498db;
    font-weight: 500;
}

/* QR Popup */
.qr-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.qr-popup.active {
    display: flex;
}

.qr-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    max-width: 350px;
    width: 100%;
    text-align: center;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #e74c3c;
}

.qr-content h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.qr-image {
    width: 250px;
    height: 250px;
    margin: 15px auto;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ddd;
    overflow: hidden;
}

.qr-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    display: none;
}

.qr-fallback {
    text-align: center;
    color: #666;
    padding: 30px;
    display: none;
}

.qr-fallback i {
    font-size: 50px;
    color: #3498db;
    margin-bottom: 10px;
}

.qr-fallback p {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

.qr-fallback small {
    font-size: 12px;
    color: #666;
}

.qr-note {
    color: #666;
    margin: 15px 0;
    font-size: 14px;
}

.qr-content .btn {
    width: 100%;
    margin-top: 15px;
}