/* --- Root Variables (matching TMC's colors closely) --- */
:root {
    --primary-color: #007bff; /* Bright Blue (used for accents, links) */
    --secondary-color: #3f4e64; /* Dark Gray Blue (for text, footer) */
    --accent-color: #00bcd4; /* Light Teal Blue (used for hover, specific highlights) */
    --text-dark: #2C3E50; /* Primary body text color */
    --text-light: #ffffff;
    --bg-light: #f8f8f8;
    --bg-white: #ffffff;
    --border-light: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.08); /* Lighter shadow for cards */

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

/* --- Base Styles & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--secondary-color);
}

h1 { font-size: 2.8em; line-height: 1.2; }
h2 { font-size: 1.6em; color: var(--secondary-color); font-weight: 600; }
h3 { font-size: 2em; text-align: center; margin-bottom: 30px; }
h3 i { margin-right: 10px; color: var(--primary-color); }

p { margin-bottom: 20px; font-weight: 400; }
a { text-decoration: none; color: var(--primary-color); transition: color 0.3s; }
a:hover { color: var(--accent-color); }

/* --- Top Info Bar --- */
.top-info-bar {
    background-color: var(--bg-light);
    color: var(--secondary-color);
    font-size: 0.85em;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; 
}

.contact-items span {
    margin-right: 25px;
    white-space: nowrap; 
}

.contact-items i {
    color: var(--primary-color);
    margin-right: 8px;
}

.social-icons a {
    color: var(--secondary-color);
    margin-left: 15px;
    font-size: 1.1em;
}
.social-icons a:hover {
    color: var(--primary-color);
}

/* --- Navigation Bar --- */
.navbar {
    background-color: var(--bg-white);
    padding: 15px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Stronger shadow */
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px; 
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0; 
}

.nav-links li {
    margin-left: 30px;
    position: relative;
}

.nav-links a {
    color: var(--secondary-color);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1em;
    padding: 5px 0;
    display: block;
    transition: color 0.3s, border-bottom 0.3s; /* Added transition */
}

.nav-links a:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color); /* Subtle hover effect */
}

/* Dropdown specific styles */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--bg-white);
    min-width: 180px; /* Slightly wider */
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 100;
    border-top: 3px solid var(--primary-color);
    padding: 5px 0;
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-weight: 400;
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.search-icon {
    font-size: 1.2em;
    color: var(--secondary-color);
    cursor: pointer;
    margin-left: 20px;
}
.search-icon:hover {
    color: var(--primary-color);
}


/* --- Hero Section Fixes and Styles --- */
.hero-standards {
    /* FIX: Use your background image path and ensure full cover */
    background: url('isobg.jpg') no-repeat center center/cover;
    position: relative;
    color: var(--text-light);
    overflow: hidden; 
    padding: 120px 0 100px 0; 
    min-height: 450px; 
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 0;
}

.hero-content-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr; 
    gap: 30px;
    align-items: center;
    position: relative; 
    z-index: 10;
}

.globe-placeholder {
    text-align: center;
    position: relative;
    transform: rotate(15deg); 
}

.globe-placeholder i {
    font-size: 12em; 
    color: var(--primary-color); 
    text-shadow: 0 0 25px rgba(0, 123, 255, 0.9); 
    animation: pulse 2s infinite alternate, spin 20s linear infinite; /* Restored spin animation */
}

@keyframes pulse {
    from { transform: scale(1) rotate(15deg); opacity: 0.8; }
    to { transform: scale(1.05) rotate(15deg); opacity: 1; }
}


.standards-checklist {
    font-family: var(--font-body);
    font-weight: 400;
}

.hero-headline {
    color: var(--text-light);
    font-size: 2.2em; 
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    font-family: var(--font-heading);
    font-weight: 700;
    text-align: left; 
}

.standards-checklist ul {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 12px 20px; 
    padding-left: 0;
    text-align: left;
}

.standards-checklist li {
    font-size: 1.1em; 
    color: var(--text-light);
    white-space: nowrap; 
}

.standards-checklist li i {
    color: var(--accent-color); 
    margin-right: 8px;
}

