/* --- Global Styles & Variables --- */
:root {
    --primary-color: #0a4d68;
    --secondary-color: #088395;
    --accent-color: #f39c12;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #555;
    --border-color: #dee2e6;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #fff; /* White background for content pages */
    color: var(--text-color);
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
    overflow: hidden;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: var(--dark-color);
    line-height: 1.2;
}

#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

#overlay.active {
    display: block;
}


/* --- Header & Navigation --- */
.header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-top: env(safe-area-inset-top);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 65px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo img {
    height: 45px;
    width: auto;
}

.logo span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.primary-menu .nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.primary-menu a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 5px 0;
    position: relative;
}

.primary-menu a:hover {
    color: var(--secondary-color);
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 260px;
    box-shadow: var(--box-shadow);
    z-index: 1;
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    margin-top: 10px;
    border: 1px solid #eee;
}

.dropdown-content a {
    color: var(--dark-color);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
}

.dropdown-content a:hover {
    background-color: var(--light-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown .dropbtn i {
    font-size: 0.7rem;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropbtn i {
    transform: rotate(180deg);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
}

/* --- Hero Section (Homepage) --- */
.hero {
    background: linear-gradient(rgba(10, 77, 104, 0.8), rgba(10, 77, 104, 0.8)), url('https://images.unsplash.com/photo-1563089145-599997674d42?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 100px 20px;
}

.hero h1 {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    background-color: var(--accent-color);
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.4);
}

.cta-button:hover {
    background-color: #e67e22;
    transform: translateY(-3px);
}

/* --- Tools Section (Homepage) --- */
.tools-section {
    padding: 80px 0;
    background-color: var(--light-color);
}

.tools-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.tools-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px auto;
    font-size: 1.1rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.tool-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.tool-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.tool-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.tool-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.tool-card p {
    font-size: 1rem;
    margin-bottom: 25px;
    flex-grow: 1;
}

.tool-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    align-self: center;
}

/* --- Generic Page Styles (For About, Privacy, Contact, etc.) --- */
.page-hero {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--light-color);
    border-bottom: 1px solid #e9ecef;
}

.page-hero h1 {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.page-hero p {
    font-size: 1.1rem;
    color: var(--text-color);
}

.content-container {
    padding-top: 60px;
    padding-bottom: 60px;
}

.content-section h2 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

.content-section:first-child h2 {
    margin-top: 0;
}

.content-section h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.content-section p, .content-section li {
    line-height: 1.7;
    margin-bottom: 1rem;
}

.content-section ul {
    list-style-type: disc;
    padding-left: 20px;
}

/* --- Contact Page Specific Styles --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: flex-start;
}

.contact-details h3, .contact-form h3 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 5px;
}

.contact-item strong {
    font-size: 1.1rem;
    color: var(--dark-color);
}
.contact-item p {
    margin: 4px 0 0 0;
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10, 77, 104, 0.2);
}
.submit-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    background-color: var(--primary-color);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s;
}
.submit-btn:hover {
    background-color: #083b4e;
}


/* --- CTA Section --- */
.cta-section {
    background-color: var(--dark-color);
    color: #fff;
    text-align: center;
    padding: 60px 20px;
}

.cta-section h2 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-section p {
    color: #ccc;
    margin-bottom: 2rem;
}

/* --- Footer --- */
.footer {
    background-color: var(--dark-color);
    color: #ccc;
    padding: 40px 0 20px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #555;
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.footer-menu a {
    color: #ccc;
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: #fff;
}

.copyright {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .logo span { font-size: 1.2rem; }
    .logo img { height: 35px; }
    .mobile-menu-toggle { display: block; }
    .primary-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: min(80vw, 320px);
        height: 100vh;
        background-color: #fff;
        z-index: 999;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .primary-menu.active { transform: translateX(0); }
    .primary-menu .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 2rem;
        padding-left: calc(2rem + env(safe-area-inset-left));
        padding-right: calc(2rem + env(safe-area-inset-right));
    }
    .primary-menu li { width: 100%; text-align: left; }
    .primary-menu a { padding: 1rem 0; display: block; width: 100%; font-size: 1.1rem; }
    .dropdown:hover .dropdown-content { display: none; }
    .dropdown-content {
        position: static;
        display: none;
        box-shadow: none;
        background-color: #f7f7f7;
        width: 100%;
        border-radius: 0;
        margin-top: 0;
        padding: 0;
        padding-left: 1rem; 
    }
    .dropdown-content a { padding: 12px 16px; }
    .dropdown.active > .dropdown-content { display: block; }
    .dropdown.active > a > i { transform: rotate(180deg); }
    .dropdown .dropbtn { display: flex; justify-content: space-between; align-items: center; width: 100%; }

    .hero h1, .page-hero h1 { font-size: 2rem; }
    .hero p, .page-hero p { font-size: 1rem; }
    .tools-section { padding: 60px 0; }
    .tools-section h2, .content-section h2 { font-size: 2rem; }
    .footer-content { flex-direction: column; text-align: center; }
    .footer-menu a { margin: 0 10px; display: inline-block; padding: 5px 0; }
}