/* css/style.css */

/* Basic Reset & Root Variables */
:root {
    --primary-color: #3A7CA5; /* A calm, professional blue */
    --secondary-color: #2F4550; /* Darker blue/grey for accents */
    --accent-color: #D9A273; /* A warm accent for CTAs or highlights */
    --light-color: #FFFFFF;
    --dark-color: #333333;
    --neutral-color: #F4F4F4; /* Light grey for backgrounds */
    --border-color: #DDDDDD;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;

    --font-primary: 'Poppins', sans-serif;
    --font-headings: 'Roboto Slab', serif; /* A slightly more distinct heading font */

    --header-height: 70px;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 10px; /* For easier REM calculations (1rem = 10px) */
}

body {
    font-family: var(--font-primary);
    font-size: 1.6rem; /* Default to 16px */
    line-height: 1.7;
    color: var(--dark-color);
    background-color: var(--light-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Utility Classes */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding {
    padding: 6rem 0;
}

.bg-light {
    background-color: var(--neutral-color);
}
.bg-dark {
    background-color: var(--secondary-color);
}
.text-light {
    color: var(--light-color) !important;
}
.text-light p, .text-light h1, .text-light h2, .text-light h3 { /* Added h1 */
    color: var(--light-color) !important;
}

.text-center {
    text-align: center;
}

.section-title {
    font-family: var(--font-headings);
    font-size: 3.2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 0.8rem auto 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1.2rem 2.8rem;
    font-size: 1.6rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed);
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--light-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.btn-primary:hover {
    background-color: #c88f62; /* Darken accent */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.btn-primary .arrow {
    margin-left: 0.8rem;
    transition: transform 0.2s ease-out;
}
.btn-primary:hover .arrow {
    transform: translateX(5px);
}


.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--light-color);
}
.btn-secondary:hover {
    background-color: #1e2a33; /* Darken secondary */
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--light-color);
}
.btn-danger:hover {
    background-color: #c82333; /* Darken danger */
}

/* Header & Navbar */
#main-header {
    background-color: var(--light-color);
    box-shadow: var(--box-shadow);
    position: fixed; /* Sticky header */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.logo {
    height: 40px; 
    margin-right: 1rem;
}

.brand-name {
    font-family: var(--font-headings);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar-menu {
    list-style: none;
    display: flex;
    margin: 0; /* Reset default ul margin */
}

.navbar-menu li {
    margin-left: 2.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color var(--transition-speed);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width var(--transition-speed);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.menu-toggle {
    display: none; 
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
}

.menu-icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: all var(--transition-speed);
    border-radius: 3px;
}

.menu-toggle.active .menu-icon-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active .menu-icon-bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .menu-icon-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* Hero Section */
.hero-section {
    background: url('../assets/images/hero-background.jpg') no-repeat center center/cover; /* Ensure this path is correct */
    height: 100vh; 
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    color: var(--light-color);
    margin-top: var(--header-height); 
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(47, 69, 80, 0.6); 
}

.hero-content {
    position: relative; 
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-family: var(--font-headings);
    font-size: 4.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 2rem;
    margin-bottom: 3rem;
    font-weight: 300;
}

.btn-hero {
    padding: 1.5rem 3.5rem;
    font-size: 1.8rem;
}

/* Ad Placeholders */
.ad-placeholder {
    padding: 2rem 0;
    text-align: center;
}
.ad-placeholder .adsbygoogle {
    background-color: #f9f9f9;
    /* border: 1px dashed #ddd; /* For visibility if ad doesn't load */
    min-height: 90px;
}

/* Resume Builder Section */
.builder-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 3rem;
    align-items: flex-start; 
}

/* Form Styling */
.form-container {
    background-color: var(--light-color);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.cv-form .form-section {
    margin-bottom: 3.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
}
.cv-form .form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    font-family: var(--font-headings);
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
}
.form-section-title .icon {
    margin-right: 1rem;
    font-size: 2.4rem;
    color: var(--primary-color);
}

.cv-form-row {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    background-color: #fdfdfd;
}
.repeater-item .cv-form-row {
    position: relative; 
    padding-bottom: 5rem; 
}


.form-grid {
    display: grid;
    gap: 2rem;
}
.form-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.form-elem {
    margin-bottom: 1.5rem;
}
.form-elem:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--secondary-color);
}
.form-label .opt-text {
    font-weight: 400;
    font-size: 1.2rem;
    color: #777;
}
.form-label input[type="checkbox"]{
    margin-right: 0.5rem;
    vertical-align: middle;
}

