/* Craft My Career - Main Stylesheet */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --success-color: #10b981;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

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

li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

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

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

/* Header and Navigation */
header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

.logo-text {
    display: none !important;
    visibility: hidden;
    width: 0;
    height: 0;
    overflow: hidden;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-link-login {
    color: var(--text-dark) !important;
    font-weight: 500;
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.85) 0%, rgba(30, 64, 175, 0.85) 100%);
    color: white;
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0; /* background image layer */
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.35) 0%, rgba(17, 24, 39, 0.55) 100%);
    z-index: 1; /* overlay layer above image */
}

/* Contact hero - plain background without image */
.contact-hero {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(30, 64, 175, 0.9) 100%);
}

.contact-hero::before {
    display: none; /* Hide background image layer */
}

.contact-hero::after {
    display: none; /* Remove overlay for contact page */
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    padding: 0 1rem;
}

/* Specific hero backgrounds */
.jobs-hero::before {
    background-image: url('../images/find_your_dream_job.jpg');
}

.study-hero::before {
    background-image: url('../images/study in India.jpg');
}

.about-hero::before {
    background-image: url("../images/About Us CMC.JPG.jpg");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

.why-study-hero {
    background-image: url('../images/wsi.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.why-study-hero::before {
    display: none !important;
}

.about-hero {
    min-height: 500px;
    padding: 8rem 2rem;
    background-position: center center;
    background-size: cover;
}

.about-hero::after {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.25) 0%, rgba(17, 24, 39, 0.45) 100%);
}


/* Image sections */
.section-with-image {
    position: relative;
    overflow: hidden;
}

.section-image-overlay {
    position: absolute;
    top: 0;
    width: 35%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 0;
}

.section-image-overlay.left {
    left: 0;
}

.section-image-overlay.right {
    right: 0;
}

.section-image-overlay + .container {
    position: relative;
    z-index: 1;
}

/* Section images */
.section-image-top {
    margin-bottom: 2rem;
}

.section-image-top img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    object-fit: contain;
    background: var(--bg-light);
}

.section-image-top img:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Responsive image handling */
@media (max-width: 768px) {
    .hero::before {
        opacity: 0.2;
    }
    
    .service-card-image,
    .section-image-top img {
        height: 250px !important;
    }
}

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

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: white;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Container and Sections */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    box-sizing: border-box;
}

.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* About Us Section */
.about {
    background: var(--bg-light);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Services Section */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Why Choose Us */
.why-choose-us {
    background: var(--bg-light);
}

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

.feature {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.feature h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Forms */
.form-section {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.file-upload {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: block;
    padding: 1rem;
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-label:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

/* Job Listings */
.job-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.job-filters select,
.job-filters input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
}

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

.job-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

.job-card .company {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 1rem;
}

.job-card .description {
    margin-bottom: 1.5rem;
}

/* Course Cards */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.course-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

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

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

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

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    display: block;
    margin-bottom: 0.5rem;
}

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

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

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: white;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #20ba5a;
}

.whatsapp-float a {
    color: white;
}

/* Contact Page */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    nav {
        padding: 0 1.5rem;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .logo img {
        height: 50px;
    }
    
    .logo-text {
        display: none !important;
        visibility: hidden;
    }
    
    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0 1rem;
        flex-wrap: wrap;
    }
    
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-white);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        -webkit-transition: left 0.3s ease;
        -moz-transition: left 0.3s ease;
        -o-transition: left 0.3s ease;
        box-shadow: var(--shadow);
        padding: 2rem 0;
        z-index: 999;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        width: 100%;
        margin: 0;
        padding: 0.5rem 0;
    }
    
    .nav-links a {
        display: block;
        padding: 0.75rem 1rem;
        width: 100%;
        white-space: normal;
        text-align: center;
        box-sizing: border-box;
    }
    
    /* Prevent text duplication/overlap */
    .nav-links li {
        position: relative;
    }
    
    .nav-links li::before,
    .nav-links li::after {
        content: none;
    }

    .mobile-menu-toggle {
        display: block;
        z-index: 1001;
    }
    
    .logo {
        flex: 1;
        min-width: 0;
    }
    
    .logo img {
        height: 40px;
    }
    
    .logo-text {
        display: none !important;
        visibility: hidden;
    }

    h1 {
        font-size: 2rem;
        word-wrap: break-word;
    }

    .hero h1 {
        font-size: 2rem;
        word-wrap: break-word;
    }

    .hero {
        padding: 4rem 1rem;
        min-height: auto;
    }
    
    .about-hero {
        padding: 5.2rem 1rem;
        min-height: 280px;
    }
    
    .hero-content {
        padding: 2rem 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .section {
        padding: 3rem 0;
    }

    .container {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .job-filters {
        flex-direction: column;
        width: 100%;
    }
    
    .job-filters select,
    .job-filters input {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .jobs-grid,
    .courses-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }
    
    .services {
        grid-template-columns: 1fr;
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .form-section {
        width: 100%;
        max-width: 100%;
        padding: 1.5rem;
        margin: 0 1rem;
        box-sizing: border-box;
    }
    
    /* Prevent text overflow */
    p, h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 0.75rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .logo img {
        height: 40px;
    }
    
    .logo-text {
        display: none !important;
        visibility: hidden;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none;
}

.success-message {
    background: var(--success-color);
    color: white;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    text-align: center;
}

.error-message {
    background: #ef4444;
    color: white;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    text-align: center;
}

