/* ==============================
   1. CSS RESET & BASE STYLES
   ============================== */
   *, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color variables */
    --primary-color: #00b682;
    --primary-dark: #009e70;
    --primary-light: #f0fffa;
    --secondary-color: #333333;
    --background-color: #ffffff;
    --light-gray: #f8f9fa;
    --dark-gray: #6c757d;
    --text-color: #333333;
    --border-color: #eeeeee;
    
    /* Typography */
    --font-main: 'Poppins', sans-serif;
    
    /* Sizes */
    --border-radius: 8px;
    --container-width: 1200px;
    --section-spacing: 80px;
    --card-spacing: 30px;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

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

/* ==============================
   2. COMMON ELEMENTS
   ============================== */
.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.2rem;
    position: relative;
    color: var(--secondary-color);
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    border: none;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 182, 130, 0.3);
}

.card-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.read-more {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-block;
    margin-top: 10px;
    position: relative;
}

.read-more:after {
    content: "→";
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.read-more:hover:after {
    transform: translateX(5px);
}

section {
    padding: var(--section-spacing) 0;
}

/* Container for all grid layouts */
.about-grid,
.portfolio-grid,
.blog-grid,
.contact-container,
.footer-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==============================
   3. HEADER & NAVIGATION
   ============================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: var(--background-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover:after {
    width: 100%;
}

/* ==============================
   4. HERO SECTION
   ============================== */
.hero {
    padding: 100px 5%;
    background-color: var(--primary-light);
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-width);
    margin: 0 auto;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.greeting {
    font-size: 1.2rem;
    color: var(--dark-gray);
    margin-bottom: 10px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.hero h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.hero p {
    margin-bottom: 30px;
    color: var(--dark-gray);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid rgba(0, 182, 130, 0.3);
    background-color: rgba(0, 182, 130, 0.1);
    box-shadow: 0 10px 30px rgba(0, 182, 130, 0.2);
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==============================
   5. ABOUT SECTION
   ============================== */
.about {
    background-color: var(--light-gray);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--card-spacing);
}

.about-card {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.about-card ul li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.about-card ul li:before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* ==============================
   6. PORTFOLIO SECTION
   ============================== */
.portfolio {
    background-color: var(--background-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--card-spacing);
}

.portfolio-item {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.portfolio-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.item-content {
    padding: 20px;
}

.item-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.item-content p {
    color: var(--dark-gray);
}

/* ==============================
   7. BLOG SECTION
   ============================== */
.blog {
    background-color: var(--light-gray);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--card-spacing);
}

.blog-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover img {
    transform: scale(1.05);
}

.blog-content {
    padding: 20px;
}

.blog-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.blog-content p {
    color: var(--dark-gray);
    margin-bottom: 10px;
}

/* ==============================
   8. FAQ SECTION
   ============================== */
.faq {
    background-color: var(--background-color);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.faq-item {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.faq-question {
    background-color: #f9f9f9;
    padding: 20px;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question h3 {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin: 0;
}

.toggle-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 500px;
}

.faq-item.active .toggle-icon {
    transform: rotate(45deg);
}

/* ==============================
   9. CONTACT SECTION
   ============================== */
.contact {
    background-color: var(--light-gray);
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
}

.contact-form {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 182, 130, 0.2);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.btn-submit {
    width: 100%;
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.info-group {
    margin-bottom: 30px;
}

.info-group h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 10px;
}

.info-group h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.info-group p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.info-group p i {
    margin-right: 10px;
    color: var(--primary-color);
    width: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-5px);
    background-color: var(--primary-dark);
}

/* ==============================
   10. FOOTER
   ============================== */
footer {
    background-color: #333;
    color: white;
    padding: 50px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-about,
.footer-links,
.footer-services,
.footer-contact {
    margin-bottom: 30px;
}

footer h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

footer h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

footer ul li {
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

footer ul li:hover {
    transform: translateX(5px);
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color);
}

.footer-contact p {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.footer-contact p i {
    margin-right: 10px;
    color: var(--primary-color);
    width: 20px;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
}

/* ==============================
   11. PRELOADER
   ============================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.loader .inner {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

.loader .inner.one {
    animation-delay: 0s;
}

.loader .inner.two {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    border-top-color: var(--secondary-color);
    animation-delay: 0.2s;
}

.loader .inner.three {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    border-top-color: var(--primary-color);
    animation-delay: 0.4s;
}

.loading-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 10px;
    position: relative;
    letter-spacing: 3px;
}

.loading-text:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    animation: loadingBar 2s ease-in-out infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes loadingBar {
    0%, 100% {
        width: 0;
    }
    50% {
        width: 100%;
    }
}

/* Hide content while loading */
body.loading {
    overflow: hidden;
}

body.loading main,
body.loading header,
body.loading section {
    opacity: 0;
}

/* ==============================
   12. RESPONSIVE DESIGN
   ============================== */
@media screen and (max-width: 1024px) {
    :root {
        --section-spacing: 60px;
    }
    
    .hero-content {
        gap: 30px;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media screen and (max-width: 768px) {
    :root {
        --section-spacing: 50px;
        --card-spacing: 20px;
    }
    
    header {
        flex-direction: column;
        padding: 15px;
    }
    
    nav ul {
        margin-top: 15px;
    }
    
    nav ul li {
        margin-left: 15px;
        margin-right: 15px;
    }
    
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .hero-text {
        padding-right: 0;
    }
    
    .image-container {
        width: 250px;
        height: 250px;
        margin-bottom: 20px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .contact-container {
        gap: 30px;
    }
}

@media screen and (max-width: 480px) {
    :root {
        --section-spacing: 40px;
    }
    
    .hero {
        padding: 60px 5%;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero h2 {
        font-size: 1.3rem;
    }
    
    .image-container {
        width: 200px;
        height: 200px;
    }
    
    .about-grid,
    .portfolio-grid,
    .blog-grid,
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .about-card, 
    .portfolio-item, 
    .blog-card {
        padding: 20px;
    }
}