.form-control {
    width: 100%;
    padding: 1.2rem 1.5rem;
    font-size: 1.5rem;
    font-family: var(--font-primary);
    border: 1px solid var(--border-color);
    border-radius: calc(var(--border-radius) / 2);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(58, 124, 165, 0.25);
}
.form-control[type="file"] {
    padding: 0.8rem 1.5rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-text { 
    display: block;
    font-size: 1.2rem;
    color: var(--danger-color);
    margin-top: 0.5rem;
    min-height: 1.5em; 
}

/* Repeater Buttons */
.repeater-add-btn {
    margin-top: 1rem;
    width: 100%;
}
.repeater-remove-btn {
    position: absolute;
    bottom: 1.5rem; 
    right: 1.5rem;
    padding: 0.8rem 1.5rem;
}
.skill-repeater-item .cv-form-row-skills {
    display: flex;
    align-items: flex-end; 
    gap: 1rem;
    padding-bottom: 1rem; 
}
.skill-repeater-item .form-elem {
    flex-grow: 1;
    margin-bottom: 0;
}
.small-remove-btn { /* Specifically for skills repeater item */
    padding: 1.1rem 1.5rem; 
    flex-shrink: 0;
    margin-bottom: 0; 
    height: 46px; /* Approximate form-control height */
    position: static; /* Override absolute positioning from .repeater-remove-btn */
    /* If you want it inline and not absolute for skills: */
    /* position: relative; */
    /* bottom: auto; */
    /* right: auto; */
}


/* Preview Area */
.preview-container-wrapper {
    position: sticky; 
    top: calc(var(--header-height) + 2rem); 
    max-height: calc(100vh - var(--header-height) - 4rem); 
    overflow-y: auto; 
}
.preview-actions {
    margin-bottom: 1.5rem;
    text-align: right;
}
.preview-actions .btn .icon {
    margin-right: 0.5rem;
}

.preview-container {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden; 
    border: 1px solid var(--border-color);
}

.preview-cnt {
    display: grid;
    grid-template-columns: 35% 65%; 
    min-height: 700px; 
}

.preview-cnt-l {
    background-color: #2F4F4F; 
    color: var(--light-color);
    padding: 3rem 2.5rem;
}
.preview-cnt-l h3 { /* Specifically target h3 within this left pane */
    color: var(--light-color) !important; /* Ensure it's white */
    opacity: 0.8;
}

.preview-cnt-r {
    background-color: var(--light-color);
    padding: 3rem 2.5rem;
}

.preview-blk {
    margin-bottom: 2.5rem;
}
.preview-blk:last-child {
    margin-bottom: 0;
}

.preview-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 2rem auto;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}
.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item-name {
    text-align: center;
    margin-bottom: 0.5rem;
}
.preview-item-name .preview-item-val {
    font-size: 2.4rem; 
    font-weight: 700;
    font-family: var(--font-headings);
    line-height: 1.2;
    color: var(--light-color); /* Ensure name is white in left pane */
}

.preview-item-designation {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 2rem;
}
.preview-item-designation .preview-item-val {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.85); /* Ensure designation is light in left pane */
}

.preview-blk-title {
    margin-bottom: 1.2rem;
}
.preview-blk-title h3 { /* General preview block titles */
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-headings);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block; 
    color: var(--secondary-color); /* Default color for h3 */
}
.preview-cnt-l .preview-blk-title h3 { /* Override for left pane */
    border-bottom-color: rgba(255, 255, 255, 0.5);
    color: var(--light-color) !important; /* Ensure it's white */
}


.preview-blk-list .preview-item {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    line-height: 1.6;
}
.preview-cnt-l .preview-blk-list .preview-item { 
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9); /* Light color for text in left pane list items */
}
.preview-cnt-l .preview-blk-list .preview-item .icon {
    margin-right: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}
.preview-cnt-l .preview-blk-list .preview-item .preview-item-val {
    word-break: break-word;
}


/* Specific Preview Content Styling */
.summary-blk p.preview-item-val { /* Target the p tag for summary */
    font-size: 1.35rem;
    color: rgba(255, 255, 255, 0.9); /* Light color for summary text in left pane */
}

.skills-items .preview-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: calc(var(--border-radius) / 2);
    margin-bottom: 0.8rem;
    display: inline-block; 
    margin-right: 0.5rem;
    font-size: 1.3rem;
    color: var(--light-color); /* Light color for skill tags in left pane */
}

/* Experience, Education, Achievements, Projects (Right Pane) */
.preview-cnt-r .preview-blk-list .preview-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--border-color);
}
.preview-cnt-r .preview-blk-list .preview-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.preview-item .item-title { 
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.3rem;
}
.preview-item .item-subtitle { 
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--secondary-color);
    display: block;
    margin-bottom: 0.3rem;
}
.preview-item .item-meta { 
    font-size: 1.3rem;
    color: #666;
    display: block;
    margin-bottom: 0.8rem;
    font-style: italic;
}
.preview-item .item-description {
    font-size: 1.4rem;
    line-height: 1.6;
    color: #555;
}
.preview-item .item-description ul {
    list-style-position: inside;
    padding-left: 0.5rem;
    margin-top: 0.5rem; /* Add some space above lists */
}
.preview-item .item-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.preview-item .item-link a:hover {
    text-decoration: underline;
}