/* --- Internal Page Hero --- */
.page-title-hero {
    background-color: var(--primary-color);
    position: relative;
    padding: 80px 0;
    color: var(--text-light);
    text-align: center;
}
.page-title-hero h1 {
    color: var(--text-light);
    font-size: 2.5em;
    margin-bottom: 5px;
}
.page-title-hero p {
    font-size: 1.2em;
    opacity: 0.9;
    margin-bottom: 0;
}


/* --- Welcome Section & Features --- */
.section {
    padding: 80px 0;
}

.welcome-section {
    background-color: var(--bg-white);
    text-align: center;
}

.section-title {
    font-size: 2.2em;
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.section-separator {
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 0 auto 50px auto;
}

.welcome-section p {
    max-width: 900px;
    margin: 0 auto 30px auto;
    font-size: 1.1em;
    color: var(--text-dark);
}

.feature-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--bg-light);
    border-radius: 8px;
    box-shadow: 0 6px 15px var(--shadow-light); 
    transition: transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover {
    transform: translateY(-8px); 
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1); 
}

.feature-card i {
    font-size: 3.5em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h4 {
    font-size: 1.4em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-card p {
    font-size: 0.95em;
    margin-bottom: 25px;
    color: var(--secondary-color);
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 0.9em;
}
.read-more:hover {
    color: var(--accent-color);
}
.read-more i {
    margin-left: 5px;
    transition: margin-left 0.3s;
}
.read-more:hover i {
    margin-left: 10px;
}

/* --- Standards Grid (Visuals) --- */
.standards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}

/* ------------------------------------------------------------------ */
/* FINAL CRITICAL FIXES FOR CARD STRUCTURE AND TEXT VISIBILITY */
/* ------------------------------------------------------------------ */

.standard-card {
    /* Base Card Container */
    background: var(--bg-white);
    padding: 0; /* No padding on the main card div */
    border-radius: 8px;
    box-shadow: 0 6px 15px var(--shadow-light);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden; 
    min-height: 300px; /* Increased minimum height for safety */
    display: flex;
    flex-direction: column; /* Stack image box and text box */
}

/* 1. Image Container (Holds and sizes the image) */
.card-image-box {
    display: block;
    width: 100%;
    height: 150px; /* Fixed height for the visual element */
    overflow: hidden;
    flex-shrink: 0; /* Prevents this box from shrinking */
}

/* 2. Actual Image Styling */
.standard-image {
    width: 100%; 
    height: 100%; 
    object-fit: cover; /* Fills the 150px space */
    display: block;
}

/* 3. Text Container Styling (Ensures text has padding and margin) */
.card-text-box {
    /* Padding provides space around the text */
    padding: 15px !important; 
    text-align: center;
    /* Flex-grow allows it to take up any remaining space if needed */
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.standards-section .standard-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.standards-section .standard-card h4, .standards-section .standard-card p {
    /* Ensure no residual padding/margin conflicts from global rules */
    padding: 0 !important;
    margin-top: 5px; 
    margin-bottom: 5px; 
    line-height: 1.2; /* Tighter line spacing for better fit */
}

/* --- Achievements Page Specific Styles --- */
/* Why Choose Us Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}
.benefit-card {
    padding: 30px;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
}
.benefit-card i {
    font-size: 2em;
    color: var(--accent-color);
    margin-bottom: 15px;
}
.benefit-card h4 {
    color: var(--primary-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Adjusted grid size */
    gap: 30px;
    margin-top: 50px;
    text-align: center;
}
.stat-box {
    padding: 25px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-light);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.stat-box i {
    font-size: 3.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.stat-box h4 {
    font-size: 1.6em;
    margin-bottom: 5px;
}

.section-quote {
    max-width: 800px;
    margin: 50px auto;
    padding: 30px;
    border-left: 5px solid var(--accent-color);
    font-style: italic;
    background: var(--bg-light);
    text-align: left;
    font-size: 1.1em;
    color: var(--secondary-color);
}
.section-quote i {
    color: var(--accent-color);
    margin-right: 10px;
}

.certification-focus ul {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    max-width: 900px;
    margin: 30px auto;
}
.certification-focus li i {
    color: var(--primary-color);
    margin-right: 10px;
}

/* --- CERTIFICATION GALLERY SECTION --- */
.gallery-section {
    padding: 80px 0;
    background-color: var(--bg-section);
}

.certification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.certification-placeholder {
    height: 250px; /* Uniform height for placeholders */
    background-color: var(--bg-white);
    border: 2px dashed var(--border-light);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 0.9em;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.certification-placeholder i {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 10px;
}


/* --- Contact Page Layout --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr; 
    gap: 50px;
}

.contact-info {
    padding-right: 20px;
}
.detail-block h4 {
    color: var(--primary-color);
    font-size: 1.2em;
}
.detail-block h4 i {
    color: var(--secondary-color);
    margin-right: 8px;
}
.map-container {
    height: 450px;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Alignment Adjustments */
.section-title-left {
    text-align: left !important;
}
.section-separator-left {
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 0 0 30px 0 !important;
}

/* --- Footer --- */
footer {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 30px 0;
    text-align: center;
    font-size: 0.9em;
}


/* ================================================= */
/* ANIMATION KEYFRAMES */
/* ================================================= */

/* Keyframes for the Fade-In-Up effect */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Keyframes for the subtle spinning globe */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Keyframes for the primary button hover pulse */
@keyframes pulse-color {
    0% { border-color: var(--primary-color); }
    100% { border-color: var(--accent-color); }
}

/* ================================================= */
/* APPLYING ANIMATIONS */
/* ================================================= */

/* Elements that slide/fade in when the page loads or scrolls into view */
.section-title,
.section-lead,
.standards-grid,
.feature-cards-grid,
.benefits-grid,
.stats-grid,
.certification-grid,
.section-quote,
.method-content,
.contact-grid {
    animation: fadeInUp 1s ease-out both;
}

/* Staggering delay for specific sections */
.section-title { animation-delay: 0.2s; }
.section-lead { animation-delay: 0.4s; }
.feature-card:nth-child(1), .benefit-card:nth-child(1) { animation-delay: 0.6s; }
.feature-card:nth-child(2), .benefit-card:nth-child(2) { animation-delay: 0.8s; }
.feature-card:nth-child(3), .benefit-card:nth-child(3) { animation-delay: 1.0s; }

/* Subtle Continuous Spin for the Main Globe in the Hero */
.globe-placeholder i {
    animation: pulse 2s infinite alternate, spin 20s linear infinite;
    /* Combine the pulse effect with a slow, constant spin */
}

/* Continuous Subtle Spin on Achievement Icons (Stat boxes) */
.stat-box i {
    transition: transform 0.3s;
}
.stat-box:hover i {
    animation: spin 3s linear infinite;
}

/* Button Animation */
.btn {
    transition: all 0.3s ease;
}
.primary-btn:hover {
    animation: pulse-color 0.5s infinite alternate;
}

/* --- Media Queries --- */
@media (max-width: 992px) {
    .top-bar-content { flex-direction: column; text-align: center; }
    .contact-items span { margin: 5px 0; display: block; }
    .social-icons { margin-top: 10px; }

    .nav-links { display: none; } 
    .nav-content { justify-content: space-between; } 

    .hero-content-grid { grid-template-columns: 1fr; text-align: center; }
    .globe-placeholder { margin-bottom: 50px; display: none; } /* Hide globe on smaller screens */
    .hero-headline { font-size: 2em; }
    .standards-checklist ul { grid-template-columns: 1fr; }
    .standards-checklist li { font-size: 1em; white-space: normal; }

    .contact-grid { grid-template-columns: 1fr; }
    .contact-info { padding-right: 0; }
}

@media (max-width: 768px) {
    h1 { font-size: 2em; }
    h3 { font-size: 1.8em; }
    .section { padding: 50px 0; }
    .feature-cards-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .certification-focus ul { grid-template-columns: 1fr; }
    .certification-grid { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .hero-standards { padding: 50px 0; }
    .hero-overlay { padding: 30px 0; }
    .globe-placeholder i { font-size: 10em; }
    .section-title { font-size: 1.8em; }
    .welcome-section p { font-size: 1em; }
}