/* Base Styles & Variables */
:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
    --success-color: #4bb543;
    --warning-color: #f0ad4e;
    --danger-color: #d9534f;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fa;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    gap: 0.5rem;
}

.btn i {
    font-size: 1rem;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.secondary-btn {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.secondary-btn:hover {
    background-color: var(--light-color);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.large-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Header Styles */
.main-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;
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
}

.logo h1 span {
    color: var(--primary-color);
}

.logo p {
    font-size: 0.8rem;
    color: var(--gray-color);
    margin-top: -0.5rem;
}

.main-nav ul {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--dark-color);
    font-weight: 500;
    position: relative;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.main-nav a:hover::after {
    width: 100%;
}

.download-btn {
    margin-left: 1rem;
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ed 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.hero-content {
    flex: 1;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--gray-color);
    margin-bottom: 2rem;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.resume-preview {
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: var(--transition);
}

.resume-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Resume Builder Section */
.resume-builder {
    padding: 4rem 0;
    background-color: white;
}

.builder-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.form-section {
    flex: 1;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    height: fit-content;
}

.preview-section {
    flex: 1;
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

.form-tabs {
    display: flex;
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--gray-color);
    position: relative;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.half-width {
    flex: 1;
}

.experience-item,
.education-item {
    background-color: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    position: relative;
}

.remove-exp-btn,
.remove-edu-btn {
    margin-top: 1rem;
    width: 100%;
}

.skills-input-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.skills-input-container input {
    flex: 1;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-tag .remove-skill {
    cursor: pointer;
    font-size: 0.75rem;
}

.preview-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Resume Preview Styles */
#resume-preview {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    min-height: 800px;
}

.resume-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.resume-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
}

.resume-title {
    font-size: 1.2rem;
    color: var(--gray-color);
    margin-bottom: 0.5rem;
}

.resume-contact {
    text-align: right;
}

.resume-contact p {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.resume-section {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--light-gray);
}

.resume-summary p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.experience-item-preview,
.education-item-preview {
    margin-bottom: 1.5rem;
}

.experience-header,
.education-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.experience-title,
.education-degree {
    font-weight: 600;
    font-size: 1.1rem;
}

.experience-company,
.education-institution {
    font-weight: 500;
    color: var(--gray-color);
}

.experience-dates,
.education-dates {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.experience-description,
.education-description {
    font-size: 0.95rem;
    line-height: 1.6;
    padding-left: 1rem;
    border-left: 2px solid var(--light-gray);
    margin-left: 0.5rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-pill {
    background-color: var(--light-gray);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background-color: #f8f9fa;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
}

/* Templates Section */
.templates {
    padding: 5rem 0;
    background-color: white;
}

.templates h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.section-subtitle {
    text-align: center;
    color: var(--gray-color);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.template-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
}

.template-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.template-preview {
    overflow: hidden;
}

.template-preview img {
    transition: var(--transition);
    width: 100%;
    height: auto;
    display: block;
}

.template-card:hover .template-preview img {
    transform: scale(1.05);
}

.template-card h3 {
    padding: 1.5rem;
    font-size: 1.2rem;
}

.template-select-btn {
    margin-bottom: 1.5rem;
    width: 80%;
}

/* How It Works Section */
.how-it-works {
    padding: 5rem 0;
    background-color: #f8f9fa;
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.step {
    flex: 1;
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

.step:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

.step h3 {
    margin-bottom: 1rem;
}

/* Footer Styles */
.main-footer {
    background-color: var(--dark-color);
    color: white;
    padding: 4rem 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul a {
    color: #adb5bd;
    transition: var(--transition);
}

.footer-section ul a:hover {
    color: white;
}

.footer-bottom {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Responsive Styles */
/* Add these to your existing styles.css */

/* Improved Mobile Responsiveness */
@media (max-width: 992px) {
    .builder-container {
        flex-direction: column;
    }
    
    .preview-section {
        position: static;
        margin-top: 2rem;
    }
    
    .resume-preview {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-nav {
        margin: 1rem 0;
        width: 100%;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .download-btn {
        margin: 1rem 0 0 0;
        width: 100%;
    }
    
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        margin-bottom: 2rem;
    }
    
    .form-tabs {
        overflow-x: auto;
        white-space: nowrap;
        display: block;
        padding-bottom: 5px;
    }
    
    .form-tabs::-webkit-scrollbar {
        height: 5px;
    }
    
    .form-tabs::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 10px;
    }
    
    .tab-btn {
        display: inline-block;
        margin-right: 0.5rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .half-width {
        width: 100%;
    }
    
    .preview-actions {
        flex-direction: column;
    }
    
    .preview-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .page-hero h2 {
        font-size: 1.8rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .features-grid, .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-container {
        flex-direction: column;
    }
    
    .resume-header {
        flex-direction: column;
    }
    
    .resume-contact {
        text-align: left;
        margin-top: 1rem;
    }
    
    .experience-header, .education-header {
        flex-direction: column;
    }
    
    .experience-dates, .education-dates {
        margin-top: 0.5rem;
    }
    
    .skills-input-container {
        flex-direction: column;
    }
    
    #skill-input, #language-input {
        margin-bottom: 0.5rem;
    }
    
    #add-skill-btn, #add-language-btn {
        width: 100%;
    }
}

/* Improved Form Elements for Mobile */
input, textarea, select {
    font-size: 16px !important; /* Prevents zooming on iOS */
}

/* Better Button Sizing */
.btn {
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
}

/* Improved Tab Navigation for Mobile */
.form-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.form-tabs::-webkit-scrollbar {
    display: none;
}

/* Better Experience/Education Items */
.experience-item, .education-item {
    padding: 1rem;
    margin-bottom: 1rem;
}

.remove-exp-btn, .remove-edu-btn {
    margin-top: 0.5rem;
}

/* Improved Skills Tags */
.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.skill-tag {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
}


/* Add this to your styles.css */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    overflow-x: hidden;
    height: 100%;
    position: relative;
}

/* Prevent layout shifts when inputs are focused */
@media (max-width: 768px) {
    .form-section {
        padding-bottom: 300px; /* Space for keyboard */
    }
    
    input, textarea, select {
        font-size: 16px !important;
        transform: translateZ(0);
    }
}