.achievements-items .item-title {
    font-size: 1.5rem;
}
.achievements-items .item-description { 
    font-size: 1.35rem;
    margin-top: 0.2rem;
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden !important;
        background-color: transparent !important; 
        color: #000 !important; 
        box-shadow: none !important;
        text-shadow: none !important;
    }
    #main-header, #main-footer, .form-container, .preview-actions, .ad-placeholder,
    .hero-section, .features-section, .templates-section, .contact-section,
    .non_print_area {
        display: none !important;
    }

    .print_area, .print_area * {
        visibility: visible !important;
    }
    .print_area {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        font-size: 10pt !important; 
    }
    .preview-container-wrapper {
        position: static !important;
        overflow: visible !important;
        max-height: none !important;
        top: auto !important;
    }

    .preview-cnt {
        display: grid !important; 
        grid-template-columns: 35% 65% !important; 
        border: 1px solid #ccc !important; 
        min-height: 0 !important; 
    }
    .preview-cnt-l, .preview-cnt-r {
        padding: 1.5cm !important; 
        color: #000 !important;
        background-color: transparent !important; /* Ensure no bg color from screen styles */
    }
    .preview-cnt-l {
        background-color: #f0f0f0 !important; /* Light gray for left pane in print */
    }
    .preview-cnt-l *, .preview-cnt-l h3, 
    .preview-cnt-l .preview-item-name .preview-item-val,
    .preview-cnt-l .preview-item-designation .preview-item-val,
    .preview-cnt-l .skills-items .preview-item,
    .preview-cnt-l .preview-blk-list .preview-item,
    .preview-cnt-l .summary-blk p.preview-item-val {
        color: #000 !important; 
        opacity: 1 !important;
    }

    .preview-image {
        border-color: #ccc !important;
    }
    .preview-item-name .preview-item-val {
         font-size: 18pt !important;
    }
    .preview-item-designation {
        border-bottom-color: #ccc !important;
    }
     .preview-item-designation .preview-item-val {
        font-size: 11pt !important;
    }
    .preview-blk-title h3 {
        font-size: 14pt !important;
        border-bottom-color: #333 !important;
    }
    .preview-cnt-l .preview-blk-title h3 {
        border-bottom-color: #555 !important;
    }

    .preview-blk-list .preview-item {
        font-size: 9pt !important;
        margin-bottom: 0.5cm !important;
    }
    .skills-items .preview-item {
        background-color: #e9e9e9 !important;
        padding: 0.2cm 0.4cm !important;
        font-size: 8.5pt !important;
        border: 1px solid #ddd !important; /* Add a light border for print */
    }
    .preview-cnt-r .preview-blk-list .preview-item {
        border-bottom-color: #ddd !important;
    }
    .item-title { font-size: 11pt !important; color: #000 !important; }
    .item-subtitle { font-size: 10pt !important; color: #000 !important; }
    .item-meta { font-size: 9pt !important; color: #333 !important; }
    .item-description { font-size: 9pt !important; color: #000 !important; }

    a, a:visited { text-decoration: none !important; color: #000 !important; }
    /* Optional: Show URLs for links in print (can be noisy on a resume) */
    /*
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 8pt;
        font-weight: normal;
    }
    */
}

/* Features Section */
.features-section {
    /* Uses section-padding and bg-light */
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}
.feature-item {
    background-color: var(--light-color);
    padding: 3rem 2.5rem;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}
.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.feature-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}
.feature-item h3 {
    font-family: var(--font-headings);
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}
.feature-item p {
    font-size: 1.5rem;
    line-height: 1.6;
    color: #555;
}

/* Templates and Contact Section (Placeholders for now) */
.templates-section p, .contact-section p {
    font-size: 1.8rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form {
    max-width: 700px;
    margin: 3rem auto 0;
    background-color: rgba(255,255,255,0.05); /* For dark background */
    padding: 3rem;
    border-radius: var(--border-radius);
}
.bg-dark .contact-form input, /* Style inputs specifically for dark bg */
.bg-dark .contact-form textarea {
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--light-color);
}
.bg-dark .contact-form input::placeholder, 
.bg-dark .contact-form textarea::placeholder {
    color: rgba(255,255,255,0.6);
}
.contact-form input, .contact-form textarea { /* General input styles for non-dark bg */
    margin-bottom: 1.5rem;
}
.contact-form textarea {
    margin-bottom: 2rem; 
}
.contact-form .btn {
    width: 100%;
}


/* Footer */
#main-footer {
    background-color: var(--dark-color);
    color: #a0a0a0;
    padding: 3rem 0;
    text-align: center;
    font-size: 1.4rem;
}
#main-footer p {
    margin-bottom: 0.5rem;
    color: #a0a0a0; /* Ensure footer p text color */
}
#main-footer p:last-child {
    margin-bottom: 0;
}