/* 
** Responsive Styles for Ideal Real Estate Consulting Website 
** Created: 2025-03-19
*/

/* ======= MEDIA QUERIES ======= */

/* Large Screens */
@media screen and (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }
    
    .intro-content,
    .service-content,
    .program-content {
        gap: 30px;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
}

/* Medium Screens (Tablets, small laptops) */
@media screen and (max-width: 992px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .intro-content,
    .leader-profile {
        grid-template-columns: 1fr;
    }
    
    .service-content,
    .service-content.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }
    
    .service-content.reverse .service-info {
        direction: ltr;
    }
    
    .program-content,
    .program-content.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }
    
    .program-content.reverse .program-details {
        direction: ltr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Navigation Changes */
    header .container {
        padding: 15px 30px;
    }
    
    .main-menu {
        position: fixed;
        top: 90px;
        left: 0;
        width: 100%;
        background-color: #FFFFFF;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        z-index: 1001;
        box-sizing: border-box;
        max-width: 100vw;
        height: calc(100vh - 90px);
    }
    
    .main-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        display: flex;
        overflow-y: auto;
    }
    
    .main-menu li {
        margin: 10px 0;
    }
    
    nav {
        justify-content: flex-end;
        position: relative;
    }
    
    .menu-toggle {
        display: flex;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Small Screens (Mobile Phones) */
@media screen and (max-width: 768px) {
    /* Training page specific styles */
    .training-hero {
        padding: 100px 15px 60px;
    }

    .training-hero h1 {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }

    .training-hero p {
        font-size: 1rem;
        padding: 0;
    }

    .training-stats {
        flex-direction: column;
        gap: 30px;
    }

    .stat-item {
        margin: 0;
    }

    .programs-grid {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 20px;
    }

    .training-benefits {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .enrollment-container {
        flex-direction: column;
        padding: 15px;
    }

    .enrollment-content h2 {
        font-size: 2rem;
    }

    .form-container {
        padding: 20px;
        margin: 0 15px;
    }

    .program-navigation {
        padding: 10px 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .program-nav-container {
        flex-wrap: nowrap;
        padding-bottom: 5px;
    }

    .program-nav-item {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
        max-width: 100vw;
    }

    /* Ensure header stays within bounds */
    header .container {
        width: 100%;
        max-width: 100%;
        padding: 15px 60px 15px 15px; /* Added right padding to account for menu toggle */
        box-sizing: border-box;
        position: relative;
    }

    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    /* Hero section adjustments */
    .hero-transparent {
        min-height: auto;
        padding: 80px 0 40px;
        width: 100%;
        margin: 0;
    }
    
    .hero-content {
        text-align: center;
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .hero-buttons {
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    .hero p {
        padding: 0 15px;
        font-size: 1.1rem;
        margin: 0 15px;
    }
    
    /* Fix mobile menu positioning */
    .main-menu {
        top: 70px;
        padding: 10px 0;
    }
    
    .menu-toggle {
        right: 15px;
        margin: 0;
        padding: 0;
        position: absolute;
    }

    /* Achievement cards adjustments */
    .achievement-cards {
        flex-direction: column;
        width: 100%;
        margin: 20px 0;
        padding: 15px;
        box-sizing: border-box;
    }

    .achievement-card {
        width: 100%;
        margin: 0 0 15px 0;
        padding: 15px;
        box-sizing: border-box;
    }
    
    /* Grid layouts adjustments */
    .form-row,
    .footer-content,
    .vm-cards,
    .insights-grid,
    .program-cards,
    .blog-grid,
    .downloads-grid,
    .video-grid,
    .features-grid,
    .insights-grid,
    .client-logos,
    .partners-logo-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        padding: 15px;
    }

    /* Services section */
    .services-overview .container,
    .why-choose-us-redesign .container,
    .testimonials .container,
    .cta-section .container {
        padding: 0;
        width: 100%;
    }

    /* Features and content sections */
    .feature-card,
    .service-card,
    .client-type,
    .testimonial-item {
        margin: 0 0 20px 0;
        width: 100%;
        box-sizing: border-box;
    }

    /* CTA sections */
    .cta-content,
    .newsletter-form {
        width: 100%;
        padding: 15px;
        margin: 0;
        box-sizing: border-box;
    }

    /* Logo section */
    .logos-wrapper {
        width: 100%;
        padding: 15px;
        margin: 0 15px;
        overflow: hidden;
    }

    /* Fix card layouts */
    .service-card,
    .program-card,
    .blog-card,
    .testimonial-item,
    .insight-card,
    .feature-card {
        width: 100%;
        margin: 0;
        box-sizing: border-box;
    }

    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Fix flex containers */
    .services-tabs,
    .tab-flex,
    .cta-flex,
    .programs-flex-container {
        flex-direction: column;
        gap: 20px;
        margin: 0;
        padding: 15px;
    }
    /* Newsletter section mobile styles */
    .newsletter-wrapper {
        display: flex;
        flex-direction: column;
        gap: 30px;
        padding: 20px;
    }

    .newsletter-image {
        width: 100%;
        margin: 0 auto;
    }

    .newsletter-image img {
        width: 100%;
        max-width: 400px;
        height: auto;
        margin: 0 auto;
        border-radius: 10px;
        display: block;
    }

    .newsletter-content {
        text-align: center;
        padding: 0;
    }

    .subscription-benefits {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin: 20px 0;
    }

    .newsletter-form {
        flex-direction: column;
        padding: 0 15px;
        max-width: 100%;
    }
    
    .newsletter-form input {
        border-radius: 5px;
        margin-bottom: 10px;
        width: 100%;
    }
    
    .newsletter-form .cta-button {
        border-radius: 5px;
        width: 100%;
    }

    .newsletter-disclaimer {
        text-align: center;
        padding: 0 15px;
    }
    
    /* Footer mobile styles */
    .footer-content {
        text-align: center;
        width: 100%;
        max-width: 100%;
        padding: 20px 15px !important;
        box-sizing: border-box;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* Ensure footer container doesn't overflow */
    footer .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        overflow-x: hidden;
    }

    .footer-column {
        text-align: center;
        margin-bottom: 30px;
        padding: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
    }

    .footer-column li,
    .footer-column p,
    .footer-column a {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .contact-info-container {
        padding: 20px;
    }

    .footer-logo {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 25px;
    }

    .footer-column p {
        text-align: center;
        margin: 0 auto 20px;
        max-width: 100%;
        line-height: 1.6;
        padding: 0 15px;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .footer-column ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 0;
        width: 100%;
        margin: 0;
        list-style: none;
    }

    .footer-column ul li {
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
        margin-bottom: 0;
    }
    .contact-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .contact-info li {
        justify-content: center;
        text-align: center;
        margin: 0;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        word-break: break-word;
        overflow-wrap: break-word;
        padding: 0 10px;
    }

    .contact-info li i {
        flex-shrink: 0;
        margin-right: 10px;
        display: inline-flex;
    }

    .contact-info li span,
    .contact-info li a {
        flex: 1;
        min-width: 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        font-size: 14px;
    }

    .contact-info li a {
        display: inline-block;
        width: 100%;
    }
    .social-icons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        margin: 15px 0;
        gap: 15px;
        padding: 0 15px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .social-icons a {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .social-icons a {
        margin: 0;
    }

    .copyright {
        text-align: center;
        padding: 20px 15px 0;
        margin-top: 30px;
        font-size: 14px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
        margin-bottom: 0;
    }
    
    .footer-column h3:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-icons {
        justify-content: center;
    }
    
    /* Adjust navigation */
    
    nav .cta-button {
        display: none;
    }
    
    /* Fix testimonial slider */
    .testimonial-item {
        padding: 20px 15px;
    }
    
    /* Ensure all sections have proper padding */
    .section-header {
        padding: 0 15px;
    }
    
    /* Fix card layouts */
    .service-card,
    .program-card,
    .blog-card {
        margin: 0 15px;
    }
    
    /* Prevent horizontal scrolling */
    .container {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Fix achievement cards */
    .achievement-cards {
        flex-direction: column;
        padding: 15px;
    }
    
    .achievement-card {
        margin-bottom: 15px;
    }

    /* Success Stories Responsive Fixes */
    .success-stories .container {
        padding: 0 15px;
    }
    
    .transformation-showcase .case-study {
        flex-direction: column;
    }

    .before-after {
        width: 100%;
        margin-bottom: 20px;
        position: relative;
        overflow: hidden;
    }

    .comparison-slider {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .case-study-content {
        width: 100%;
        padding: 20px;
    }

    .before-image, .after-image {
        height: 250px;
    }

    .before-image img, .after-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .slider-handle {
        width: 40px;
        height: 40px;
        background: #AEF802;
        border-radius: 50%;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        cursor: grab;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
        z-index: 10;
    }

    /* Adjust Success Stories section for mobile */
    @media (max-width: 768px) {
        .success-stories .container {
            padding: 0 15px;
        }

        .case-study {
            flex-direction: column;
        }

        .before-after {
            width: 100%;
            margin-bottom: 20px;
        }

        .before-image, .after-image {
            height: 300px;
        }

        .case-study-content {
            width: 100%;
            padding: 20px;
        }

        .results {
            flex-direction: column;
            gap: 20px;
        }

        .result-item {
            text-align: center;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 8px;
        }

        .result-number {
            font-size: 2rem;
        }

        .result-label {
            font-size: 0.85rem;
        }

        .slider-handle {
            width: 36px;
            height: 36px;
        }

        .slider-handle i {
            font-size: 14px;
        }

        .label {
            font-size: 12px;
            padding: 6px 12px;
        }
    }

    .slider-handle i {
        font-size: 16px;
        color: #072361;
    }

    .results {
        flex-direction: column;
        gap: 15px;
    }

    .result-item {
        width: 100%;
        text-align: center;
    }

    .secondary-button {
        width: 100%;
        text-align: center;
        margin-top: 20px;
    }

    /* Contact page mobile fixes */
    .contact-section {
        padding: 40px 0;
    }

    .contact-content {
        padding: 0 15px;
        gap: 30px;
    }

    .contact-form-container,
    .contact-info-container {
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .contact-form-container {
        margin-bottom: 30px;
    }

    .contact-text {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .contact-text a {
        display: inline-block;
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: break-all;
    }

    .map-section {
        padding: 40px 0;
    }

    .map-container {
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
        margin-bottom: 30px;
    }

    .map-container iframe {
        width: 100% !important;
        height: 300px !important;
        border-radius: 10px;
    }

    .faq-section {
        padding: 40px 0;
    }

    .faq-container {
        padding: 0 15px;
    }

    .faq-item {
        margin-bottom: 15px;
    }
}

/* Extra Small Screens */
@media screen and (max-width: 480px) {
    /* Base container and spacing */
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        overflow-x: hidden;
    }

    /* Ensure all sections take full width */
    section {
        width: 100%;
        padding: 40px 0;
        margin: 0;
        overflow-x: hidden;
    }

    /* Container adjustments for all sections */
    section .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        overflow-x: hidden;
    }

    /* Content width control */
    section .container > * {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }

    /* Consistent section padding */
    .hero-transparent,
    .services-overview,
    .why-choose-us-redesign,
    .knowledge-hub,
    .testimonials,
    .cta-section,
    .newsletter-section,
    .network-section,
    .reach-section,
    .limited-offer-section {
        padding: 40px 0;
        width: 100%;
        margin: 0;
    }

    /* Reset grid layouts to ensure full width */
    .services-grid,
    .features-grid,
    .knowledge-grid,
    .testimonials-grid,
    .network-grid,
    .reach-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
        margin: 0;
        padding: 0 15px;
    }

    /* Ensure cards take full width */
    .service-card,
    .feature-card,
    .knowledge-card,
    .testimonial-card,
    .network-card,
    .reach-card {
        width: 100%;
        margin: 0 0 20px 0;
        box-sizing: border-box;
    }

    /* Fix section content alignment */
    .section-header,
    .section-content {
        width: 100%;
        padding: 0 15px;
        margin: 0 0 30px 0;
        box-sizing: border-box;
    }

    /* Ensure images are full width */
    .section-image,
    .card-image {
        width: 100%;
        margin: 0;
    }

    /* Fix footer width */
    footer {
        width: 100%;
        margin: 0;
    }

    .footer-content {
        padding: 40px 15px;
        width: 100%;
        margin: 0;
    }
    
    /* Prevent content overflow */
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* Ensure sections don't create horizontal scroll */
    section {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Add proper spacing to section content */
    .section-header,
    .section-content {
        padding: 0 15px;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Typography adjustments */
    .section-header h2 {
        font-size: 1.6rem;
        line-height: 1.3;
    }
    
    .section-header p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    /* Hero section adjustments */
    .hero {
        min-height: 400px;
        padding-top: 60px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .hero-buttons .cta-button,
    .hero-buttons .secondary-button {
        width: 100%;
        text-align: center;
    }
    /* Grid layouts with full width */
    .service-cards,
    .usp-grid,
    .program-cards,
    .client-types,
    .blog-grid,
    .downloads-grid,
    .video-grid,
    .features-grid,
    .partners-logo-grid,
    .knowledge-grid,
    .client-logos,
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }

    /* Full width sections specific adjustments */
    .hero-section,
    .what-we-offer,
    .our-advantage,
    .knowledge-hub,
    .client-voice,
    .transform-journey,
    .stay-informed,
    .stay-updated,
    .our-network,
    .our-reach,
    .limited-time-offer {
        width: 100%;
        margin: 0;
        padding: 40px 0;
        overflow: hidden;
    }

    /* Card and content adjustments */
    .service-card,
    .program-card,
    .blog-card,
    .testimonial-item,
    .insight-card {
        margin: 0;
        width: 100%;
        padding: 15px;
    }
    
    /* Fix image display */
    .program-image,
    .blog-image,
    .video-thumbnail {
        height: 200px;
    }
    
    img {
        max-width: 100%;
        height: auto;
        object-fit: cover;
    }
    
    /* Form and input improvements */
    .cta-form,
    .contact-form-container {
        padding: 15px;
    }
    
    input,
    select,
    textarea {
        width: 100%;
        padding: 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Fix footer on small screens */
    .footer-content {
        padding: 15px 0;
    }
    
    .footer-column {
        margin-bottom: 20px;
    }
    
    .footer-bottom {
        padding: 15px;
    }
    
    /* Ensure body prevents horizontal scroll */
    body {
        overflow-x: hidden;
        width: 100%;
    }
} /* End of @media screen and (max-width: 480px) */