/* General Styles */
:root {
    --primary-color: #a51e22;    /* Main red from logo */
    --secondary-color: #2c3e50;  /* Dark blue for text */
    --accent-color: #e63946;     /* Brighter red for hover states */
    --text-color: #2c3e50;
    --light-bg: #f8f9fa;
    --dark-bg: #1a1a1a;          /* Changed to a dark gray */
    --header-bg: #f1f1f1;        /* Light gray for header */
    --light-accent: #fdf0f0;     /* Very light red for backgrounds */
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-color);
    padding-top: 76px;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background-color: var(--header-bg) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-top: 4px solid var(--primary-color);
}

.navbar-brand {
    padding: 0.5rem 0;
}

.navbar-brand img {
    height: 45px;
    width: auto;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
    background-color: var(--primary-color);
    border-radius: 4px;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.nav-link {
    color: var(--secondary-color) !important;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
}

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

.nav-link:hover:after,
.nav-link.active:after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

@media (max-width: 991px) {
    .navbar-collapse {
        background-color: rgba(33, 37, 41, 0.95);
        padding: 1rem;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        margin-top: 0.5rem;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .nav-link {
        color: rgba(255, 255, 255, 0.9) !important;
        padding: 0.75rem 1rem !important;
        border-radius: 4px;
        font-weight: 500;
        transition: all 0.2s ease;
    }

    .nav-link:hover,
    .nav-link.active {
        background-color: var(--primary-color);
        color: white !important;
    }

    .nav-link:after {
        display: none;
    }

    .language-selector {
        border-top: 1px solid rgba(255,255,255,0.1);
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }

    .language-selector button {
        color: rgba(255, 255, 255, 0.9) !important;
        transition: all 0.2s ease;
    }

    .language-selector button:hover {
        color: white !important;
        background-color: var(--primary-color);
    }

    .language-selector button img {
        opacity: 0.9;
        transition: all 0.2s ease;
    }

    .language-selector button:hover img {
        opacity: 1;
    }

    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        background-color: var(--primary-color);
        border-radius: 4px;
        margin-right: 0.5rem;
    }

    .navbar-toggler:focus {
        box-shadow: none;
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
        width: 24px;
        height: 24px;
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(44, 62, 80, 0.85), rgba(44, 62, 80, 0.9)), url('images/header_1.png');
    background-size: cover;
    background-position: center;
    height: 40vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    color: white;
    margin-top: -76px;
    padding-top: 76px;
    position: relative;
}

.hero-section:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to top, var(--light-bg), rgba(255,255,255,0));
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.3rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    margin-bottom: 0;
}

@media (max-width: 991px) {
    .hero-section h1 {
        font-size: 2.75rem;
    }

    .hero-section p {
        font-size: 1.1rem;
    }
}

@media (max-width: 767px) {
    .hero-section {
        padding-top: 90px;
        height: auto;
        min-height: 60vh;
    }

    .hero-section h1 {
        font-size: 2.25rem;
        margin-bottom: 0.5rem !important;
        line-height: 1;
    }

    .hero-section p {
        font-size: 1rem;
        line-height: 1.2;
    }

    /* Override Bootstrap margins */
    .hero-content h1.mb-4,
    .hero-content h1.mb-md-4 {
        margin-bottom: 0.5rem !important;
    }

    .hero-content p.mb-5,
    .hero-content p.mb-md-5 {
        margin-top: 0 !important;
        margin-bottom: 1rem !important;
    }
}

@media (max-width: 575px) {
    .hero-section {
        padding: 90px 0 30px;
        height: auto;
        min-height: 50vh;
    }

    .hero-section h1 {
        font-size: 2rem;
        margin-top: 2rem;
        margin-bottom: 0.35rem !important;
        line-height: 1;
    }

    .hero-section p {
        font-size: 0.95rem;
        line-height: 1.2;
        padding: 0 1rem;
    }

    /* Override Bootstrap margins */
    .hero-content h1.mb-4,
    .hero-content h1.mb-md-4 {
        margin-bottom: 0.35rem !important;
    }

    .hero-content p.mb-5,
    .hero-content p.mb-md-5 {
        margin-top: 0 !important;
        margin-bottom: 1rem !important;
    }
}

/* Sections */
section {
    padding: 5rem 0;
    position: relative;
}

h2 {
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 3rem;
    position: relative;
}

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

/* Technologies Section */
.tech-container {
    max-width: 900px;
    margin: 0 auto;
}

.tech-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.tech-tab {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-color);
    border-radius: 20px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tech-tab:hover {
    background: rgba(165, 30, 34, 0.1);
}

