/* MyApps.lk Website Styles
  ------------------------
  Table of Contents:
  1. Root Variables & Global Styles
  2. Utility Classes (Container, Buttons)
  3. Header / Navigation
  4. Hero Section
  5. General Section Styling
  6. About Section
  7. Services Section
  8. Why Choose Us Section
  9. Contact Section
  10. Footer
  11. Responsive Design
*/

/* 1. Root Variables & Global Styles 
*/
:root {
    --color-primary: #0d6efd; /* Strong Blue */
    --color-primary-dark: #0a58ca;
    --color-secondary: #f8f9fa; /* Light Gray/White */
    --color-dark: #212529; /* Dark Gray */
    --color-text: #495057;
    --color-light: #ffffff;
    --font-primary: 'Poppins', sans-serif;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    line-height: 1.7;
    background-color: var(--color-light);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; line-height: 1.2; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* 2. Utility Classes 
*/
.container {
    width: 90%;
    max-width: 1140px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-light);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-light);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-light);
    border-color: var(--color-light);
}

.btn-secondary:hover {
    background-color: var(--color-light);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--color-primary);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* 3. Header / Navigation 
*/
.navbar {
    background: var(--color-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-dark);
}

.logo span {
    color: var(--color-primary);
}

.nav-links ul {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--color-text);
    font-weight: 600;
    position: relative;
    padding-bottom: 0.25rem;
}

.nav-links a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    position: absolute;
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--color-dark);
    cursor: pointer;
}

/* 4. Hero Section 
*/
#hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90vh;
    text-align: center;
    color: var(--color-light);
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.85), rgba(10, 88, 202, 0.95));
    position: relative;
    padding: 4rem 0;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><polygon fill="rgba(255,255,255,0.05)" points="0,100 100,0 100,100"/></svg>');
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.5;
}

#hero .container {
    position: relative;
    z-index: 2;
}

#hero h1 {
    color: var(--color-light);
    font-size: 3.5rem;
    font-weight: 700;
}

#hero p {
    font-size: 1.25rem;
    font-weight: 300;
    max-width: 600px;
    margin: 1rem auto 2rem;
}

.hero-buttons .btn {
    margin: 0 0.5rem;
}

/* 5. General Section Styling 
*/
section {
    padding: 5rem 0;
}

section:nth-child(even) {
    background-color: var(--color-secondary);
}

/* 6. About Section 
*/
.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-content .tagline {
    font-weight: 600;
    color: var(--color-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.about-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 7. Services Section 
*/
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--color-light);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease-in-out;
}

.service-card i {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    color: var(--color-dark);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* 8. Why Choose Us Section 
*/
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--color-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid #e0e0e0;
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

/* 9. Contact Section 
*/
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.contact-info h3, .contact-form h3 {
    margin-bottom: 1.5rem;
}

.info-box {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.info-box i {
    font-size: 1.25rem;
    color: var(--color-primary);
    width: 30px;
    margin-top: 0.25rem;
}

.info-box p {
    margin: 0;
}

.business-hours {
    background: var(--color-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
}

.business-hours h4 {
    color: var(--color-dark);
    margin-bottom: 1rem;
}

.business-hours ul {
    list-style: none;
}

.business-hours li {
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.contact-form .btn-primary {
    width: 100%;
    font-size: 1.1rem;
}

.map-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-container iframe {
    display: block;
}

/* 10. Footer 
*/
footer {
    background: var(--color-dark);
    color: #adb5bd;
    padding: 3rem 0;
    text-align: center;
}

.social-icons {
    margin-bottom: 1.5rem;
}

.social-icons a {
    color: var(--color-light);
    font-size: 1.5rem;
    margin: 0 0.75rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--color-primary);
}

.footer-links {
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--color-light);
    margin: 0 1rem;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.copyright {
    font-size: 0.9rem;
}

/* 11. Responsive Design 
*/

/* Tablets */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    #hero h1 { font-size: 3rem; }
    
    .about-wrapper {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1; /* Move image to top on mobile */
        margin-bottom: 2rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px; /* Height of navbar */
        left: 0;
        background: var(--color-light);
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0;
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        text-align: center;
        width: 100%;
    }
    
    .nav-links a::after {
        display: none; /* Disable underline effect on mobile */
    }
    
    .nav-links a:hover {
        background-color: var(--color-secondary);
    }

    .hamburger {
        display: block;
    }

    #hero {
        min-height: 70vh;
    }

    #hero h1 {
        font-size: 2.25rem;
    }

    #hero p {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }
    
    .services-grid, .features-grid {
        grid-template-columns: 1fr;
    }
    
    section {
        padding: 3rem 0;
    }
}