:root {
    --primary-color: #1a237e;
    --secondary-color: #304ffe;
    --accent-color: #00bcd4;
    --text-color: #2c3e50;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Navigation */
.navbar {
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.logo-highlight {
    color: var(--accent-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        gap: 2rem;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .container {
        width: 100%;
        padding: 0 20px;
    }

    .hero {
        padding-top: 10px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-features {
        font-size: 0.9rem;
        gap: 1rem;
    }

    .hero-buttons {
        margin-bottom: 1.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-form-container {
        padding: 2rem;
        margin: 0 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero h1 {
        font-size: 1.4rem;
        line-height: 1.4;
    }

    .hero p {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
    }

    .hero-features {
        font-size: 0.8rem;
        gap: 0.8rem;
    }

    .cta-button {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }

    .service-image {
        height: 160px;
    }

    .service-content {
        padding: 1.2rem;
    }

    .contact-form-container {
        padding: 1.5rem;
    }
}

/* Landscape Mode Adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 3rem 0;
    }

    .nav-links {
        padding: 1rem 0;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(26, 35, 126, 0.9), rgba(48, 79, 254, 0.85)), url('../assets/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: var(--white);
    clip-path: polygon(0 50%, 100% 0, 100% 100%, 0% 100%);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

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

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.cta-button {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    background: var(--accent-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: var(--box-shadow);
}

.cta-button.secondary {
    background: transparent;
    border: 2px solid var(--white);
}

.cta-button.secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

.cta-button:hover {
    background: #00acc1;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.hero-features {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

.feature i {
    color: var(--accent-color);
}

/* Services Section */
.services {
    padding: 8rem 0;
    background-color: var(--light-gray);
    position: relative;
}

.services h2 {
    text-align: center;
    margin-bottom: 4rem;
    color: var(--primary-color);
    font-size: 2.5rem;
    position: relative;
}

.services h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    margin: 1rem auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    padding: 0 1rem;
}

.service-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.service-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-content {
    padding: 25px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.service-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.service-card i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.service-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
    margin-top: auto;
}

.service-features li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    color: var(--text-color);
}

.service-features li::before {
    content: '✓';
    color: var(--accent-color);
    margin-right: 0.8rem;
    font-weight: bold;
}

/* About Section */
.about {
    padding: 5rem 0;
}

.about h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1rem;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Contact Section */
.contact-section {
    padding: 8rem 0 5rem;
    position: relative;
    background: var(--light-gray);
    overflow: hidden;
}

.contact-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../assets/contact-bg.jpg') center/cover;
    opacity: 0.1;
}

.contact-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
    z-index: 1;
}

.contact-section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    margin: 1rem auto;
}

.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--box-shadow);
    position: relative;
    z-index: 1;
}

.modern-form .form-group {
    position: relative;
    margin-bottom: 2rem;
}

.modern-form input,
.modern-form textarea {
    width: 100%;
    padding: 0.8rem 0;
    font-size: 1rem;
    border: none;
    border-bottom: 2px solid #ddd;
    background: transparent;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.modern-form label {
    position: absolute;
    top: 0.8rem;
    left: 0;
    font-size: 1rem;
    color: #999;
    pointer-events: none;
    transition: all 0.3s ease;
}

.modern-form input:focus,
.modern-form textarea:focus {
    outline: none;
    border-bottom-color: var(--accent-color);
}

.modern-form input:focus ~ label,
.modern-form textarea:focus ~ label,
.modern-form input:valid ~ label,
.modern-form textarea:valid ~ label {
    top: -1.2rem;
    font-size: 0.8rem;
    color: var(--accent-color);
}

.focus-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
}

.modern-form input:focus ~ .focus-border,
.modern-form textarea:focus ~ .focus-border {
    width: 100%;
}

.submit-btn {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 2rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.submit-btn i {
    transition: transform 0.3s ease;
}

.submit-btn:hover i {
    transform: translateX(5px);
}

/* FAQ Section */
.faq-section {
    padding: 5rem 0;
    background-color: var(--light-gray);
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
}

.faq-section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    margin: 1rem auto;
}

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

