/* ===== COMPONENT STYLES ===== */
/* Reusable UI Components and Elements */

/* ===== SKILLS COMPONENTS ===== */
/* Skill Cards and Grid Layout */
.skills-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.skills-list li {
    display: flex;
    align-items: center;
    background-color: var(--card-bg);
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--card-shadow);
    font-weight: 500;
    transition: all 0.3s ease;
}

.skills-list li:hover {
    transform: translateY(-5px);
    background-color: var(--highlight-color);
    color: white;
    box-shadow: 0 15px 30px var(--card-shadow-hover);
}

.skills-list li i {
    margin-right: 15px;
    font-size: 1.3rem;
    color: var(--highlight-color);
    width: 25px;
    text-align: center;
    transition: color 0.3s ease;
}

.skills-list li:hover i {
    color: white;
}

/* Skill Card Component */
.skill-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--card-shadow);
    flex: 1;
    min-width: 300px;
    max-width: 350px;
    transition: all 0.3s ease;
    text-align: center;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--card-shadow-hover);
}

.skill-card i {
    font-size: 3rem;
    color: var(--highlight-color);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.skill-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: var(--heading-color);
}

@media (max-width: 768px) {
    .skills-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .skill-card {
        min-width: 250px;
    }
}

@media (max-width: 576px) {
    .skills-list {
        grid-template-columns: 1fr;
    }
    .skill-card {
        min-width: 100%;
    }
}

/* ===== BLOG SECTION COMPONENTS ===== */
/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin: 40px 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.pagination a, .pagination span {
    padding: 8px 15px;
    border-radius: 5px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: var(--highlight-color);
    color: white;
}

.pagination a.active {
    background-color: var(--highlight-color);
    color: white;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px auto;
    max-width: 1200px;
    padding: 0 20px;
}

@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
}

.blog-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--card-shadow-hover);
}

.blog-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-right: 80px; /* Added padding to move image right */
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--highlight-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.blog-info {
    padding: 25px;
}

.blog-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.blog-meta i {
    margin-right: 5px;
}

.blog-info h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
    color: var(--heading-color);
    line-height: 1.4;
}

.blog-info p {
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.6;
}

