/* 
 * KIRND Institute of Research & Development
 * Main Stylesheet
 */

/* ======= Base Styles ======= */
:root {
    --primary-color: #005B96;
    --secondary-color: #03396c;
    --accent-color: #6497b1;
    --light-accent: #b3cde0;
    --light-color: #f0f8ff;
    --dark-color: #011f4b;
    --text-color: #333;
    --light-text-color: #666;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --border-color: #ddd;
    --success-color: #4CAF50;
    --error-color: #F44336;
    --warning-color: #FF9800;
    --font-primary: 'Roboto', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

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

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

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

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

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    position: relative;
}

.underline {
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 0 auto;
}

/* ======= Layout ======= */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    color: var(--dark-color);
    font-weight: 700;
    font-size: 1.5rem;
    font-family: var(--font-heading);
}

.logo-svg {
    margin-right: 0.5rem;
}

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

nav .nav-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav .nav-menu li {
    margin-left: 1.5rem;
}

nav .nav-menu a {
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.5rem 0;
    font-family: var(--font-heading);
    position: relative;
}

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

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

nav .nav-menu a.active {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

main {
    min-height: calc(100vh - 200px);
}

/* ======= Home Page ======= */
.hero {
    background: linear-gradient(rgba(1, 31, 75, 0.7), rgba(1, 31, 75, 0.7)), url('https://pixabay.com/get/g633d2924f1d0c7cd510b8c16e6ab956bcb4974cc70f20dd83af778b5ddc81df1e91be934c0e5a9f5b878305c5752f9fa8394ced68ffd7f66f791b980e36d12cb_1280.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 6rem 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

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

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.overview {
    padding: 5rem 0;
    background-color: var(--light-color);
}

.overview-content {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.overview-text {
    flex: 1;
}

.overview-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.featured-services {
    padding: 5rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.service-card {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--light-text-color);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.learn-more {
    font-weight: 500;
    color: var(--primary-color);
    display: inline-block;
    position: relative;
}

.learn-more:after {
    content: '→';
    position: absolute;
    right: -15px;
    top: 0;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.learn-more:hover:after {
    opacity: 1;
    transform: translateX(5px);
}

.why-choose {
    padding: 5rem 0;
    background-color: var(--light-gray);
}

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

.feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature-icon {
    font-size: 1.75rem;
    color: var(--primary-color);
    min-width: 40px;
}

.feature-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-content p {
    color: var(--light-text-color);
}

.cta {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.cta h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.cta .btn {
    background-color: white;
    color: var(--primary-color);
}

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

/* ======= About Page ======= */
.page-header {
    background-color: var(--primary-color);
    color: white;
    padding: 2.5rem 0;
    text-align: center;
}

.page-header h1 {
    color: white;
    margin-bottom: 0.5rem;
}

.breadcrumb {
    font-size: 0.9rem;
    opacity: 0.8;
}

.breadcrumb a {
    color: white;
}

.about-intro {
    padding: 5rem 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.about-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.about-text {
    flex: 1;
}

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

.history {
    padding: 5rem 0;
    background-color: var(--light-color);
}

.history-content {
    max-width: 900px;
    margin: 0 auto;
}

.aim-vision {
    padding: 5rem 0;
}

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

.card {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    height: 100%;
}

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

.mission {
    padding: 5rem 0;
    background-color: var(--light-gray);
}

.mission-points {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.mission-point {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.point-icon {
    font-size: 2rem;
    color: var(--primary-color);
    min-width: 50px;
}

.lab-images {
    padding: 5rem 0;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.image-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.image-item:hover {
    transform: scale(1.03);
}

/* ======= Services Page ======= */
.services-intro {
    padding: 5rem 0;
}

.services-overview {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 3rem;
}

.service-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.category-link {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background-color: var(--light-color);
    color: var(--primary-color);
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.service-section {
    padding: 4rem 0;
}

.service-section:nth-child(odd) {
    background-color: var(--light-color);
}

.service-content {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.service-image {
    flex: 1;
    max-width: 40%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.service-table {
    flex: 1.5;
}

table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background-color: var(--primary-color);
    color: white;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: rgba(179, 205, 224, 0.2);
}

.enquire-btn {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.enquire-btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* ======= Contact Page ======= */
.contact-intro {
    padding: 5rem 0 2rem;
}

.contact-message {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.contact-content {
    padding: 3rem 0 5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 3rem;
}

.contact-form {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.contact-form h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.success {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.error {
    background-color: rgba(244, 67, 54, 0.1);
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.required {
    color: var(--error-color);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-color);
    outline: none;
}

input[type="text"]:disabled,
input[type="email"]:disabled,
input[type="tel"]:disabled,
textarea:disabled,
select:disabled {
    background-color: var(--light-gray);
    cursor: not-allowed;
}

.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-group.inline {
    flex-direction: row;
    gap: 2rem;
}

.checkbox-group label,
.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
    margin-right: 0.5rem;
}

.consent label {
    display: flex;
    align-items: flex-start;
}

.consent input[type="checkbox"] {
    margin-top: 0.25rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-card {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.contact-card h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    min-width: 1.5rem;
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.business-hours {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.business-hours h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.business-hours ul {
    list-style: none;
    padding: 0;
}

.business-hours li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.business-hours li:last-child {
    border-bottom: none;
}

.business-hours span {
    font-weight: 500;
    min-width: 150px;
    display: inline-block;
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* ======= Footer ======= */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 4rem 0 1rem;
}

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

.footer-section h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.75rem;
}

.footer-section i {
    margin-right: 0.5rem;
    color: var(--light-accent);
}

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

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

.footer-section ul a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-section ul a:hover {
    color: white;
}

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

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ======= Responsive Styles ======= */
@media (max-width: 992px) {
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .overview-content,
    .about-content,
    .service-content {
        flex-direction: column;
    }
    
    .service-image,
    .overview-image,
    .about-image {
        max-width: 100%;
        margin-bottom: 2rem;
        order: -1;
    }
    
    .service-table {
        overflow-x: auto;
    }
    
    .two-column-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    nav .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        opacity: 0;
        transition: all 0.3s ease;
        pointer-events: none;
    }
    
    nav .nav-menu.show {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    
    nav .nav-menu li {
        margin: 0;
    }
    
    nav .nav-menu a {
        display: block;
        padding: 0.75rem 1.5rem;
    }
    
    nav .nav-menu a:after {
        display: none;
    }
    
    nav .nav-menu a:hover,
    nav .nav-menu a.active {
        background-color: var(--light-color);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .section-padding {
        padding: 3rem 0;
    }
    
    .radio-group.inline {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 576px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    table {
        min-width: 600px;
    }
}