.faq-item {
    background: var(--white);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

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

.faq-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.faq-toggle i {
    color: var(--accent-color);
    font-size: 0.9rem;
}

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

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

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 1.5rem 1.5rem;
}

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

@media (max-width: 768px) {
    .faq-question h3 {
        font-size: 1rem;
    }
    
    .faq-answer p {
        font-size: 0.95rem;
    }
}

/* Form status messages */
#form-status {
    margin-bottom: 15px;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive Design */
/* Tablet Landscape (1024px and below) */
@media screen and (max-width: 1024px) {
    .container {
        max-width: 90%;
        padding: 0 20px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .hero {
        min-height: 60vh;
    }

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

    .hero p {
        font-size: 1.1rem;
        max-width: 80%;
    }

    .hero-features {
        gap: 1.5rem;
    }

    .service-card {
        margin-bottom: 2rem;
    }
}

/* Tablet Portrait (768px and below) */
@media screen and (max-width: 768px) {
    .container {
        width: 95%;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .hero {
        padding: 4rem 0;
        min-height: auto;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: 1rem;
        max-width: 90%;
        margin-bottom: 1.5rem;
    }

    .hero-features {
        font-size: 0.9rem;
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-buttons {
        margin-bottom: 2rem;
    }

    .cta-button {
        padding: 1rem 2rem;
        font-size: 0.9rem;
    }

    .service-image {
        height: 180px;
    }

    .service-content {
        padding: 1.5rem;
    }

    .contact-form-container {
        padding: 2rem;
        margin: 0 1rem;
    }

    .footer {
        padding: 3rem 0;
    }
}

/* Mobile Landscape (576px and below) */
@media screen and (max-width: 576px) and (orientation: landscape) {
    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 0.95rem;
        max-width: 100%;
    }

    .hero-features {
        font-size: 0.8rem;
        gap: 0.8rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        max-width: 400px;
        margin: 0 auto 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 0.8rem;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

@media screen and (max-width: 768px) {
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        bottom: 20px;
        right: 20px;
    }
}

/* Mobile Portrait (480px and below) */
@media screen and (max-width: 480px) {
    .container {
        width: 100%;
        padding: 0 15px;
    }

    .hero {
        padding-top: 10px;
        text-align: center;
    }

    .hero h1 {
        font-size: 1.4rem;
        line-height: 1.4;
    }

    .hero p {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
    }

    .hero-features {
        font-size: 0.8rem;
        gap: 0.8rem;
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons {
        margin-bottom: 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .cta-button {
        width: 100%;
        max-width: 250px;
        text-align: center;
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }

    .service-card {
        margin-bottom: 1.5rem;
    }

    .service-image {
        height: 160px;
    }

    .service-content {
        padding: 1.2rem;
    }

    .service-card h3 {
        font-size: 1.3rem;
    }

    .service-card p {
        font-size: 0.9rem;
    }

    .service-features li {
        font-size: 0.85rem;
    }

    .contact-form-container {
        padding: 1.2rem;
    }

    .footer {
        padding: 2rem 0;
        text-align: center;
    }
}

/* Handle larger mobile devices in portrait */
@media screen and (min-width: 481px) and (max-width: 767px) {
    .hero-buttons {
        display: flex;
        gap: 1rem;
        justify-content: center;
    }

    .cta-button {
        min-width: 180px;
    }
}

/* Handle devices in landscape with limited height */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }

    .hero-content {
        max-width: 80%;
        margin: 0 auto;
    }

    .service-image {
        height: 150px;
    }
}

/* Ensure touch targets are large enough on touch devices */
@media (hover: none) and (pointer: coarse) {
    .nav-links li a,
    .cta-button,
    .service-card,
    .contact-form input[type="submit"] {
        min-height: 44px;
        padding: 12px;
    }

    .service-features li {
        padding: 8px 0;
    }
}