.read-more {
    color: var(--highlight-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.read-more:hover {
    gap: 12px;
}

.view-all-container {
    text-align: center;
    margin-top: 40px;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: var(--highlight-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .blog-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* ===== CONTACT SECTION COMPONENTS ===== */
/* Contact Form and Information Layout */
.contact-section {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.contact-form-container {
    flex: 1;
    width: 100%;
    max-width: 600px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, var(--card-bg), var(--section-bg));
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-form-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--card-shadow);
}

.contact-form-container h3 {
    font-size: 1.8rem;
    color: var(--heading-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-form-container h3 i {
    color: var(--highlight-color);
    font-size: 1.6rem;
}

.contact-form-container p {
    color: var(--text-color);
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
}

.contact-illustration {
    flex: 1;
    width: 100%;
    max-width: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 100px;
    margin-top: 30px;
}

.contact-image {
    width: 100%;
    max-width: 500px;
}

/* ===== FORM COMPONENTS ===== */
/* Input Fields and Form Layout */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.form-group label {
    font-weight: 500;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-group i {
    color: var(--highlight-color);
    font-size: 1.1rem;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.form-group input,
.form-group textarea {
    padding: 12px 12px 12px 35px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--input-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
    width: 100%;
}

.form-group textarea {
    padding-left: 12px;
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--highlight-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
    background-color: var(--card-bg);
}

.form-group.error input,
.form-group.error textarea {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.form-group.success input,
.form-group.success textarea {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.05);
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.error-message i {
    font-size: 0.875rem;
}

.submit-btn {
    background-color: var(--highlight-color);
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.submit-btn i {
    font-size: 1.1rem;
}

.submit-btn:hover {
    background-color: var(--highlight-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-status {
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.form-status.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.form-status.error {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* ===== SEARCH COMPONENTS ===== */
.search-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 30px;
    position: relative;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: var(--input-bg);
    color: var(--text-color);
}

.search-box input:focus {
    border-color: var(--highlight-color);
    outline: none;
    box-shadow: 0 0 10px rgba(139, 69, 19, 0.1);
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.search-result-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--hover-bg);
}

.result-category {
    font-size: 14px;
    color: var(--highlight-color);
    margin-bottom: 5px;
}

.result-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.result-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    gap: 15px;
}

.result-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

/* Social Share Buttons */
.social-share {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.share-button {
    padding: 8px 15px;
    border-radius: 20px;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-button:hover {
    transform: translateY(-2px);
}

.share-twitter {
    background-color: #1DA1F2;
}

.share-facebook {
    background-color: #4267B2;
}

.share-linkedin {
    background-color: #0077B5;
}

@media (max-width: 768px) {
    .search-container {
        padding: 0 15px;
    }
    
    .social-share {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ===== MODAL COMPONENTS ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(-50px);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px var(--card-shadow);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--highlight-color);
}

.modal-header {
    margin-bottom: 20px;
    padding-right: 40px;
}

.modal-title {
    font-size: 1.8rem;
    color: var(--heading-color);
    margin-bottom: 10px;
}

.modal-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modal-meta i {
    margin-right: 5px;
}

.modal-body {
    color: var(--text-color);
    line-height: 1.6;
}

.modal-body h2,
.modal-body h3,
.modal-body h4 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    color: var(--heading-color);
}

.modal-body p {
    margin-bottom: 1em;
}

.modal-body ul,
.modal-body ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}

.modal-body li {
    margin-bottom: 0.5em;
}

.modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.modal-category {
    display: inline-block;
    background: var(--highlight-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        width: 95%;
    }

    .modal-title {
        font-size: 1.5rem;
    }
}

/* ===== CONTACT REDIRECT SECTION ===== */
.contact-redirect {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px var(--card-shadow);
    margin: 40px auto;
    max-width: 600px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-redirect img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.contact-redirect:hover img {
    transform: scale(1.05);
}

.contact-redirect:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--card-shadow);
}

.contact-redirect h3 {
    color: var(--heading-color);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.contact-redirect p {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

.contact-redirect-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--highlight-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.contact-redirect-btn:hover {
    background: var(--highlight-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    gap: 15px;
}

.contact-redirect-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.contact-redirect-btn:hover i {
    transform: translateX(5px);
}

/* ===== CHATBOT COMPONENTS ===== */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s ease;
}

.chatbot-header {
    padding: 15px 20px;
    background: var(--highlight-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header h3 {
    font-size: 1.2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--highlight-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--card-shadow);
    transition: all 0.3s ease;
    z-index: 999;
}

.chatbot-toggle i {
    color: white;
    font-size: 1.5rem;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 15px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.message.user {
    background: var(--highlight-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.message.bot {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.chatbot-input {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.95rem;
    background: var(--input-bg);
    color: var(--text-color);
}

.chatbot-input button {
    background: var(--highlight-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chatbot-input button:hover {
    transform: scale(1.1);
}

.chatbot-input button i {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .chatbot-container {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    
    .chatbot-toggle {
        bottom: 20px;
        right: 20px;
    }
}

/* ===== RESPONSIVE COMPONENTS ===== */
/* Component Breakpoints and Adaptations */

@media (max-width: 992px) {
    .contact-section {
        flex-direction: column-reverse;
        align-items: center;
    }
    
    .contact-illustration {
        position: static;
        margin-bottom: 30px;
    }
}

.blog-content {
    display: none;
}

.comparison-table,
.skills-table {
    width: 100%;
    margin: 1.5em 0;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td,
.skills-table th,
.skills-table td {
    padding: 12px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.comparison-table th,
.skills-table th {
    background-color: var(--highlight-color);
    color: white;
}

@media (max-width: 768px) {
    .comparison-table,
    .skills-table {
        font-size: 0.9rem;
    }
    
    .modal-content {
        padding: 15px;
    }
}