.tech-tab.active {
    background: var(--primary-color);
    color: white;
}

.tech-content {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 120px;
}

.tech-panel {
    display: none;
}

.tech-panel.active {
    display: block;
}

.tech-panel p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-color);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin: 0 auto;
}

.tech-category {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.tech-category h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.tech-category h5:after {
    content: '';
    display: block;
    height: 1px;
    background-color: var(--primary-color);
    opacity: 0.2;
    margin-left: 0.5rem;
    flex: 1;
}

.tech-category .tech-item {
    color: var(--text-color);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

@media (max-width: 991px) {
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 767px) {
    .tech-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .tech-category {
        padding: 0.875rem;
        border-radius: 4px;
    }

    .tech-category h5 {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }

    .tech-category .tech-item {
        font-size: 0.85rem;
        line-height: 1.35;
        color: var(--text-color);
        opacity: 0.9;
    }
}

@media (max-width: 575px) {
    #technologies.py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .tech-category {
        background: transparent;
        padding: 0.75rem;
        box-shadow: none;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }

    .tech-category:last-child {
        border-bottom: none;
    }
}

@media (max-width: 767px) {
    .tech-tabs {
        gap: 0.25rem;
    }

    .tech-tab {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .tech-content {
        padding: 1rem;
        min-height: 100px;
    }

    .tech-panel p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

@media (max-width: 575px) {
    .tech-tabs {
        justify-content: flex-start;
        padding: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .tech-tabs::-webkit-scrollbar {
        display: none;
    }

    .tech-content {
        margin: 0 0.5rem;
    }
}

/* Service Cards */
.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
    transition: all 0.3s ease;
    border-top: 3px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.service-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(45deg, var(--light-accent), transparent);
    opacity: 0;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.service-card:hover:before {
    opacity: 1;
}

.service-card h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.service-card h3 i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.service-card ul li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.service-card ul li:before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Technologies Grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.tech-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid #eee;
    font-weight: 500;
}

.tech-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Contact Section */
.contact-info {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.contact-info h4 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.contact-info .legal-info {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.contact-info .legal-info p {
    margin-bottom: 0.5rem;
}

.contact-info .legal-info .section {
    margin-bottom: 1.5rem;
}

.contact-info .legal-info strong {
    color: var(--secondary-color);
    min-width: 120px;
    display: inline-block;
}

.contact-info i {
    color: var(--primary-color);
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-info a:hover {
    color: var(--secondary-color);
}

.map-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
    min-height: 300px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Footer */
footer {
    background-color: var(--header-bg) !important;
    color: var(--secondary-color);
    border-top: 4px solid var(--primary-color);
    padding: 1.5rem 0;
}

footer p {
    margin: 0;
    color: var(--secondary-color);
}

/* List Styles */
.list-unstyled li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1.5rem;
    display: flex;
    align-items: center;
}

.list-unstyled li i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

/* Language Switcher */
.dropdown-menu {
    min-width: 100px;
    background: var(--header-bg);
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dropdown-item {
    color: var(--secondary-color);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--light-accent);
    color: var(--primary-color);
}

.nav-link .bi-globe {
    font-size: 1.2rem;
    vertical-align: middle;
}

/* Language Selector */
.language-selector {
    margin-left: 1rem;
    display: flex;
    align-items: center;
}

.lang-options {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
}

.flag-icon {
    width: 24px;
    height: 16px;
    object-fit: cover;
    margin-right: 4px;
    vertical-align: middle;
}

.lang-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background-color: var(--light-accent);
}

.lang-name {
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .hero-section {
        height: 35vh; 
        min-height: 250px;
    }

    .hero-section h1 {
        font-size: 2.2rem;
    }

    .hero-section p {
        font-size: 1.1rem;
    }

    section {
        padding: 3rem 0;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .navbar-collapse {
        background-color: var(--dark-bg);
        padding: 1rem;
        border-radius: 0 0 10px 10px;
    }

    .map-container {
        margin-top: 2rem;
        min-height: 250px;
    }

    .language-selector {
        margin: 0.5rem 0;
    }
    
    .lang-options {
        width: 100%;
        justify-content: center;
    }
    
    .lang-btn {
        flex: 1;
        justify-content: center;
    }

    .tech-category {
        padding: 1rem;
    }
}

/* Animations */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* Bootstrap Overrides */
.navbar-toggler {
    border-color: rgba(255,255,255,0.5);
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.container {
    max-width: 1200px;
    padding: 0 1rem;
}

/* Utility Classes */
.bg-light {
    background-color: var(--light-bg) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.mb-4 {
    margin-bottom: 2rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}